public abstract class ChooseElementsDialog<T> extends DialogWrapper
DialogWrapper.CancelAction, DialogWrapper.DialogStyle, DialogWrapper.DialogWrapperAction, DialogWrapper.DialogWrapperExitAction, DialogWrapper.DoNotAskOption, DialogWrapper.IdeModalityType, DialogWrapper.OkAction
Modifier and Type | Field and Description |
---|---|
protected ElementsChooser<T> |
myChooser |
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
Constructor and Description |
---|
ChooseElementsDialog(java.awt.Component parent,
java.util.List<? extends T> items,
java.lang.String title) |
ChooseElementsDialog(java.awt.Component parent,
java.util.List<? extends T> items,
java.lang.String title,
java.lang.String description,
boolean sort) |
ChooseElementsDialog(Project project,
java.util.List<? extends T> items,
java.lang.String title,
java.lang.String description) |
ChooseElementsDialog(Project project,
java.util.List<? extends T> items,
java.lang.String title,
java.lang.String description,
boolean sort) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canElementsBeMarked() |
protected javax.swing.JComponent |
createCenterPanel()
Factory method.
|
java.util.List<T> |
getChosenElements() |
protected abstract javax.swing.Icon |
getItemIcon(T item) |
protected java.lang.String |
getItemLocation(T item)
Override this method and return non-null value to specify location of
item . |
protected abstract java.lang.String |
getItemText(T item) |
java.util.List<T> |
getMarkedElements() |
javax.swing.JComponent |
getPreferredFocusedComponent() |
protected boolean |
isElementMarkedByDefault(T element) |
void |
selectElements(java.util.List<? extends T> elements) |
java.util.List<T> |
showAndGetResult() |
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, createTitlePane, dispose, disposeIfNeeded, doCancelAction, doCancelAction, doHelpAction, doOKAction, doValidate, doValidateAll, extractMnemonic, findInstance, findInstanceFromFocus, getButton, getCancelAction, getContentPane, getContentPanel, getDimensionKey, getDimensionServiceKey, getDisposable, getDoNotShowMessage, getErrorTextAlignment, getExitCode, getHelpAction, getHelpId, 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
protected ElementsChooser<T> myChooser
public ChooseElementsDialog(Project project, java.util.List<? extends T> items, java.lang.String title, java.lang.String description)
public ChooseElementsDialog(Project project, java.util.List<? extends T> items, java.lang.String title, java.lang.String description, boolean sort)
public ChooseElementsDialog(java.awt.Component parent, java.util.List<? extends T> items, java.lang.String title)
public ChooseElementsDialog(java.awt.Component parent, java.util.List<? extends T> items, java.lang.String title, java.lang.String description, boolean sort)
protected boolean canElementsBeMarked()
getMarkedElements()
,
isElementMarkedByDefault(Object)
public java.util.List<T> showAndGetResult()
protected abstract java.lang.String getItemText(T item)
protected abstract javax.swing.Icon getItemIcon(T item)
protected java.lang.String getItemLocation(T item)
item
.
It will be shown as grayed text next to the item text
.public java.util.List<T> getChosenElements()
public void selectElements(java.util.List<? extends T> elements)
public javax.swing.JComponent getPreferredFocusedComponent()
getPreferredFocusedComponent
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 boolean isElementMarkedByDefault(T element)
canElementsBeMarked()
returns truepublic java.util.List<T> getMarkedElements()
canElementsBeMarked()
returns trueisElementMarkedByDefault(Object)