org.apache.pivot.wtk
Class FileBrowserSheet

java.lang.Object
  extended by org.apache.pivot.wtk.Component
      extended by org.apache.pivot.wtk.Container
          extended by org.apache.pivot.wtk.Window
              extended by org.apache.pivot.wtk.Sheet
                  extended by org.apache.pivot.wtk.FileBrowserSheet
All Implemented Interfaces:
Iterable<Component>, Sequence<Component>, ConstrainedVisual, Visual

public class FileBrowserSheet
extends Sheet

File browser sheet.


Nested Class Summary
static class FileBrowserSheet.Mode
          Enumeration defining supported modes.
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Window
Window.ActionMapping, Window.ActionMappingSequence, Window.Skin
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree
 
Constructor Summary
FileBrowserSheet(FileBrowserSheet.Mode mode)
           
 
Method Summary
 void clearSelection()
          Clears the selection.
 Filter<File> getDisabledFileFilter()
           
 ListenerList<FileBrowserSheetListener> getFileBrowserSheetListeners()
           
 FileBrowserSheet.Mode getMode()
           
 File getRootDirectory()
           
 File getSelectedFile()
          When in single-select mode, returns the currently selected file.
 Sequence<File> getSelectedFiles()
          Returns the currently selected files.
 void setDisabledFileFilter(Filter<File> disabledFileFilter)
           
 void setRootDirectory(File rootDirectory)
           
 void setSelectedFile(File file)
          Sets the selection to a single file.
 Sequence<File> setSelectedFiles(Sequence<File> selectedFiles)
          Sets the selected files.
 
Methods inherited from class org.apache.pivot.wtk.Sheet
close, close, getResult, getSheetCloseListener, getSheetStateListeners, isClosing, open, open, open, setOwner
 
Methods inherited from class org.apache.pivot.wtk.Window
align, align, descendantGainedFocus, descendantRemoved, getActionMappings, getActiveWindow, getClientArea, getContent, getFocusDescendant, getIcon, getOwnedWindow, getOwnedWindowCount, getOwner, getRootOwner, getTitle, getWindowActionMappingListeners, getWindowClassListeners, getWindowListeners, getWindowStateListeners, isActive, isAuxilliary, isClosed, isMaximized, isOpen, isOpening, isOwner, keyReleased, moveToBack, moveToFront, remove, requestActive, setActive, setContent, setEnabled, setIcon, setIcon, setIcon, setMaximized, setParent, setTitle, setVisible
 
Methods inherited from class org.apache.pivot.wtk.Container
add, containsFocus, descendantLostFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getContextKey, getDescendantAt, getFocusTraversalPolicy, getLength, indexOf, insert, isAncestor, iterator, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, removeAll, requestFocus, setContextKey, setFocusTraversalPolicy, setTooltip, store, transferFocus, update, validate
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, getAttributes, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponents, getComponentStateListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHandle, getHeight, getLocation, getMaximumPreferredHeight, getMaximumPreferredWidth, getMenuHandler, getMinimumPreferredHeight, getMinimumPreferredWidth, getParent, getPreferredHeight, getPreferredHeight, getPreferredHeightLimits, getPreferredSize, getPreferredWidth, getPreferredWidth, getPreferredWidthLimits, getSize, getSkin, getStyles, getTooltipText, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWindow, getX, getY, installSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyTyped, load, mapPointFromAncestor, mapPointToAncestor, mouseOver, repaint, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttributes, setCursor, setCursor, setDragSource, setDropTarget, setHeight, setLocation, setLocation, setMaximumPreferredHeight, setMaximumPreferredWidth, setMenuHandler, setMinimumPreferredHeight, setMinimumPreferredWidth, setPreferredHeight, setPreferredHeightLimits, setPreferredHeightLimits, setPreferredSize, setPreferredSize, setPreferredWidth, setPreferredWidthLimits, setPreferredWidthLimits, setSize, setSize, setSkin, setStyles, setStyles, setStyles, setTooltipText, setWidth, setX, setY, store, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileBrowserSheet

public FileBrowserSheet(FileBrowserSheet.Mode mode)
Method Detail

getMode

public FileBrowserSheet.Mode getMode()

getRootDirectory

public File getRootDirectory()

setRootDirectory

public void setRootDirectory(File rootDirectory)

getSelectedFile

public File getSelectedFile()
When in single-select mode, returns the currently selected file.

Returns:
The currently selected file.

setSelectedFile

public void setSelectedFile(File file)
Sets the selection to a single file.

Parameters:
file -

getSelectedFiles

public Sequence<File> getSelectedFiles()
Returns the currently selected files.

Returns:
An immutable list of selected files.

setSelectedFiles

public Sequence<File> setSelectedFiles(Sequence<File> selectedFiles)
Sets the selected files.

Parameters:
selectedFiles - The files to select.
Returns:
The files that were selected, with duplicates eliminated.

clearSelection

public void clearSelection()
Clears the selection.


getDisabledFileFilter

public Filter<File> getDisabledFileFilter()

setDisabledFileFilter

public void setDisabledFileFilter(Filter<File> disabledFileFilter)

getFileBrowserSheetListeners

public ListenerList<FileBrowserSheetListener> getFileBrowserSheetListeners()