public abstract class AbstractFileChooserDialog extends ModalWindow
TopLevelWindow.IconDataType
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
protected boolean |
accepted
Flag that turns to true only if the user closed the dialog by accepting it.
|
protected java.lang.String |
initialDir
The initial location the dialog shows to the user, if set.
|
contentPane, gd, windowPane
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
AbstractFileChooserDialog(java.lang.String title,
int parentWindowId)
The constructor build an object by forwarding the required parameters to super class.
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
getSelection()
If the dialog was accepted this method returns the full path of the entity (file/directory)
the user has chosen.
|
void |
hide()
Hide widget.
|
protected void |
init()
Initialize the dialog by performing tasks that was not possible in the constructor because
it was not fully created.
|
boolean |
isAccepted()
Checks whether the user accepted the selection from the dialog.
|
void |
setInitialDir(java.lang.String initialDir)
Configures the initial directory (the location where the dialog opens).
|
void |
setVisible(boolean visible)
Make the dialog visible and allowing the user to select the entity as the dialog was
configured.
|
void |
show()
Show widget.
|
coordinates, destroy, doLayout, draw, findMouseSource, getBorder, getColorResolver, getContentPane, getGuiMessageArea, getId, getMaxWorkspaceSize, getMessageArea, getMinSize, getPortableMouseEventCoordinates, getResizedSize, getScreenDimension, getStatusArea, getTitleBar, getWorkspaceNativeSize, getWorkspaceScreenLocation, getWorkspaceSize, hasDecorations, hasTitlebar, iconify, iconify, iconify, isModal, isRealized, isResizeWorkspace, isResizing, maximize, maximize, realize, resizeTo, resolveOwner, restore, restore, restore, setSize, setWorkspaceLocation, setWorkspaceNativeSize
addFrame, ancestor, bounds, clipRectangle, close, defaultFocus, findFrames, findFrames, getFirstVisibleFrame, getFrames, getNextEnabledFrame, getNextVisibleFrame, getOwner, getOwnerOpt, getPlacementManager, getPrevEnabledFrame, getTopFrame, getTopVisibleFrame, getWindowDefaultIcon, isFocusable, isMaximized, loadWindowIcon, parentOrSelfHidden, physicalBounds, processEvent, processFocusEvent, repaint, repaintDecorations, resolveTitleFont, screenLocation, screenPhysicalLocation, setLocation, setOwner, setPhysicalLocation, setWindowDefaultIcon, setWindowIcon, window
drawInt
destroyWidgets, focusTraversable, getZOrderClass, hasFocus, hasTitle, isDisplayed, processKeyEvent, setTitle, title, toString
add, add, add, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, currentFocus, cycleFocus, detach, dimension, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getWidgetsList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, prepareWidgets, prevFocus, remove, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setWidth, startSizeChange, unrealize, updateSizeWorker, widgets, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestorId, autoResize, clear, clearWidget, clipRectangle, clipWith, config, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, hidden, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isEnabled, isHeader, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, screen, screenDimension, screenHeight, screenWidth, setBitmap, setEnabled, setHidden, setHighlighted, setLocation, setMousePointer, setParent, setState, supportsCustomMousePointer, sync, topLevelWindow, translate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, isMaximized, isShareActivationWithOwner, loadWindowIcon, resizeTo, resolveTitleFont, setLocation, setPhysicalLocation, setWindowIcon
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, config, defaultMousePtr, dimension, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, height, hidden, highlighted, insets, isDirectManipulable, isDisplayed, isEnabled, isFocusable, isHeader, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestFocus, requestSync, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setMousePointer, setParent, setState, supportsCustomMousePointer, topLevelWindow, unrealize, width, window
protected java.lang.String initialDir
protected boolean accepted
public AbstractFileChooserDialog(java.lang.String title, int parentWindowId)
title
- The title of the dialog, if known.parentWindowId
- The window id of the parent frame of this dialog.public boolean isAccepted()
true
if the dialog was accepted, and false
if the dialog was not
yet displayed or it was rejected by user.public void setInitialDir(java.lang.String initialDir)
initialDir
- The initial directory for this dialog.public abstract java.lang.String getSelection()
null
if the dialog was not
open yet or it was rejected (by pressing Cancel
button).public void setVisible(boolean visible)
setVisible
in interface Widget<GuiOutputManager>
setVisible
in class AbstractWidget<GuiOutputManager>
visible
- true
shows the dialog, false
hides it.public void show()
show
in interface Widget<GuiOutputManager>
show
in class ModalWindow
public void hide()
hide
in interface Widget<GuiOutputManager>
hide
in class ModalWindow
protected void init()