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.IconImageSequence, Window.Skin
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Container
Container.EDT_Checker
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree<T>
 
Constructor Summary
FileBrowserSheet()
           
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.
 ImmutableList<File> getSelectedFiles()
          Returns the currently selected files.
 void setDisabledFileFilter(Filter<File> disabledFileFilter)
           
 void setMode(FileBrowserSheet.Mode mode)
           
 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
 
Methods inherited from class org.apache.pivot.wtk.Window
align, align, clearActive, clearFocusDescendant, descendantGainedFocus, descendantRemoved, getActionMappings, getActiveWindow, getClientArea, getContent, getFocusDescendant, getIcons, getOwnedWindow, getOwnedWindowCount, getOwner, getRootOwner, getTitle, getWindowActionMappingListeners, getWindowClassListeners, getWindowListeners, getWindowStateListeners, isActive, isBottomMost, isClosed, isMaximized, isOpen, isOpening, isOwner, isTopMost, keyReleased, moveToBack, moveToFront, open, open, remove, requestActive, setActive, setContent, setEnabled, setIcon, setIcon, setMaximized, setParent, setTitle, setVisible
 
Methods inherited from class org.apache.pivot.wtk.Container
add, assertEventDispatchThread, assertEventDispatchThread, clear, containsFocus, descendantAdded, descendantLostFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getDescendantAt, getFocusTraversalPolicy, getLength, getNamedComponent, indexOf, insert, isAncestor, iterator, layout, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, removeAll, requestFocus, setEventDispatchThreadChecker, setFocusTraversalPolicy, store, transferFocus, update
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, contains, getAncestor, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getComponentStyleListeners, getComponentTooltipListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getSize, getSkin, getStyles, getTooltipDelay, getTooltipText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, indexBoundsCheck, installSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyTyped, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseOver, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setCursor, setDragSource, setDropTarget, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSize, setSkin, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setWidth, setWidthLimits, setWidthLimits, setX, setY, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileBrowserSheet

public FileBrowserSheet()

FileBrowserSheet

public FileBrowserSheet(FileBrowserSheet.Mode mode)
Method Detail

getMode

public FileBrowserSheet.Mode getMode()

setMode

public void setMode(FileBrowserSheet.Mode mode)

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 ImmutableList<File> getSelectedFiles()
Returns the currently selected files.

Returns:
An immutable list containing the currently selected files. Note that the returned list is a wrapper around the actual selection, not a copy. Any changes made to the selection state will be reflected in the list, but events will not be fired.

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()