|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
p3j.gui.panels.AbstractNavigationPanel
p3j.gui.panels.projections.ProjectionTreePanel
public class ProjectionTreePanel
Panel that displays a JTree
in a ScrollPane
and
initializes them properly.
Created: August 23, 2008
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ProjectionTreePanel(ProjectionModel proj,
JPanel content)
The Constructor. |
Method Summary | |
---|---|
protected void |
addAssumptionsSubTree(ParameterInstanceNode root,
Set set,
ParameterInstance instance)
Adds sub tree for ParameterAssignment entities. |
protected void |
addGenerationSubTree(SetNode root,
List<ParameterInstance> instances)
Adds sub-tree for a generation. |
protected void |
addInstancesSubTree(PopulationNode root,
Set set,
List<ParameterInstance> instances)
Adds sub tree for ParameterInstance entities. |
protected void |
addPopulationsSubTree(ProjectionTreeNode<?> root,
Set set,
List<ParameterInstance> instances)
Adds sub tree for populations. |
protected SetNode |
addSetSubTree(SetTypeNode root,
Set set,
SetType setType)
Adds sub tree for Set . |
protected void |
addSetTypeSubTree(DefaultMutableTreeNode root,
SetType setType)
Adds sub tree for SetType . |
void |
cleanTree()
Cleans the tree from unnecessary leaves. |
protected void |
cleanTree(ProjectionTreeNode<?> node)
Recursively cleans up the tree. |
SetNode |
createNewSetStructure(SetTypeNode stNode,
Set set)
Creates all substructures for displaying a set. |
protected void |
initTree()
Initializes projection tree. |
void |
nodeAdded(ParameterInstanceNode node,
int index)
Notifies tree that the given node as a new child at the given index. |
void |
recursiveRefresh(ProjectionTreeNode<?> node)
Recursively refreshes the node names of node in the sub-tree below the given node. |
void |
refreshNode(ProjectionTreeNode<?> node)
Refresh a single node in the tree. |
void |
refreshNodeSubStructure(ProjectionTreeNode<?> node)
Refreshed the sub-structures of the node in the tree. |
void |
removeNode(ProjectionTreeNode<?> node)
Removes given node. |
void |
removeNodes(ProjectionTreeNode<?> node,
Collection<? extends Object> repRemovObjects)
Removes all nodes that represent the objects given in the collection. |
void |
selectNode(ProjectionTreeNode<?> node)
Selects a given node. |
void |
totalRefresh()
Totally refreshes the projection tree. |
Methods inherited from class p3j.gui.panels.AbstractNavigationPanel |
---|
getContentPanel, getProjectionModel, getScrollPane, getTree, getTreeModel, setProjection, setScrollPane, setTree, setTreeModel |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface p3j.gui.panels.projections.IProjectionTree |
---|
getTree, getTreeModel |
Constructor Detail |
---|
public ProjectionTreePanel(ProjectionModel proj, JPanel content)
proj
- the projection modelcontent
- the content pane (to display editing panels)Method Detail |
---|
protected void initTree()
initTree
in class AbstractNavigationPanel
protected void addSetTypeSubTree(DefaultMutableTreeNode root, SetType setType)
SetType
.
root
- the root of this sub treesetType
- the Settype to be representedprotected SetNode addSetSubTree(SetTypeNode root, Set set, SetType setType)
Set
.
root
- the root of this sub treeset
- the set to be representedsetType
- the Settype of this set
protected void addGenerationSubTree(SetNode root, List<ParameterInstance> instances)
root
- the root of this sub treeinstances
- the list of parameter instances of this generationprotected void addPopulationsSubTree(ProjectionTreeNode<?> root, Set set, List<ParameterInstance> instances)
root
- the root of this sub treeset
- the set containing the assumptions for the instancesinstances
- list of instancesprotected void addInstancesSubTree(PopulationNode root, Set set, List<ParameterInstance> instances)
ParameterInstance
entities.
root
- the root of the sub treeset
- the set containing the assumptions for the instancesinstances
- the instances that will be nodesprotected void addAssumptionsSubTree(ParameterInstanceNode root, Set set, ParameterInstance instance)
ParameterAssignment
entities.
root
- the root node for this sub treeset
- the set in which the assignments are definedinstance
- the instance to which the assignments belongpublic void refreshNode(ProjectionTreeNode<?> node)
IProjectionTree
refreshNode
in interface IProjectionTree
node
- the node to be refreshedpublic void refreshNodeSubStructure(ProjectionTreeNode<?> node)
IProjectionTree
refreshNodeSubStructure
in interface IProjectionTree
node
- the node of which the sub-structures shall be refreshedpublic void nodeAdded(ParameterInstanceNode node, int index)
IProjectionTree
nodeAdded
in interface IProjectionTree
node
- node with new childindex
- index of the new childpublic void selectNode(ProjectionTreeNode<?> node)
IProjectionTree
selectNode
in interface IProjectionTree
node
- the node to be selectedpublic void recursiveRefresh(ProjectionTreeNode<?> node)
IProjectionTree
recursiveRefresh
in interface IProjectionTree
node
- the node of which the subtree shall be refreshedpublic void removeNode(ProjectionTreeNode<?> node)
IProjectionTree
removeNode
in interface IProjectionTree
node
- the node to be removedpublic void removeNodes(ProjectionTreeNode<?> node, Collection<? extends Object> repRemovObjects)
IProjectionTree
removeNodes
in interface IProjectionTree
node
- the node from which to start lookingrepRemovObjects
- collection of the represented object of the nodes to be removedpublic void cleanTree()
IProjectionTree
cleanTree
in interface IProjectionTree
protected void cleanTree(ProjectionTreeNode<?> node)
node
- the current nodepublic SetNode createNewSetStructure(SetTypeNode stNode, Set set)
IProjectionTree
createNewSetStructure
in interface IProjectionTree
stNode
- the Settype node the set belongs toset
- the set for which the structure shall be created
public void totalRefresh()
IProjectionTree
ProjectionNode
are re-created and re-initialized.
totalRefresh
in interface IProjectionTree
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |