Package org.apache.pivot.wtk
Class FileBrowserSheet
- java.lang.Object
- 
- org.apache.pivot.wtk.Component
- 
- org.apache.pivot.wtk.Container
- 
- org.apache.pivot.wtk.Window
- 
- org.apache.pivot.wtk.Sheet
- 
- org.apache.pivot.wtk.FileBrowserSheet
 
 
 
 
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classFileBrowserSheet.ModeEnumeration defining supported modes.- 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.WindowWindow.ActionMapping, Window.ActionMappingSequence, Window.IconImageSequence, Window.Skin
 - 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.ContainerContainer.EDTChecker
 - 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.ComponentComponent.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.SequenceSequence.Tree<T>
 
- 
 - 
Constructor SummaryConstructors Constructor Description FileBrowserSheet()Creates a new FileBrowserSheetFileBrowserSheet(java.lang.String rootFolder)Creates a new FileBrowserSheetFileBrowserSheet(FileBrowserSheet.Mode mode)Creates a new FileBrowserSheetFileBrowserSheet(FileBrowserSheet.Mode mode, java.lang.String rootFolder)Creates a new FileBrowserSheet
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearSelection()Clears the selection.Filter<java.io.File>getDisabledFileFilter()ListenerList<FileBrowserSheetListener>getFileBrowserSheetListeners()FileBrowserSheet.ModegetMode()java.io.FilegetRootDirectory()java.io.FilegetSelectedFile()When in single-select mode, returns the currently selected file.ImmutableList<java.io.File>getSelectedFiles()Returns the currently selected files.voidsetDisabledFileFilter(Filter<java.io.File> disabledFileFilter)voidsetMode(FileBrowserSheet.Mode mode)voidsetRootDirectory(java.io.File rootDirectory)voidsetRootFolder(java.lang.String rootFolder)Set the root folder but without firing events.voidsetSelectedFile(java.io.File file)Sets the selection to a single file.Sequence<java.io.File>setSelectedFiles(Sequence<java.io.File> selectedFiles)Sets the selected files.- 
Methods inherited from class org.apache.pivot.wtk.Sheetclose, close, getResult, getSheetCloseListener, getSheetStateListeners, isClosing, open, open, open
 - 
Methods inherited from class org.apache.pivot.wtk.Windowalign, 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, keyPressed, moveToBack, moveToFront, open, open, remove, requestActive, setActive, setContent, setEnabled, setIcon, setIcon, setMaximized, setParent, setTitle, setVisible
 - 
Methods inherited from class org.apache.pivot.wtk.Containeradd, assertEventDispatchThread, assertEventDispatchThread, clear, containsFocus, descendantAdded, descendantLostFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getDescendantAt, getFocusTraversalPolicy, getGraphics, getLength, getNamedComponent, indexOf, insert, invalidate, isAncestor, isDoubleBuffered, iterator, layout, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, removeAll, repaint, requestFocus, setDoubleBuffered, setEventDispatchThreadChecker, setFocusTraversalPolicy, store, transferFocus, update
 - 
Methods inherited from class org.apache.pivot.wtk.ComponentcheckSkin, clearFocus, contains, copyStyle, copyStyle, 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, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getScreenBounds, getSize, getSkin, getStyle, getStyle, getStyleBoolean, getStyleBoolean, getStyleColor, getStyleColor, getStyleFont, getStyleFont, getStyleInt, getStyleInt, getStyles, getTextInputMethodListener, getTooltipDelay, getTooltipText, getTooltipWrapText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, indexBoundsCheck, installSkin, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyReleased, keyTyped, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseOver, offsetToScreen, putStyle, putStyle, reenterMouse, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, 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, setTooltipWrapText, setWidth, setWidthLimits, setWidthLimits, setX, setY, toString, transferFocus, validate
 
- 
 
- 
- 
- 
Constructor Detail- 
FileBrowserSheetpublic FileBrowserSheet() Creates a new FileBrowserSheetNote that this version set by default mode to open and user home as root folder. 
 - 
FileBrowserSheetpublic FileBrowserSheet(FileBrowserSheet.Mode mode) Creates a new FileBrowserSheetNote that this version set by default the user home as root folder. - Parameters:
- mode- The mode for opening the sheet.
- See Also:
- FileBrowserSheet.Mode
 
 - 
FileBrowserSheetpublic FileBrowserSheet(java.lang.String rootFolder) Creates a new FileBrowserSheetNote that this version of the constructor can be used when a custom root folder has to be set, and uses the default mode. - Parameters:
- rootFolder- The root folder full name.
 
 - 
FileBrowserSheetpublic FileBrowserSheet(FileBrowserSheet.Mode mode, java.lang.String rootFolder) Creates a new FileBrowserSheetNote that this version of the constructor must be used when a custom root folder has to be set. - Parameters:
- mode- The mode for opening the sheet.
- rootFolder- The root folder full name.
- See Also:
- FileBrowserSheet.Mode
 
 
- 
 - 
Method Detail- 
getModepublic FileBrowserSheet.Mode getMode() 
 - 
setModepublic void setMode(FileBrowserSheet.Mode mode) 
 - 
getRootDirectorypublic java.io.File getRootDirectory() 
 - 
setRootFolderpublic void setRootFolder(java.lang.String rootFolder) Set the root folder but without firing events.- Parameters:
- rootFolder- The new root directory to browse.
- Throws:
- java.lang.IllegalArgumentException- if the folder argument is- null.
 
 - 
setRootDirectorypublic void setRootDirectory(java.io.File rootDirectory) 
 - 
getSelectedFilepublic java.io.File getSelectedFile() When in single-select mode, returns the currently selected file.- Returns:
- The currently selected file or nullif nothing is selected.
- Throws:
- java.lang.IllegalStateException- if not in single-select mode.
 
 - 
setSelectedFilepublic void setSelectedFile(java.io.File file) Sets the selection to a single file.- Parameters:
- file- The single file to be selected or- nullto select nothing.
 
 - 
getSelectedFilespublic ImmutableList<java.io.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.
 
 - 
setSelectedFilespublic Sequence<java.io.File> setSelectedFiles(Sequence<java.io.File> selectedFiles) Sets the selected files.- Parameters:
- selectedFiles- The files to select.
- Returns:
- The files that were selected, with duplicates eliminated.
- Throws:
- java.lang.IllegalArgumentException- if the selected files sequence is- nullor if the sequence is longer than one file and multi-select is not enabled, or if any entry is the sequence is- nullor whose parent is not the current root directory.
 
 - 
clearSelectionpublic void clearSelection() Clears the selection.
 - 
getDisabledFileFilterpublic Filter<java.io.File> getDisabledFileFilter() 
 - 
setDisabledFileFilterpublic void setDisabledFileFilter(Filter<java.io.File> disabledFileFilter) 
 - 
getFileBrowserSheetListenerspublic ListenerList<FileBrowserSheetListener> getFileBrowserSheetListeners() 
 
- 
 
-