public class FileDialogImpl extends AbstractFileChooserDialog implements ActionListener
FrameGuiImpl.GuiScrollContainer
Frame.ScrollContainer
Modifier and Type | Field and Description |
---|---|
protected boolean |
askOverwrite
The dialog will asl whether the user allows the file to be overwritten.
|
protected boolean |
createTestFile
The dialog creates a temporary file at the chosen location to validate the write access.
|
private java.lang.String |
defaultExtension
The default extension for the selected files.
|
protected java.lang.String[] |
filters
The set of filters, with their labels.
|
protected int |
initialFilter
The index of initial filter to be preselected when the dialog opens.
|
protected boolean |
mustExist
The dialog does not allow to select files that do not exist.
|
protected java.lang.String |
preferredTitle
The preferred title, if any set by ABL programmer.
|
protected boolean |
saveAs
Flags "Save As" dialogs.
|
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 |
---|
FileDialogImpl(WidgetId id,
FrameConfig cfg)
The constructor build an object by forwarding the required parameters to super class.
|
Modifier and Type | Method and Description |
---|---|
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)
Configures the filters in the current dialog.
|
void |
setSelectedPath(java.lang.String path)
Sets the value to be returned by the dialog.
|
void |
setValidators(boolean saveAs,
boolean askOverwrite,
boolean createTestFile,
boolean mustExist)
Configures additional constraints for the file to be selected.
|
dismiss, getSelectedPath, hide, init, 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
addWidget, 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
protected java.lang.String preferredTitle
protected boolean saveAs
protected boolean askOverwrite
protected boolean createTestFile
protected boolean mustExist
protected java.lang.String[] filters
protected int initialFilter
private java.lang.String defaultExtension
public FileDialogImpl(WidgetId id, FrameConfig cfg)
id
- The WidgetId
of the dialog.cfg
- The FrameConfig
of the dialog.public void setFilters(java.lang.String[] filters, int initialFilter, java.lang.String defaultExtension)
filters
- The set of filters, with their labels. The array must have an even size.initialFilter
- The index of initial filter to be preselected when the dialog opens.defaultExtension
- The default extension for the selected files.public void setValidators(boolean saveAs, boolean askOverwrite, boolean createTestFile, boolean mustExist)
saveAs
- true
if this is gonna be a save-as dialog.askOverwrite
- If true
the dialog ask user permission to return an existing file (that can
be later overwritten programmatically).createTestFile
- If true
the dialog checks the write access right by creating a temporary
file. If this fail, the user is not allowed to select a file in that location.mustExist
- If true
the user is only allowed to select a file that already exist.public void setSelectedPath(java.lang.String path)
path
do not
have an extension, the defaultExtension
is set, if defined.setSelectedPath
in class AbstractFileChooserDialog
path
- The full path of the selected file.public void onAction(ActionEvent event)
onAction
in interface ActionListener
event
- Event which triggered this call.