public class FileDialogGuiImpl extends FileDialogImpl implements ItemListener
All dimensions are expressed in pixels, rather than character units.
Modifier and Type | Class and Description |
---|---|
private class |
FileDialogGuiImpl.FileDialogLayoutManager
The
LayoutManager that handles the placement and size of the widgets on this dialog. |
private class |
FileDialogGuiImpl.Folder
A thumbnail for a directory.
|
private class |
FileDialogGuiImpl.FolderTree
A dedicated container for holding the shortcuts in a vertical flow.
|
private class |
FileDialogGuiImpl.NavigationPane
Contains the following widgets:
NAME_____________ TYPE_______ PROPERTIES____ ACTION______________________________________
HistoryBack button round Loads the previous folder
HistoryForward button round Loads the forward folder
RecentLocations button Opens a popup-menu with recent locations
FolderUp button Loads the parent folder
Address editor expandable Allows user to type in a location
Refresh button Reload the current location
/splitter/ Changes ratio between Address and Search
Search editor expandable Searches sub-folders for specific pattern
|
private class |
FileDialogGuiImpl.SearchOperation
A dedicated thread that handles a recursive search operation in background.
|
private class |
FileDialogGuiImpl.ToolsPane
Tools row contains the following widgets:
NAME_____________ TYPE_______ PROPERTIES____ ACTION______________________________________
Organize button Opens a contextual popup-menu
NewFolder button Creates a new folder at current location
/spacer/ expandable Nothing (fills in empty space)
ChangeView button Selects the next view mode
MoreOptions button Opens a popup-menu with different view modes
Help button Opens Help page
|
FrameGuiImpl.GuiScrollContainer
Frame.ScrollContainer
Modifier and Type | Field and Description |
---|---|
private ButtonGuiImpl |
accept
The
OK button. |
private java.lang.String |
activeFilter
The default file filter in case none is specified.
|
private ComboBoxGuiImpl |
addressCbx
The
addressCbx combobox allows the user to select one of previously visited locations
or to manually enter it. |
private int |
BOTTOM_INSET
The bottom inset.
|
private int |
BUTTONS_PANE_HEIGHT_OP
Constant height of the last pane (dialog closing pane) in Open mode.
|
private int |
BUTTONS_PANE_HEIGHT_SA
Constant height of the last pane (dialog closing pane) in SaveAs mode.
|
private CoordinatesConversion |
cc
Cached coordinates.
|
private ImageWrapper<java.awt.image.BufferedImage> |
colImg
Cached icon that marks a folder to be collapsed, usually a right arrow or [+].
|
private FileDialogGuiImpl.Folder |
crtFolder
The folder that is currently selected.
|
private java.lang.String |
currentDir
The absolute path of the directory displayed in dialog.
|
private java.util.List<java.nio.file.Path> |
currentDirContent
The cached list of files at the current location.
|
private int |
currentView
The currently selected view mode.
|
private ImageWrapper<java.awt.image.BufferedImage> |
expImg
Cached icon that marks a folder to be expanded, usually a down arrow or [-].
|
private int |
FILE_TYPE_ALIGN_SA
The alignment for file and type labels (on last two rows).
|
private static int |
FILE_TYPE_WIDTH_OP
The width of the shortcuts panel in center of the dialog in Open mode.
|
private LineEditor |
filename
The filename editor should allow the user to manually enter the name of the file.
|
private int |
FILENAME_PANE_HEIGHT_OP
Constant height of the fourth pane (filename direct input) in Open mode.
|
private int |
FILENAME_PANE_HEIGHT_SA
Constant height of the fourth pane (filename direct input) in SaveAs mode.
|
private SimpleLabel |
filenameLabel
A label for filename editor.
|
private ComboBoxGuiImpl |
fileTypeCbx
The combobox allows the user to select a predefined pattern for the files displayed.
|
private static int |
FOLDER_HEIGHT
The height of the folders in tree.
|
private static int |
FOLDER_TREE_WIDTH
The width of the shortcuts panel in center of the dialog in SaveAs mode.
|
private ButtonGuiImpl |
folderUp
Button that allows the user to go up the file tree from the current location.
|
private java.util.Deque<java.lang.String> |
future
The list of visited locations that have been reverted using
Back button. |
protected GuiDriver |
gd
Cached driver.
|
private ButtonGuiImpl |
help
Opens native contextual help.
|
private ButtonGuiImpl |
hideFolders
Reduce the size of the dialog by hiding the central widgets (shortcuts and directory
content).
|
private java.util.Deque<java.lang.String> |
history
The list of visited locations accessible through
Back button. |
private static java.util.logging.Logger |
LOG
Logger.
|
private ButtonGuiImpl |
more
Allows selection of same view modes like
view button but using a popup menu instead
of looping. |
private int |
NATIVE_HEIGHT
The native height of the dialog.
|
private int |
NATIVE_WIDTH
The native width of the dialog.
|
private int |
NAV_PANE_HEIGHT
Constant height of the first (upper) pane (navigation).
|
private SimpleImageButton |
navBack
Button that allows the user to go back to previous location.
|
private SimpleImageButton |
navForward
Button that allows the user to advances from a 'go back' action.
|
private FileDialogGuiImpl.NavigationPane |
navigationPane
The upper panel that allows basic navigation primitives.
|
private ButtonGuiImpl |
newFolder
The button allows creation of a new empty folder and prompts the user to rename it.
|
private ButtonGuiImpl |
organize
The button opens a contextual popup menu with low-level OS operations: Cut/Copy/Paste/Undo/
Redo/Delete/Rename.
|
private SimpleImageButton |
recentLocations
Button that allows the user select the most recent location from a popup.
|
private ButtonGuiImpl |
refresh
Refreshes the content of the displayed folder (if the content was altered externally).
|
private ButtonGuiImpl |
reject
The
Cancel button. |
private LineEditor |
rename
The Editor widget that allows renaming of directories just created.
|
private int |
SAVEAS_PANE_HEIGHT
Constant height of the fourth pane (file type selection).
|
private SimpleLabel |
saveasLabel
A label for file type chooser.
|
private FileDialogGuiImpl.Folder |
scFavorites
Root node that groups the
Favorite shortcuts. |
private FileDialogGuiImpl.Folder |
scNetwork
Root node that groups the
Network shortcuts. |
private FileDialogGuiImpl.Folder |
scThisPC
Root node that groups the shortcuts to locations from
this computer . |
private ComboBoxGuiImpl |
search
Allows to enter a pattern or select a previous one for search inside current location.
|
private FileDialogGuiImpl.SearchOperation |
searchOp
Is search in progress ?
|
private int |
TOOLS_PANE_HEIGHT
Constant height of the second pane (tools).
|
private FileDialogGuiImpl.ToolsPane |
toolsPane
Groups a set of tool buttons.
|
private FileDialogGuiImpl.FolderTree |
treePane
The container that holds the tree shortcuts accessible from the left-side of the dialog.
|
private ScrollPaneGuiImpl |
treeScroll
The scroll pane that allows the
treePane to be scrolled up and down. |
private ButtonGuiImpl |
view
Loops over the existing view modes: Medium Icons, Small Icons, List, Details, Tiles and
Content.
|
private EmptyThumbView[] |
views
The set of view modes for currently selected directory.
|
private ScrollPaneGuiImpl[] |
viewScrolls
The set of view scroll panes for each view container.
|
askOverwrite, createTestFile, filters, initialFilter, mustExist, preferredTitle, saveAs
accepted, initialDir, inputDone, selectedPath
chooseHandler, configUpdateActive, contentPane, currentStatement, cursor, down, downBody, EXTRA_DLG_PIXELS, frameScroll, headersHeight, headersOutput, lastRow, needPause, nonbody, originalHeightChars, paintable, redirected, savedTabOrder, startRow, touched, trailingSkips, underline, underlinedRow, verticalStepBoxed
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
FileDialogGuiImpl(WidgetId id,
FrameConfig cfg)
The constructor build an object by forwarding the required parameters to super class.
|
Modifier and Type | Method and Description |
---|---|
private void |
addToHistory(java.lang.String location)
Adds a folder to location history.
|
void |
addWidget(Widget<GuiOutputManager> widget)
Adding new widget to the container.
|
void |
addWidgetToPane(Widget<GuiOutputManager> widget,
AbstractContainer container)
Adding new widget to a container.
|
private void |
changeView(int newView)
Changes the current view mode.
|
private ButtonGuiImpl |
createButton(java.lang.String text,
java.lang.String action,
int width,
int height,
boolean flat,
boolean def,
java.lang.String tooltip)
Creates and initializes a button widget.
|
private ComboBoxGuiImpl |
createCombobox(ComboBoxConfig.Mode mode,
int x,
int y,
int w,
int h,
ControlSetItem[] items,
java.lang.String selVal,
java.lang.String format)
Creates a customized
ComboBoxGuiImpl to be used on this dialog. |
private FileDialogGuiImpl.Folder |
createFolder(FileDialogGuiImpl.Folder parent,
java.lang.String text,
java.lang.String path,
java.lang.String img)
Creates a customized
Folder to be used on this dialog. |
private MenuItemGuiImpl |
createHistoryMenu(java.lang.String strPath,
int idx)
Worker method for creating a history entry in recent locations popup menu.
|
private SimpleImageButton |
createImageButton(java.lang.String action,
java.lang.String tooltip,
int w,
int h)
Creates a customized
SimpleImageButton to be used on this dialog. |
private static MenuItemGuiImpl |
createMenuItem(java.lang.String menuLabel,
boolean checked,
java.lang.Runnable code)
Helper methods for creating items in a (popup) menu.
|
private void |
createNewFolder()
Creates a new folder at the current location.
|
private SimpleLabel |
createSimpleLabel(java.lang.String text,
int w,
int h,
boolean rightAlign)
Creates a customized
SimpleLabel to be used on this dialog. |
void |
dismiss()
Let the modal UI element now that it should finish its modal input processing.
|
private void |
expandFolder(FileDialogGuiImpl.Folder folder)
Expands a folder.
|
boolean |
focusTraversable()
Check if widget is focus traversable.
|
private static java.lang.String |
getPatternAsRegexp(java.lang.String activeFilter)
Converts a set of file filters (which uses
* and ? as wildcards) to a
combined regex expression. |
private void |
goBack()
Goes back to previous location.
|
private void |
goForward()
Goes forward to a previous location.
|
private void |
goUp()
The
UP action. |
protected void |
init()
Initialize the dialog by performing tasks that was not possible in the constructor because
it was not fully created.
|
private void |
moreOptions()
Shows the more options popup menu.
|
private void |
navigate(java.lang.String strPath)
This is the main method of the dialog.
|
void |
onAction(ActionEvent event)
This method is invoked when action event is generated.
|
void |
onSelect(ItemEvent event)
This method is invoked on each item selection change.
|
private void |
openFolder(java.lang.String path,
boolean clearForward)
Opens a folder.
|
private void |
refresh()
Refreshes the content of the current location (in the event of an external change of file
system in the current location).
|
private void |
renameCurrentFile(java.lang.String newName)
Renames the file whose thumbnail is currently selected.
|
private void |
setComboboxSize(ComboBoxGuiImpl cbx,
int width,
int height)
Sets the size of a combobox widget.
|
private void |
setWidgetLocation(AbstractWidget widget,
int x,
int y,
NativePoint rowOffset)
Sets the physical location of a widget related to its parent physical location.
|
private void |
showHistory()
The method called when
history button was pressed. |
private void |
updateNavButtons()
Updates the status of the navigation buttons, disabling the ones that have inactive or
incorrect actions in the current moment.
|
private void |
updateTabbingList()
Updates the list that dictates the focusing order using TAB/BACK-TAB keys.
|
private void |
validateSelection()
Validates the current selection.
|
setFilters, setSelectedPath, setValidators
getSelectedPath, hide, isAccepted, isDismissed, setInitialDir, setVisible, show
activateDirectManipulation, adjustMinSize, adjustWidth, afterConfigUpdate, calculateHeight, calculateHeightDelta, captionHeight, compareColors, convertToStreamable, createMouseHoverAction, createScrollContainer, deactivateDirectManipulation, defaultFocus, destroy, doLayoutWorker, draw, drawDownFrame, drawUnderline, findMouseSource, frameContentBounds, getCustomMousePointer, getDialogDecorationCharSize, getDynamicLayout, getLabelHeight, getLabelWidth, getMaxFrameSize, getPortableMouseEventCoordinates, getResizeRectangle, getRowDelta, getTitleHeight, hasBox, initialize, isDirectManipulationRequired, isDroppable, location, mouseActions, physicalLocation, processCancelButton, processDefaultButton, processDirectManipulationEvent, realizeFrame, resetColors, setFocus, setOuterSize, supportsCustomMousePointer
adjustDown, adjustDown, allFramesVisible, applyConfig, arrangeToInteract, arrangeToStream, attachToWindow, calculateFrameRect, calculateWidthDelta, canSetColumn, canSetHeightChars, canSetRow, canSetWidthChars, clear, clearCurrent, clearWorker, clipping, config, copyState, currentFocus, doLayout, doLayout, draw, enableAllWidgets, enabledWidgetsByList, enterChoose, fixNonBody, forceBox, getBorderBottomChars, getBorderLeftChars, getBorderRightChars, getBorderTopChars, getChooseData, getChooseHelp, getContentPane, getCursor, getDown, getDownConfigs, getField, getField, getFirstEnabledWidget, getFirstFocusableId, getFirstFocusableId, getFixedHeight, getFocusId, getFrameValue, getFrameValue, getInnerSize, getIterationHeight, getIterationIds, getLeadingSkipSize, getMinHeight, getNextEnabledWidget, getNextTabItemList, getOriginalHeightChars, getRootFrame, getSavedDimension, getScopeNesting, getSelectedField, getSelectedWidget, getStreamId, getTrailingSkipSize, getValues, getZOrderClass, hasAnyEnabled, hasDefaultButton, hasEditors, hasEnabled, hasHeaders, hasSavedState, hasTitle, isActive, isAlive, isAllClear, isAttrSpace, isAutoplacing, isCanHide, isCanHideOthers, isCanWipeScreen, isChanged, isChooseActive, isConfigUpdateActive, isCurrentTouched, isDelayedRepaint, isDialog, isDown, isDownCalculated, isDynamic, isExplicitHide, isFixedWidth, isFocusAttractor, isFocusReset, isForcedRefresh, isForcePause, isForceWipeScreen, isHonorNextConditionalDown, isInChoose, isInScope, isInternalGo, isLabels, isLastWidget, isLeftMostWidget, isNeedPause, isNeedReset, isNoHide, isPendingFixedDown, isPendingUnderline, isPlacedForRedirected, isRedirected, isRightMostWidget, isRootFrame, isSideLabels, isStreamed, isThreeD, isTopFrame, isViewed, isVisibilityChanged, isWithHeaders, leaveChoose, markAsStreamed, markChanged, moveAboveWidget, moveBelowWidget, moveCursor, moveToBottom, moveToTop, moveWidgetBeforeTabItem, needClearRow, notifyClose, notifyPageBreak, notifyUnbind, placeAtTop, placed, placeToWindow, placeToWindow, postponePlace, postponeSetVisible, postprocess, postprocessConfig, prepareIteration, preprocess, previousFocus, processFrameMnemonic, processKeyEvent, rearrangeEditors, relayout, relocateComponent, repaint, repaintCurrent, repaintUninitialized, requestFocus, reset, resetAll, resetAutoplacing, resetChanged, resetForcedRefresh, resetNeedPause, resetPlacementQuirk, resetWidget, resolveWidgetId, restore, restoreEditors, restoreInitialTabOrder, scroll, setAlive, setAllClear, setAttrSpace, setBodyVisible, setBox, setCanHide, setCanHideOthers, setCanWipeScreen, setChooseAt, setColumns, setCurrentStatement, setCursor, setDelayedRepaint, setDown, setDynCol, setDynRow, setExplicitHide, setFocusAttractor, setFocusId, setFocusReset, setForcePause, setForceWipeScreen, setFormatCheck, setHeight, setHonorNextConditionalDown, setInnerSize, setInScope, setLabels, setLayout, setNeedPause, setNeedPauseDirect, setNeedReset, setNextTabItemList, setPaintable, setPendingFixedDown, setPendingUnderline, setProtected, setRedirected, setSavedDimension, setScopeNesting, setSensitive, setSize, setState, setValue, setValue, setViewed, setVisibilityChanged, setWidth, shortName, switchLabelsEmptyMode, toString, touchBody, touchRow, unbind, underline, updateInnerSize, view
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipRectangle, currentFocus, cycleFocus, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, firstFocus, focus, focusWorker, formatDump, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, prepareWidgets, prevFocus, reflectAncestorChange, reflectLocationChange, remove, removeContainerStateListener, replace, requestFocus, setFocusInt, setIgnoreFocus, setInsets, setSize, setTabItemList, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, width
_setHidden, _setVisible, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, hasFocus, hidden, highlighted, ignoreAction, isCurrent, isDirectManipulationCapable, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isTotallyObscured, isVisible, isVisible, manageSystemActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, prepParentLocation, processEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, showPopupMenu, sync, topLevelWindow, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, add, add, addContainerStateListener, childrenLocation, clipping, currentFocus, currentFocus, defaultFocus, detach, doLayout, endSizeChange, firstFocus, focus, get, getClipRect, getIgnoreFocus, getLayout, getTabItemList, hasFocusable, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, prevFocus, remove, removeContainerStateListener, replace, setFocus, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setWidth, startSizeChange, widgets, widgetsAsList
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, config, defaultMousePtr, destroy, dimension, displayPhysicalLocation, draw, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, height, hidden, highlighted, isCurrent, isDirectManipulable, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, supportsCustomMousePointer, topLevelWindow, unrealize, width, window
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
convertToStreamable
private static final java.util.logging.Logger LOG
private ImageWrapper<java.awt.image.BufferedImage> expImg
private ImageWrapper<java.awt.image.BufferedImage> colImg
private final int NATIVE_WIDTH
private final int NATIVE_HEIGHT
private final int NAV_PANE_HEIGHT
private final int TOOLS_PANE_HEIGHT
private final int FILENAME_PANE_HEIGHT_SA
private final int FILENAME_PANE_HEIGHT_OP
private final int SAVEAS_PANE_HEIGHT
private final int BUTTONS_PANE_HEIGHT_SA
private final int BUTTONS_PANE_HEIGHT_OP
private final int BOTTOM_INSET
private final int FILE_TYPE_ALIGN_SA
private static final int FOLDER_HEIGHT
private static final int FOLDER_TREE_WIDTH
private static final int FILE_TYPE_WIDTH_OP
protected GuiDriver gd
private CoordinatesConversion cc
private FileDialogGuiImpl.NavigationPane navigationPane
private SimpleImageButton navBack
private SimpleImageButton navForward
private SimpleImageButton recentLocations
private ButtonGuiImpl folderUp
private ComboBoxGuiImpl addressCbx
addressCbx
combobox allows the user to select one of previously visited locations
or to manually enter it.private ButtonGuiImpl refresh
private ComboBoxGuiImpl search
private volatile FileDialogGuiImpl.SearchOperation searchOp
private FileDialogGuiImpl.ToolsPane toolsPane
private ButtonGuiImpl organize
private ButtonGuiImpl newFolder
private ButtonGuiImpl view
private ButtonGuiImpl more
view
button but using a popup menu instead
of looping.private ButtonGuiImpl help
private FileDialogGuiImpl.FolderTree treePane
private ScrollPaneGuiImpl treeScroll
treePane
to be scrolled up and down.private FileDialogGuiImpl.Folder scFavorites
Favorite
shortcuts.private FileDialogGuiImpl.Folder scThisPC
this computer
.private FileDialogGuiImpl.Folder scNetwork
Network
shortcuts.private FileDialogGuiImpl.Folder crtFolder
private EmptyThumbView[] views
private ScrollPaneGuiImpl[] viewScrolls
private int currentView
private SimpleLabel filenameLabel
private LineEditor filename
private SimpleLabel saveasLabel
private ComboBoxGuiImpl fileTypeCbx
private ButtonGuiImpl hideFolders
private ButtonGuiImpl accept
OK
button. Validates the current selection and closes the dialog.private ButtonGuiImpl reject
Cancel
button. Rejects the dialog.private java.util.Deque<java.lang.String> history
Back
button.private java.util.Deque<java.lang.String> future
Back
button. To access
them use the Forward
navigation button.private java.lang.String activeFilter
private java.util.List<java.nio.file.Path> currentDirContent
private java.lang.String currentDir
private LineEditor rename
public FileDialogGuiImpl(WidgetId id, FrameConfig cfg)
id
- The WidgetId
of the dialog.cfg
- The FrameConfig
of the dialog.protected void init()
init
in class AbstractFileChooserDialog
private void updateTabbingList()
public boolean focusTraversable()
focusTraversable
in interface Widget<GuiOutputManager>
focusTraversable
in class AbstractContainer<GuiOutputManager>
true
.public void onAction(ActionEvent event)
onAction
in interface ActionListener
onAction
in class FileDialogImpl
event
- Event which triggered this call.private void renameCurrentFile(java.lang.String newName)
newName
- The new name for the selected file.private void validateSelection()
private void addToHistory(java.lang.String location)
location
this is a NO-OP.location
- The location to add.public void dismiss()
dismiss
in interface IsModal
dismiss
in class AbstractFileChooserDialog
private void openFolder(java.lang.String path, boolean clearForward)
path
- The absolute path of the folder or a name of a virtual folder (starts with
$
sign).clearForward
- If true
clears the forward stack (only in case of virtual folders).private void expandFolder(FileDialogGuiImpl.Folder folder)
folder
- The Folder
to be expanded.private void createNewFolder()
private void changeView(int newView)
newView
- The index of the view in views
.public void onSelect(ItemEvent event)
onSelect
in interface ItemListener
event
- Event which triggered this call.private void showHistory()
history
button was pressed.private MenuItemGuiImpl createHistoryMenu(java.lang.String strPath, int idx)
strPath
- The full path of the directory history entry.MenuItemGuiImpl
with requested constraints.private static MenuItemGuiImpl createMenuItem(java.lang.String menuLabel, boolean checked, java.lang.Runnable code)
menuLabel
- The text on the new item.checked
- true
if the item is checked.code
- The code to be executed when the menu item is clicked.MenuItemGuiImpl
with requested constraints.private void navigate(java.lang.String strPath)
strPath
- The new location to be presented to user, (absolute path).private static java.lang.String getPatternAsRegexp(java.lang.String activeFilter)
*
and ?
as wildcards) to a
combined regex expression. Individual filters are separated with ;
. Some symbols
that have special meanings in regexp are escaped.activeFilter
- A set of file selection patterns separated by ;
.private void updateNavButtons()
private void goBack()
history
stack and
navigate
s back to it.private void goForward()
future
stack and
navigate
s back to it.private void goUp()
UP
action. Computes the parent directory of the current location and, if
available navigates to it.private void refresh()
private void moreOptions()
private SimpleLabel createSimpleLabel(java.lang.String text, int w, int h, boolean rightAlign)
SimpleLabel
to be used on this dialog.text
- The text to be displayed.w
- The physical width of the label.h
- The physical height of the label.rightAlign
- Whether the text is right aligned.SimpleLabel
.private ButtonGuiImpl createButton(java.lang.String text, java.lang.String action, int width, int height, boolean flat, boolean def, java.lang.String tooltip)
Button
instance.private SimpleImageButton createImageButton(java.lang.String action, java.lang.String tooltip, int w, int h)
SimpleImageButton
to be used on this dialog.action
- The action to perform when button is clicked. The button used this to load the
appropriate image it will display.tooltip
- The text to be displayed when mouse hovers the button. Can be null
.w
- The physical width of the label.h
- The physical height of the label.SimpleImageButton
.private FileDialogGuiImpl.Folder createFolder(FileDialogGuiImpl.Folder parent, java.lang.String text, java.lang.String path, java.lang.String img)
Folder
to be used on this dialog. The new object is
automatically added to dirTree
container.parent
- The parent folder. null
if node is the root.text
- The text to be displayed on the button.path
- The absolute file path.img
- The image to be displayed on the button.SimpleImageButton
.private ComboBoxGuiImpl createCombobox(ComboBoxConfig.Mode mode, int x, int y, int w, int h, ControlSetItem[] items, java.lang.String selVal, java.lang.String format)
ComboBoxGuiImpl
to be used on this dialog.mode
- The type of combobox to be returned.x
- The physical X coordinate of the widget.y
- The physical Y coordinate of the widget.w
- The physical width of the widget.h
- The physical height of the widget.items
- An array of items to be used in the combobox.selVal
- The value to be selected bu default.format
- The format of the displayed data.ComboBoxGuiImpl
.private void setWidgetLocation(AbstractWidget widget, int x, int y, NativePoint rowOffset)
widget
- The widget to be 'moved'.x
- The new location on X axis (in pixels).y
- The new location on Y axis (in pixels).rowOffset
- The location of widget
's parent.private void setComboboxSize(ComboBoxGuiImpl cbx, int width, int height)
cbx
- The combobox widget to be altered.width
- The new width for the combobox (in native units / pixels).height
- The new height for the combobox (in native units / pixels).public void addWidget(Widget<GuiOutputManager> widget)
widget
.addWidget
in class Frame<GuiOutputManager>
widget
- The new widget to be added to the container.public void addWidgetToPane(Widget<GuiOutputManager> widget, AbstractContainer container)
widget
.widget
- The new widget to be added to the container.