public class MemberChooser<T extends ClassMember> extends DialogWrapper implements TypeSafeDataProvider
Modifier and Type | Class and Description |
---|---|
protected static class |
MemberChooser.ContainerNode |
protected static interface |
MemberChooser.ElementNode |
protected static class |
MemberChooser.ElementNodeImpl |
protected static interface |
MemberChooser.MemberNode |
protected static class |
MemberChooser.MemberNodeImpl |
protected static class |
MemberChooser.OrderComparator |
protected static class |
MemberChooser.ParentNode |
protected class |
MemberChooser.ShowContainersAction |
DialogWrapper.CancelAction, DialogWrapper.DialogStyle, DialogWrapper.DialogWrapperAction, DialogWrapper.DialogWrapperExitAction, DialogWrapper.DoNotAskOption, DialogWrapper.IdeModalityType, DialogWrapper.OkAction
Modifier and Type | Field and Description |
---|---|
protected boolean |
myAllowEmptySelection |
protected java.util.Comparator<MemberChooser.ElementNode> |
myComparator |
protected java.util.ArrayList<MemberChooser.ContainerNode> |
myContainerNodes |
protected T[] |
myElements |
protected java.util.HashMap<ClassMember,MemberChooser.MemberNode> |
myElementToNodeMap |
protected java.util.HashMap<MemberChooser.MemberNode,MemberChooser.ParentNode> |
myNodeToParentMap |
protected javax.swing.JComponent[] |
myOptionControls |
protected java.util.LinkedHashSet<T> |
mySelectedElements |
protected Tree |
myTree |
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
Modifier | Constructor and Description |
---|---|
protected |
MemberChooser(boolean allowEmptySelection,
boolean allowMultiSelection,
Project project,
boolean isInsertOverrideVisible,
javax.swing.JComponent headerPanel,
javax.swing.JComponent [] optionControls) |
|
MemberChooser(T[] elements,
boolean allowEmptySelection,
boolean allowMultiSelection,
Project project) |
|
MemberChooser(T[] elements,
boolean allowEmptySelection,
boolean allowMultiSelection,
Project project,
boolean isInsertOverrideVisible) |
|
MemberChooser(T[] elements,
boolean allowEmptySelection,
boolean allowMultiSelection,
Project project,
boolean isInsertOverrideVisible,
javax.swing.JComponent headerPanel) |
|
MemberChooser(T[] elements,
boolean allowEmptySelection,
boolean allowMultiSelection,
Project project,
javax.swing.JComponent headerPanel,
javax.swing.JComponent[] optionControls) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
areElementsSelected() |
void |
calcData(DataKey key,
DataSink sink) |
protected void |
changeSortComparator(java.util.Comparator<T> comparator) |
protected java.lang.String |
convertElementText(java.lang.String originalElementText) |
protected javax.swing.Action [] |
createActions()
Creates actions for dialog.
|
protected javax.swing.JComponent |
createCenterPanel()
Factory method.
|
protected MemberChooser.MemberNode |
createMemberNode(Ref<java.lang.Integer> count,
T object,
MemberChooser.ParentNode parentNode) |
protected javax.swing.JComponent |
createNorthPanel()
Factory method.
|
protected javax.swing.JComponent |
createSouthPanel()
Creates panel located at the south of the content pane.
|
protected Tree |
createTree() |
protected void |
customizeOptionsPanel() |
protected void |
defaultExpandTree() |
protected void |
disableAlphabeticalSorting(AnActionEvent event) |
void |
dispose()
Dispose the wrapped and releases all resources allocated be the wrapper to help
more efficient garbage collection.
|
protected void |
doSort() |
protected void |
fillToolbarActions(DefaultActionGroup group) |
protected java.lang.String |
getAllContainersNodeName() |
protected java.lang.String |
getDimensionServiceKey()
Returns key for persisting dialog dimensions.
|
javax.swing.JComponent[] |
getOptionControls() |
javax.swing.JComponent |
getPreferredFocusedComponent() |
protected javax.swing.tree.DefaultMutableTreeNode |
getRootNode() |
java.util.List<T> |
getSelectedElements() |
T [] |
getSelectedElements(T[] a) |
protected MemberChooser.ShowContainersAction |
getShowContainersAction() |
protected SpeedSearchComparator |
getSpeedSearchComparator() |
protected javax.swing.tree.TreeCellRenderer |
getTreeCellRenderer() |
protected void |
installSpeedSearch() |
protected boolean |
isContainerNode(MemberChooserObject key) |
boolean |
isCopyJavadoc() |
boolean |
isInsertOverrideAnnotation() |
protected boolean |
isInsertOverrideAnnotationSelected() |
protected void |
onAlphabeticalSortingEnabled(AnActionEvent event) |
void |
resetElements(T[] elements) |
void |
resetElements(T[] elements,
java.util.Comparator<T> sortComparator,
boolean restoreSelectedElements) |
protected void |
resetElementsWithDefaultComparator(T[] elements) |
protected void |
restoreTree() |
void |
selectElements(ClassMember[] elements) |
void |
setCopyJavadocVisible(boolean state) |
protected void |
setShowClasses(boolean showClasses) |
protected boolean |
supportsNestedContainers() |
addKeyListener, addMouseListener, addMouseListener, canRecordDialogId, centerRelativeToParent, cleanupRootPane, cleanupWindowListeners, clickDefaultButton, close, close, createButtonsPanel, createCancelAction, createContentPane, createContentPaneBorder, createDefaultActions, createDefaultBorder, createDoNotAskCheckbox, createHelpButton, createJButtonForAction, createJButtonForAction, createLeftSideActions, createPeer, createPeer, createPeer, createPeer, createPeer, createPeer, createRootLayout, createSouthAdditionalPanel, createTitlePane, disposeIfNeeded, doCancelAction, doCancelAction, doHelpAction, doOKAction, doValidate, doValidateAll, extractMnemonic, findInstance, findInstanceFromFocus, getButton, getCancelAction, getContentPane, getContentPanel, getDimensionKey, 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 Tree myTree
protected javax.swing.JComponent[] myOptionControls
protected boolean myAllowEmptySelection
protected T extends ClassMember[] myElements
protected java.util.Comparator<MemberChooser.ElementNode> myComparator
protected final java.util.HashMap<MemberChooser.MemberNode,MemberChooser.ParentNode> myNodeToParentMap
protected final java.util.HashMap<ClassMember,MemberChooser.MemberNode> myElementToNodeMap
protected final java.util.ArrayList<MemberChooser.ContainerNode> myContainerNodes
protected java.util.LinkedHashSet<T extends ClassMember> mySelectedElements
public MemberChooser(T[] elements, boolean allowEmptySelection, boolean allowMultiSelection, Project project, javax.swing.JComponent headerPanel, javax.swing.JComponent[] optionControls)
public MemberChooser(T[] elements, boolean allowEmptySelection, boolean allowMultiSelection, Project project)
public MemberChooser(T[] elements, boolean allowEmptySelection, boolean allowMultiSelection, Project project, boolean isInsertOverrideVisible)
public MemberChooser(T[] elements, boolean allowEmptySelection, boolean allowMultiSelection, Project project, boolean isInsertOverrideVisible, javax.swing.JComponent headerPanel)
protected MemberChooser(boolean allowEmptySelection, boolean allowMultiSelection, Project project, boolean isInsertOverrideVisible, javax.swing.JComponent headerPanel, javax.swing.JComponent [] optionControls)
protected void resetElementsWithDefaultComparator(T[] elements)
public void resetElements(T[] elements)
public void resetElements(T[] elements, java.util.Comparator<T> sortComparator, boolean restoreSelectedElements)
protected MemberChooser.MemberNode createMemberNode(Ref<java.lang.Integer> count, T object, MemberChooser.ParentNode parentNode)
protected boolean supportsNestedContainers()
protected void defaultExpandTree()
protected boolean isContainerNode(MemberChooserObject key)
public void selectElements(ClassMember[] elements)
protected javax.swing.Action [] createActions()
DialogWrapper
DialogWrapper.getHelpId()
returns non-null value.
Each action is represented by JButton
created by DialogWrapper.createJButtonForAction(Action)
.
These buttons are then placed into south panel
of dialog.createActions
in class DialogWrapper
DialogWrapper.createSouthPanel()
,
DialogWrapper.createJButtonForAction(javax.swing.Action)
protected void customizeOptionsPanel()
protected boolean isInsertOverrideAnnotationSelected()
protected javax.swing.JComponent createSouthPanel()
DialogWrapper
createActions()
and createJButtonForAction(Action)
methods to construct the panel.createSouthPanel
in class DialogWrapper
protected javax.swing.JComponent createNorthPanel()
DialogWrapper
null
value. In this case there will be no input panel.createNorthPanel
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 Tree createTree()
protected javax.swing.tree.TreeCellRenderer getTreeCellRenderer()
protected java.lang.String convertElementText(java.lang.String originalElementText)
protected void installSpeedSearch()
protected SpeedSearchComparator getSpeedSearchComparator()
protected void disableAlphabeticalSorting(AnActionEvent event)
protected void onAlphabeticalSortingEnabled(AnActionEvent event)
protected void fillToolbarActions(DefaultActionGroup group)
protected java.lang.String getDimensionServiceKey()
DialogWrapper
null
(no persisting).getDimensionServiceKey
in class DialogWrapper
public javax.swing.JComponent getPreferredFocusedComponent()
getPreferredFocusedComponent
in class DialogWrapper
public javax.swing.JComponent[] getOptionControls()
public java.util.List<T> getSelectedElements()
protected final boolean areElementsSelected()
public void setCopyJavadocVisible(boolean state)
public boolean isCopyJavadoc()
public boolean isInsertOverrideAnnotation()
protected void changeSortComparator(java.util.Comparator<T> comparator)
protected void doSort()
protected void restoreTree()
protected void setShowClasses(boolean showClasses)
protected java.lang.String getAllContainersNodeName()
protected javax.swing.tree.DefaultMutableTreeNode getRootNode()
public void dispose()
DialogWrapper
dispose
.dispose
in class DialogWrapper
public void calcData(DataKey key, DataSink sink)
calcData
in interface TypeSafeDataProvider
protected MemberChooser.ShowContainersAction getShowContainersAction()