public class FileChooserDialogImpl extends DialogWrapper implements FileChooserDialog, PathChooserDialog, FileLookup
Modifier and Type | Class and Description |
---|---|
protected class |
FileChooserDialogImpl.MyPanel |
DialogWrapper.CancelAction, DialogWrapper.DialogStyle, DialogWrapper.DialogWrapperAction, DialogWrapper.DialogWrapperExitAction, DialogWrapper.DoNotAskOption, DialogWrapper.IdeModalityType, DialogWrapper.OkAction
FileLookup.Finder, FileLookup.LookupFile, FileLookup.LookupFilter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DRAG_N_DROP_HINT |
static java.lang.String |
FILE_CHOOSER_SHOW_PATH_PROPERTY |
protected FileSystemTreeImpl |
myFileSystemTree |
protected FileTextFieldImpl |
myPathTextField |
CANCEL_EXIT_CODE, CLOSE_EXIT_CODE, DEFAULT_ACTION, DIALOG_CONTENT_PANEL_PROPERTY, ERROR_FOREGROUND_COLOR, FOCUSED_ACTION, IS_VISUAL_PADDING_COMPENSATED_ON_COMPONENT_LEVEL_KEY, myCancelAction, myCheckBoxDoNotShowDialog, myDisposable, myHelpAction, myOKAction, myPerformAction, myPreferredFocusedComponent, NEXT_USER_EXIT_CODE, OK_EXIT_CODE
PREFER_LAST_OVER_TO_SELECT
PREFER_LAST_OVER_EXPLICIT
Constructor and Description |
---|
FileChooserDialogImpl(FileChooserDescriptor descriptor,
java.awt.Component parent) |
FileChooserDialogImpl(FileChooserDescriptor descriptor,
java.awt.Component parent,
Project project) |
FileChooserDialogImpl(FileChooserDescriptor descriptor,
Project project) |
Modifier and Type | Method and Description |
---|---|
VirtualFile [] |
choose(Project project,
VirtualFile... toSelect)
Choose one or more files
|
void |
choose(VirtualFile toSelect,
Consumer<? super java.util.List<VirtualFile>> callback) |
VirtualFile [] |
choose(VirtualFile toSelect,
Project project) |
protected DefaultActionGroup |
createActionGroup() |
protected javax.swing.JComponent |
createCenterPanel()
Factory method.
|
protected javax.swing.JPanel |
createExtraToolbarPanel() |
protected Tree |
createInternalTree() |
protected javax.swing.JComponent |
createTitlePane() |
protected javax.swing.JTree |
createTree() |
void |
dispose()
Dispose the wrapped and releases all resources allocated be the wrapper to help
more efficient garbage collection.
|
void |
doCancelAction()
This method is invoked by default implementation of "Cancel" action.
|
protected void |
doOKAction()
This method is invoked by default implementation of "OK" action.
|
protected java.lang.String |
getDimensionServiceKey()
Returns key for persisting dialog dimensions.
|
protected java.lang.String |
getHelpId()
Returns the help identifier, or
null if no help is available. |
javax.swing.JComponent |
getPreferredFocusedComponent() |
protected void |
restoreSelection(VirtualFile toSelect) |
void |
toggleShowTextField() |
addKeyListener, addMouseListener, addMouseListener, canRecordDialogId, centerRelativeToParent, cleanupRootPane, cleanupWindowListeners, clickDefaultButton, close, close, createActions, createButtonsPanel, createCancelAction, createContentPane, createContentPaneBorder, createDefaultActions, createDefaultBorder, createDoNotAskCheckbox, createHelpButton, createJButtonForAction, createJButtonForAction, createLeftSideActions, createNorthPanel, createPeer, createPeer, createPeer, createPeer, createPeer, createPeer, createRootLayout, createSouthAdditionalPanel, createSouthPanel, disposeIfNeeded, doCancelAction, doHelpAction, doValidate, doValidateAll, extractMnemonic, findInstance, findInstanceFromFocus, getButton, getCancelAction, getContentPane, getContentPanel, getDimensionKey, getDisposable, getDoNotShowMessage, getErrorTextAlignment, getExitCode, getHelpAction, getHorizontalStretch, getInitialLocation, getLocation, getOKAction, getOwner, getPeer, getPreferredSize, getRootPane, getSize, getStyle, getTitle, getTypeAheadTimeoutMs, getValidationThreadToUse, getVerticalStretch, getWindow, hasErrors, init, initValidation, isAutoAdjustable, isCenterStrictedToPreferredSize, isDisposed, isModal, isModalProgress, isMoveHelpButtonLeft, isNorthStrictedToPreferredSize, isOK, isOKActionEnabled, isProgressDialog, isResizable, isShowing, isSouthStrictedToPreferredSize, isToDispatchTypeAhead, isTypeAheadEnabled, isVisible, layoutButtonsPanel, pack, postponeValidation, processDoNotAskOnOk, repaint, setAutoAdjustable, setButtonsAlignment, setButtonsMargin, setCancelButtonIcon, setCancelButtonText, setCrossClosesWindow, setDoNotAskOption, setErrorInfoAll, setErrorText, setErrorText, setHelpTooltip, setHorizontalStretch, setInitialLocationCallback, setLocation, setLocation, setModal, setOKActionEnabled, setOKButtonIcon, setOKButtonMnemonic, setOKButtonText, setOKButtonTooltip, setResizable, setSize, setTitle, setUndecorated, setValidationDelay, setVerticalStretch, shouldAddErrorNearButtons, shouldCloseOnCross, show, showAndGet, showAndGetOk, startTrackingValidation, toBack, toBeShown, toFront, unregisterKeyboardActions, updateErrorInfo, validate
public static final java.lang.String FILE_CHOOSER_SHOW_PATH_PROPERTY
public static final java.lang.String DRAG_N_DROP_HINT
protected FileSystemTreeImpl myFileSystemTree
protected FileTextFieldImpl myPathTextField
public FileChooserDialogImpl(FileChooserDescriptor descriptor, Project project)
public FileChooserDialogImpl(FileChooserDescriptor descriptor, java.awt.Component parent)
public FileChooserDialogImpl(FileChooserDescriptor descriptor, java.awt.Component parent, Project project)
public VirtualFile [] choose(Project project, VirtualFile... toSelect)
FileChooserDialog
choose
in interface FileChooserDialog
project
- use this project (you may pass null if you already set project in ctor)toSelect
- files to be selected automatically.public VirtualFile [] choose(VirtualFile toSelect, Project project)
choose
in interface FileChooserDialog
public void choose(VirtualFile toSelect, Consumer<? super java.util.List<VirtualFile>> callback)
choose
in interface PathChooserDialog
protected void restoreSelection(VirtualFile toSelect)
protected DefaultActionGroup createActionGroup()
protected final javax.swing.JComponent createTitlePane()
createTitlePane
in class DialogWrapper
protected javax.swing.JComponent createCenterPanel()
DialogWrapper
null
value. In this case there will be no options panel.createCenterPanel
in class DialogWrapper
protected javax.swing.JPanel createExtraToolbarPanel()
public javax.swing.JComponent getPreferredFocusedComponent()
getPreferredFocusedComponent
in class DialogWrapper
public final void dispose()
DialogWrapper
dispose
.dispose
in class DialogWrapper
protected void doOKAction()
DialogWrapper
OK_EXIT_CODE
. This is convenient place to override functionality of "OK" action.
Note that the method does nothing if "OK" action isn't enabled.doOKAction
in class DialogWrapper
public final void doCancelAction()
DialogWrapper
CANCEL_EXIT_CODE
. This is convenient place to override functionality of "Cancel" action.
Note that the method does nothing if "Cancel" action isn't enabled.doCancelAction
in class DialogWrapper
protected javax.swing.JTree createTree()
protected Tree createInternalTree()
public void toggleShowTextField()
protected java.lang.String getDimensionServiceKey()
DialogWrapper
null
(no persisting).getDimensionServiceKey
in class DialogWrapper
protected java.lang.String getHelpId()
DialogWrapper
null
if no help is available.getHelpId
in class DialogWrapper