public abstract class MasterDetailsComponent extends java.lang.Object implements Configurable, DetailsComponent.Facade, MasterDetails
Modifier and Type | Class and Description |
---|---|
static interface |
MasterDetailsComponent.ActionGroupWithPreselection |
protected static interface |
MasterDetailsComponent.ItemsChangeListener |
protected class |
MasterDetailsComponent.MyActionGroupWrapper |
protected class |
MasterDetailsComponent.MyDeleteAction |
static class |
MasterDetailsComponent.MyNode |
protected static class |
MasterDetailsComponent.MyRootNode |
Configurable.Composite, Configurable.NoMargin, Configurable.NoScroll, Configurable.TopComponentController, Configurable.TopComponentProvider, Configurable.VariableProjectAppLevel, Configurable.WithEpDependencies
Modifier and Type | Field and Description |
---|---|
protected static javax.swing.Icon |
COPY_ICON |
protected static Logger |
LOG |
protected AutoScrollToSourceHandler |
myAutoScrollHandler |
protected NamedConfigurable |
myCurrentConfigurable |
protected History |
myHistory |
javax.swing.JPanel |
myNorthPanel |
protected MasterDetailsComponent.MyNode |
myRoot |
protected MasterDetailsState |
myState |
protected boolean |
myToReInitWholePanel |
protected Tree |
myTree |
protected javax.swing.JPanel |
myWholePanel |
static java.lang.String |
TREE_NAME |
static java.lang.String |
TREE_OBJECT |
protected java.lang.Runnable |
TREE_UPDATER |
APPLICATION_CONFIGURABLE, PROJECT_CONFIGURABLE
Modifier | Constructor and Description |
---|---|
protected |
MasterDetailsComponent() |
protected |
MasterDetailsComponent(MasterDetailsState state) |
Modifier and Type | Method and Description |
---|---|
void |
addItemsChangeListener(MasterDetailsComponent.ItemsChangeListener l) |
protected void |
addNode(MasterDetailsComponent.MyNode nodeToAdd,
MasterDetailsComponent.MyNode parent) |
protected void |
addNotify() |
void |
apply()
Stores the settings from the Swing form to the configurable component.
|
protected void |
checkForEmptyAndDuplicatedNames(java.lang.String prefix,
java.lang.String title,
java.lang.Class<? extends NamedConfigurable> configurableClass) |
protected void |
clearChildren() |
protected java.util.List<AnAction> |
createActions(boolean fromPopup) |
javax.swing.JComponent |
createComponent()
Creates new Swing form that enables user to configure the settings.
|
protected DefaultActionGroup |
createToolbarActionGroup() |
void |
disposeUIResources()
Notifies the configurable component that the Swing form will be closed.
|
void |
ensureInitialized(NamedConfigurable configurable) |
protected static MasterDetailsComponent.MyNode |
findNodeByCondition(javax.swing.tree.TreeNode root,
Condition<? super NamedConfigurable> condition) |
protected static MasterDetailsComponent.MyNode |
findNodeByName(javax.swing.tree.TreeNode root,
java.lang.String profileName) |
static MasterDetailsComponent.MyNode |
findNodeByObject(javax.swing.tree.TreeNode root,
java.lang.Object editableObject) |
protected static Condition<java.lang.Object[]> |
forAll(Condition<java.lang.Object> condition) |
protected java.util.ArrayList<AnAction> |
getAdditionalActions() |
protected java.lang.String |
getComponentStateKey() |
DetailsComponent |
getDetails() |
DetailsComponent |
getDetailsComponent() |
protected java.lang.String |
getEmptySelectionString() |
java.lang.String |
getHelpTopic()
Returns the topic in the help file which is shown when help for the configurable is requested.
|
javax.swing.JComponent |
getMaster() |
protected java.util.Comparator<MasterDetailsComponent.MyNode> |
getNodeComparator() |
protected java.awt.Dimension |
getPanelPreferredSize() |
NamedConfigurable |
getSelectedConfigurable() |
MasterDetailsComponent.MyNode |
getSelectedNode() |
java.lang.Object |
getSelectedObject() |
Splitter |
getSplitter() |
protected MasterDetailsState |
getState() |
protected MasterDetailsStateService |
getStateService() |
javax.swing.JComponent |
getToolbar() |
Tree |
getTree() |
protected void |
initializeConfigurable(NamedConfigurable configurable) |
protected void |
initTree() |
void |
initUi() |
protected boolean |
isAutoScrollEnabled() |
protected boolean |
isInitialized(NamedConfigurable configurable) |
boolean |
isModified()
Indicates whether the Swing form was modified or not.
|
protected void |
loadComponentState() |
protected void |
loadState(MasterDetailsState object) |
protected void |
onItemDeleted(java.lang.Object item) |
protected void |
processRemovedItems() |
protected void |
reInitWholePanelIfNeeded() |
protected void |
removeNodes(java.util.List<? extends MasterDetailsComponent.MyNode> nodes) |
protected void |
removePaths(javax.swing.tree.TreePath... paths) |
void |
reset()
Loads the settings from the configurable component to the Swing form.
|
protected void |
restoreLastSelection() |
ActionCallback |
selectNodeInTree(javax.swing.tree.DefaultMutableTreeNode nodeToSelect) |
ActionCallback |
selectNodeInTree(javax.swing.tree.DefaultMutableTreeNode nodeToSelect,
boolean requestFocus) |
ActionCallback |
selectNodeInTree(javax.swing.tree.DefaultMutableTreeNode nodeToSelect,
boolean center,
boolean requestFocus) |
void |
selectNodeInTree(java.lang.Object object) |
void |
selectNodeInTree(java.lang.String displayName) |
void |
setHistory(History history) |
protected void |
setSelectedNode(MasterDetailsComponent.MyNode node) |
protected void |
sortDescendants(MasterDetailsComponent.MyNode root) |
protected boolean |
updateMultiSelection(java.util.List<? extends NamedConfigurable> selectedConfigurables) |
protected void |
updateSelection(NamedConfigurable configurable) |
protected boolean |
wasObjectStored(java.lang.Object editableObject) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName, getPreferredFocusedComponent, isModified, isModified, isModified, isModified
cancel
protected static final Logger LOG
protected static final javax.swing.Icon COPY_ICON
protected NamedConfigurable myCurrentConfigurable
public static final java.lang.String TREE_OBJECT
public static final java.lang.String TREE_NAME
protected History myHistory
protected final MasterDetailsState myState
protected final java.lang.Runnable TREE_UPDATER
protected MasterDetailsComponent.MyNode myRoot
protected Tree myTree
protected javax.swing.JPanel myWholePanel
public javax.swing.JPanel myNorthPanel
protected AutoScrollToSourceHandler myAutoScrollHandler
protected boolean myToReInitWholePanel
protected MasterDetailsComponent()
protected MasterDetailsComponent(MasterDetailsState state)
public void setHistory(History history)
protected void reInitWholePanelIfNeeded()
protected void addNotify()
protected boolean updateMultiSelection(java.util.List<? extends NamedConfigurable> selectedConfigurables)
public DetailsComponent getDetailsComponent()
getDetailsComponent
in interface DetailsComponent.Facade
public Splitter getSplitter()
protected boolean isAutoScrollEnabled()
protected DefaultActionGroup createToolbarActionGroup()
public void addItemsChangeListener(MasterDetailsComponent.ItemsChangeListener l)
protected java.awt.Dimension getPanelPreferredSize()
public javax.swing.JComponent createComponent()
UnnamedConfigurable
Also this place is designed to allocate resources (subscriptions/listeners etc.)
createComponent
in interface UnnamedConfigurable
null
if it cannot be createdUnnamedConfigurable.disposeUIResources()
public boolean isModified()
UnnamedConfigurable
isModified
in interface UnnamedConfigurable
true
if the settings were modified, false
otherwiseprotected boolean isInitialized(NamedConfigurable configurable)
public void apply() throws ConfigurationException
UnnamedConfigurable
apply
in interface UnnamedConfigurable
ConfigurationException
- if values cannot be appliedprotected void processRemovedItems()
protected boolean wasObjectStored(java.lang.Object editableObject)
public void reset()
UnnamedConfigurable
reset
in interface UnnamedConfigurable
protected final void restoreLastSelection()
protected void loadComponentState()
protected java.lang.String getComponentStateKey()
protected MasterDetailsStateService getStateService()
protected MasterDetailsState getState()
protected void loadState(MasterDetailsState object)
public void disposeUIResources()
UnnamedConfigurable
disposeUIResources
in interface UnnamedConfigurable
protected void clearChildren()
protected java.util.List<AnAction> createActions(boolean fromPopup)
protected void initTree()
protected java.util.ArrayList<AnAction> getAdditionalActions()
protected void addNode(MasterDetailsComponent.MyNode nodeToAdd, MasterDetailsComponent.MyNode parent)
protected void sortDescendants(MasterDetailsComponent.MyNode root)
protected java.util.Comparator<MasterDetailsComponent.MyNode> getNodeComparator()
public ActionCallback selectNodeInTree(javax.swing.tree.DefaultMutableTreeNode nodeToSelect)
public ActionCallback selectNodeInTree(javax.swing.tree.DefaultMutableTreeNode nodeToSelect, boolean requestFocus)
public ActionCallback selectNodeInTree(javax.swing.tree.DefaultMutableTreeNode nodeToSelect, boolean center, boolean requestFocus)
public java.lang.Object getSelectedObject()
public final MasterDetailsComponent.MyNode getSelectedNode()
public NamedConfigurable getSelectedConfigurable()
public void selectNodeInTree(java.lang.String displayName)
public void selectNodeInTree(java.lang.Object object)
protected static MasterDetailsComponent.MyNode findNodeByName(javax.swing.tree.TreeNode root, java.lang.String profileName)
public static MasterDetailsComponent.MyNode findNodeByObject(javax.swing.tree.TreeNode root, java.lang.Object editableObject)
protected static MasterDetailsComponent.MyNode findNodeByCondition(javax.swing.tree.TreeNode root, Condition<? super NamedConfigurable> condition)
protected void setSelectedNode(MasterDetailsComponent.MyNode node)
protected void updateSelection(NamedConfigurable configurable)
public void ensureInitialized(NamedConfigurable configurable)
public java.lang.String getHelpTopic()
Configurable
getHelpTopic
in interface Configurable
null
if no help is availableprotected java.lang.String getEmptySelectionString()
protected void initializeConfigurable(NamedConfigurable configurable)
protected final void checkForEmptyAndDuplicatedNames(java.lang.String prefix, java.lang.String title, java.lang.Class<? extends NamedConfigurable> configurableClass) throws ConfigurationException
ConfigurationException
public Tree getTree()
protected void removePaths(javax.swing.tree.TreePath... paths)
protected void removeNodes(java.util.List<? extends MasterDetailsComponent.MyNode> nodes)
protected void onItemDeleted(java.lang.Object item)
public javax.swing.JComponent getToolbar()
getToolbar
in interface MasterDetails
public javax.swing.JComponent getMaster()
getMaster
in interface MasterDetails
public DetailsComponent getDetails()
getDetails
in interface MasterDetails
public void initUi()
initUi
in interface MasterDetails