org.apache.pivot.wtk.skin.terra
Class TerraFileBrowserSkin
java.lang.Object
org.apache.pivot.wtk.skin.ComponentSkin
org.apache.pivot.wtk.skin.ContainerSkin
org.apache.pivot.wtk.skin.FileBrowserSkin
org.apache.pivot.wtk.skin.terra.TerraFileBrowserSkin
- All Implemented Interfaces:
- org.apache.pivot.wtk.ComponentKeyListener, org.apache.pivot.wtk.ComponentListener, org.apache.pivot.wtk.ComponentMouseButtonListener, org.apache.pivot.wtk.ComponentMouseListener, org.apache.pivot.wtk.ComponentMouseWheelListener, org.apache.pivot.wtk.ComponentStateListener, org.apache.pivot.wtk.ComponentTooltipListener, org.apache.pivot.wtk.ConstrainedVisual, org.apache.pivot.wtk.ContainerListener, org.apache.pivot.wtk.ContainerMouseListener, org.apache.pivot.wtk.FileBrowser.Skin, org.apache.pivot.wtk.FileBrowserListener, org.apache.pivot.wtk.Skin, org.apache.pivot.wtk.Visual
public class TerraFileBrowserSkin
- extends org.apache.pivot.wtk.skin.FileBrowserSkin
Terra file browser skin.
| Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
org.apache.pivot.wtk.skin.ContainerSkin.IndexFocusTraversalPolicy |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.FileBrowserListener |
org.apache.pivot.wtk.FileBrowserListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener |
org.apache.pivot.wtk.ContainerListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener |
org.apache.pivot.wtk.ContainerMouseListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener |
org.apache.pivot.wtk.ComponentListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener |
org.apache.pivot.wtk.ComponentStateListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener |
org.apache.pivot.wtk.ComponentMouseListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener |
org.apache.pivot.wtk.ComponentMouseButtonListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener |
org.apache.pivot.wtk.ComponentKeyListener.Adapter |
|
Method Summary |
void |
disabledFileFilterChanged(org.apache.pivot.wtk.FileBrowser fileBrowser,
org.apache.pivot.util.Filter<File> previousDisabledFileFilter)
|
File |
getFileAt(int x,
int y)
|
static TerraFileBrowserSkin.FileComparator |
getFileComparator(String columnName,
org.apache.pivot.wtk.SortDirection sortDirection)
File comparator. |
int |
getPreferredHeight(int width)
|
org.apache.pivot.wtk.Dimensions |
getPreferredSize()
|
int |
getPreferredWidth(int height)
|
void |
install(org.apache.pivot.wtk.Component component)
|
boolean |
isHideDisabledFiles()
|
boolean |
isKeyboardFolderTraversalEnabled()
|
boolean |
isShowHiddenFiles()
|
boolean |
keyPressed(org.apache.pivot.wtk.Component component,
int keyCode,
org.apache.pivot.wtk.Keyboard.KeyLocation keyLocation)
ENTER Change into the selected directory if
keyboardFolderTraversalEnabled is true. |
boolean |
keyReleased(org.apache.pivot.wtk.Component component,
int keyCode,
org.apache.pivot.wtk.Keyboard.KeyLocation keyLocation)
CommandModifier + F Transfers focus to the search
TextInput. |
void |
layout()
|
void |
multiSelectChanged(org.apache.pivot.wtk.FileBrowser fileBrowser)
|
void |
rootDirectoryChanged(org.apache.pivot.wtk.FileBrowser fileBrowser,
File previousRootDirectory)
|
void |
selectedFileAdded(org.apache.pivot.wtk.FileBrowser fileBrowser,
File file)
|
void |
selectedFileRemoved(org.apache.pivot.wtk.FileBrowser fileBrowser,
File file)
|
void |
selectedFilesChanged(org.apache.pivot.wtk.FileBrowser fileBrowser,
org.apache.pivot.collections.Sequence<File> previousSelectedFiles)
|
void |
setHideDisabledFiles(boolean hideDisabledFiles)
|
void |
setKeyboardFolderTraversalEnabled(boolean keyboardFolderTraversalEnabled)
|
void |
setShowHiddenFiles(boolean showHiddenFiles)
Set to determine if hidden files should be shown. |
| Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseDown, mouseMove, mouseUp, mouseWheel, paint, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint |
| Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, getBaseline, getBaseline, getComponent, getHeight, getWidth, heightLimitsChanged, invalidateComponent, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.pivot.wtk.Skin |
getComponent, isFocusable, isOpaque |
| Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual |
getBaseline, setSize |
| Methods inherited from interface org.apache.pivot.wtk.Visual |
getBaseline, getHeight, getWidth, paint |
HOME_DIRECTORY
public static final File HOME_DIRECTORY
TerraFileBrowserSkin
public TerraFileBrowserSkin()
getFileComparator
public static TerraFileBrowserSkin.FileComparator getFileComparator(String columnName,
org.apache.pivot.wtk.SortDirection sortDirection)
- File comparator.
install
public void install(org.apache.pivot.wtk.Component component)
- Specified by:
install in interface org.apache.pivot.wtk.Skin- Overrides:
install in class org.apache.pivot.wtk.skin.FileBrowserSkin
getPreferredWidth
public int getPreferredWidth(int height)
- Specified by:
getPreferredWidth in interface org.apache.pivot.wtk.ConstrainedVisual- Overrides:
getPreferredWidth in class org.apache.pivot.wtk.skin.ContainerSkin
getPreferredHeight
public int getPreferredHeight(int width)
- Specified by:
getPreferredHeight in interface org.apache.pivot.wtk.ConstrainedVisual- Overrides:
getPreferredHeight in class org.apache.pivot.wtk.skin.ContainerSkin
getPreferredSize
public org.apache.pivot.wtk.Dimensions getPreferredSize()
- Specified by:
getPreferredSize in interface org.apache.pivot.wtk.ConstrainedVisual- Overrides:
getPreferredSize in class org.apache.pivot.wtk.skin.ComponentSkin
layout
public void layout()
getFileAt
public File getFileAt(int x,
int y)
isKeyboardFolderTraversalEnabled
public boolean isKeyboardFolderTraversalEnabled()
setKeyboardFolderTraversalEnabled
public void setKeyboardFolderTraversalEnabled(boolean keyboardFolderTraversalEnabled)
isHideDisabledFiles
public boolean isHideDisabledFiles()
setHideDisabledFiles
public void setHideDisabledFiles(boolean hideDisabledFiles)
isShowHiddenFiles
public boolean isShowHiddenFiles()
- Returns:
- Whether hidden files will be shown in the browser.
setShowHiddenFiles
public void setShowHiddenFiles(boolean showHiddenFiles)
- Set to determine if hidden files should be shown.
- Parameters:
showHiddenFiles - Whether to show hidden files.
keyPressed
public boolean keyPressed(org.apache.pivot.wtk.Component component,
int keyCode,
org.apache.pivot.wtk.Keyboard.KeyLocation keyLocation)
ENTER Change into the selected directory if
keyboardFolderTraversalEnabled is true.
DELETE or BACKSPACE
Change into the parent of the current directory.
F5 Refresh the file list.
- Specified by:
keyPressed in interface org.apache.pivot.wtk.ComponentKeyListener- Overrides:
keyPressed in class org.apache.pivot.wtk.skin.ComponentSkin
keyReleased
public boolean keyReleased(org.apache.pivot.wtk.Component component,
int keyCode,
org.apache.pivot.wtk.Keyboard.KeyLocation keyLocation)
- CommandModifier +
F Transfers focus to the search
TextInput.
- Specified by:
keyReleased in interface org.apache.pivot.wtk.ComponentKeyListener- Overrides:
keyReleased in class org.apache.pivot.wtk.skin.ComponentSkin
- See Also:
Platform.getCommandModifier()
rootDirectoryChanged
public void rootDirectoryChanged(org.apache.pivot.wtk.FileBrowser fileBrowser,
File previousRootDirectory)
selectedFileAdded
public void selectedFileAdded(org.apache.pivot.wtk.FileBrowser fileBrowser,
File file)
selectedFileRemoved
public void selectedFileRemoved(org.apache.pivot.wtk.FileBrowser fileBrowser,
File file)
selectedFilesChanged
public void selectedFilesChanged(org.apache.pivot.wtk.FileBrowser fileBrowser,
org.apache.pivot.collections.Sequence<File> previousSelectedFiles)
multiSelectChanged
public void multiSelectChanged(org.apache.pivot.wtk.FileBrowser fileBrowser)
disabledFileFilterChanged
public void disabledFileFilterChanged(org.apache.pivot.wtk.FileBrowser fileBrowser,
org.apache.pivot.util.Filter<File> previousDisabledFileFilter)