public class FileDialogImpl extends AbstractFileChooserDialog implements ActionListener
TopLevelWindow.IconDataType
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
protected boolean |
askOverwrite |
protected boolean |
createTestFile |
protected java.lang.String |
defaultExtension |
protected java.lang.String[] |
filters |
protected int |
initialFilter |
protected boolean |
mustExist |
protected java.lang.String |
preferredTitle |
protected boolean |
saveAs |
protected java.lang.String |
selectedFile |
protected WidgetFactory |
widgetFactory |
accepted, initialDir
contentPane, gd, windowPane
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
FileDialogImpl(java.lang.String title,
int parentWindow)
The constructor build an object by forwarding the required parameters to super class.
|
Modifier and Type | Method and Description |
---|---|
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 |
onAction(ActionEvent event)
This method is invoked when action event is generated.
|
void |
setFilters(java.lang.String[] filters,
int initialFilter,
java.lang.String defaultExtension) |
void |
setSelectedFile(java.lang.String path) |
void |
setValidators(boolean saveAs,
boolean askOverwrite,
boolean createTestFile,
boolean mustExist) |
hide, init, isAccepted, setInitialDir, setVisible, show
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 preferredTitle
protected WidgetFactory widgetFactory
protected boolean saveAs
protected boolean askOverwrite
protected boolean createTestFile
protected boolean mustExist
protected java.lang.String[] filters
protected int initialFilter
protected java.lang.String defaultExtension
protected java.lang.String selectedFile
public FileDialogImpl(java.lang.String title, int parentWindow)
title
- The title of the dialog, if known.parentWindow
- The window id of the parent frame of this dialog.public void setFilters(java.lang.String[] filters, int initialFilter, java.lang.String defaultExtension)
public void setValidators(boolean saveAs, boolean askOverwrite, boolean createTestFile, boolean mustExist)
public void setSelectedFile(java.lang.String path)
public java.lang.String getSelection()
AbstractFileChooserDialog
getSelection
in class AbstractFileChooserDialog
null
if the dialog was not
open yet or it was rejected (by pressing Cancel
button).public void onAction(ActionEvent event)
onAction
in interface ActionListener
event
- Event which triggered this call.