public class DirDialogGuiImpl extends AbstractFileChooserDialog implements ActionListener
Modifier and Type | Class and Description |
---|---|
private class |
DirDialogGuiImpl.DirChooserLayoutManager
The
LayoutManager that handles the placement and size of the widgets on this dialog. |
private class |
DirDialogGuiImpl.Folder
A thumbnail for a directory.
|
private class |
DirDialogGuiImpl.FolderTree
A dedicated container for holding the shortcuts in a vertical flow.
|
FrameGuiImpl.GuiScrollContainer
Frame.ScrollContainer
Modifier and Type | Field and Description |
---|---|
private ButtonGuiImpl |
accept
The
OK button. |
private CoordinatesConversion |
cc
Cached coordinates.
|
private ImageWrapper<java.awt.image.BufferedImage> |
colImg
The icon that marks a folder to be collapsed, usually a right arrow or [+].
|
private DirDialogGuiImpl.Folder |
crtFolder
The folder that is currently selected.
|
private FillInGuiImpl |
dirName
The directory name editor should allow the user to manually enter the name of the folder.
|
private DirDialogGuiImpl.FolderTree |
dirTree
The container that holds the file-system tree.
|
private ImageWrapper<java.awt.image.BufferedImage> |
expImg
The icon that marks a folder to be expanded, usually a down arrow or [-].
|
private int |
FOLDER_HEIGHT
The height of the folders in tree.
|
protected GuiDriver |
gd
Cached driver.
|
private java.util.logging.Logger |
LOG
Logger for all related classes.
|
private SimpleLabel |
nameLabel
A label for directory name editor.
|
private int |
NATIVE_HEIGHT
The native height of the dialog.
|
private int |
NATIVE_WIDTH
The native width of the dialog.
|
private ButtonGuiImpl |
newFolder
The
Make New Folder button. |
private ButtonGuiImpl |
reject
The
Cancel button. |
private DirDialogGuiImpl.Folder |
thisPC
Cache
This PC folder. |
private java.lang.String |
title
The title of the dialog.
|
private SimpleLabel |
titleLabel
A label that displays the title.
|
private ScrollPaneGuiImpl |
treeScroll
The scroll pane that allows the
dirTree to be scrolled up and down. |
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 |
---|
DirDialogGuiImpl(WidgetId fid,
FrameConfig fCfg)
The constructor build an object by forwarding the required parameters to super class.
|
Modifier and Type | Method and Description |
---|---|
void |
addWidget(Widget<GuiOutputManager> widget)
Adding new widget to the container.
|
private ButtonGuiImpl |
createButton(java.lang.String text,
java.lang.String action,
int w,
int h,
boolean def)
Creates and initializes a button widget.
|
private DirDialogGuiImpl.Folder |
createFolder(DirDialogGuiImpl.Folder parent,
java.lang.String text,
java.lang.String path,
int xOffset,
java.lang.String img)
Creates a customized
Folder to be used on this dialog. |
private SimpleLabel |
createSimpleLabel(java.lang.String text,
int w,
int h)
Creates a customized
SimpleLabel to be used on this dialog. |
protected void |
init()
Initialize the dialog by performing tasks that was not possible in the constructor because
it was not fully created.
|
void |
onAction(ActionEvent event)
This method is invoked when action event is generated.
|
private void |
populateVirtualFolder(DirDialogGuiImpl.Folder folder,
java.lang.String virtualLocation)
Populates a virtual folder.
|
private DirDialogGuiImpl.Folder |
selectPath(java.nio.file.Path path)
Recursively creates a path (in $THIS-PC/$drive/..) of expanded folders and returns the last
folder component.
|
void |
setTitle(java.lang.String title)
Sets the title of this dir chooser dialog.
|
dismiss, getSelectedPath, hide, isAccepted, isDismissed, setInitialDir, setSelectedPath, 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, focusTraversable, 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, focusTraversable, 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 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 FOLDER_HEIGHT
protected GuiDriver gd
private CoordinatesConversion cc
private DirDialogGuiImpl.FolderTree dirTree
private ScrollPaneGuiImpl treeScroll
dirTree
to be scrolled up and down.private SimpleLabel titleLabel
private SimpleLabel nameLabel
private FillInGuiImpl dirName
private ButtonGuiImpl newFolder
Make New Folder
button.private ButtonGuiImpl accept
OK
button. Validates the current selection and closes the dialog.private ButtonGuiImpl reject
Cancel
button. Rejects the dialog.private java.lang.String title
private DirDialogGuiImpl.Folder crtFolder
private DirDialogGuiImpl.Folder thisPC
This PC
folder.public DirDialogGuiImpl(WidgetId fid, FrameConfig fCfg)
fid
- The WidgetId
of the dialog.fCfg
- The FrameConfig
of the dialog.public void setTitle(java.lang.String title)
title
- The new title.protected void init()
init
in class AbstractFileChooserDialog
public void onAction(ActionEvent event)
onAction
in interface ActionListener
event
- Event which triggered this call.public void addWidget(Widget<GuiOutputManager> widget)
widget
.addWidget
in class Frame<GuiOutputManager>
widget
- The new widget to be added to the container.private SimpleLabel createSimpleLabel(java.lang.String text, int w, int h)
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.SimpleLabel
.private ButtonGuiImpl createButton(java.lang.String text, java.lang.String action, int w, int h, boolean def)
Button
instance.private DirDialogGuiImpl.Folder createFolder(DirDialogGuiImpl.Folder parent, java.lang.String text, java.lang.String path, int xOffset, 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.xOffset
- The indentation of the image and text on the button.img
- The image to be displayed on the button.SimpleImageButton
.private void populateVirtualFolder(DirDialogGuiImpl.Folder folder, java.lang.String virtualLocation)
folder
- The folder to be populated.virtualLocation
- The virtual location path (the $ prefix dropped).private DirDialogGuiImpl.Folder selectPath(java.nio.file.Path path)
path
- The path to be created