public class ProjectionTreePanel extends AbstractNavigationPanel implements IProjectionTree
JTree
in a ScrollPane
and
initializes them properly.
Created: August 23, 2008JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
ProjectionTreePanel(ProjectionModel proj,
JPanel content)
The Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getContentPanel, getProjectionModel, getScrollPane, getTree, getTreeModel, selectRoot, setProjection, setScrollPane, setTree, setTreeModel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTree, getTreeModel
public ProjectionTreePanel(ProjectionModel proj, JPanel content)
proj
- the projection modelcontent
- the content pane (to display editing panels)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 setprotected 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 createdpublic void totalRefresh()
IProjectionTree
ProjectionNode
are re-created and re-initialized.totalRefresh
in interface IProjectionTree
Copyright © 2012. All Rights Reserved.