|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.tree.DefaultMutableTreeNode | +--org.concord.biologica.ui.TreeViewNode
A node of the tree in the left hand panel of the Species main window.
Every node has a corresponding EngineObject. The visible manifestation of the node will show the textual representation of the object, perhaps a symbol indicating the type of object (e.g. species, chromosome, etc.) and the parents and children of the object.
Child nodes are created when getChildCount() or isLeaf() is called, not when the node is initially created.
Field Summary | |
static int |
CHARACTERISTIC_NODE_TYPE
|
static int |
ENVIRONMENT_NODE_TYPE
|
static int |
GENE_NODE_TYPE
|
static int |
ORGANISM_ALLELE_NODE_TYPE
|
static int |
ORGANISM_ALLELE_PAIR_NODE_TYPE
|
static int |
ORGANISM_CHROMOSOME_NODE_TYPE
|
static int |
ORGANISM_CHROMOSOME_PAIR_NODE_TYPE
|
static int |
ORGANISM_NODE_TYPE
|
static int |
RULE_NODE_TYPE
|
static int |
SPECIES_ALLELE_NODE_TYPE
|
static int |
SPECIES_CHROMOSOME_NODE_TYPE
|
static int |
SPECIES_IMAGE_COLUMN_NODE_TYPE
|
static int |
SPECIES_IMAGE_NODE_TYPE
|
static int |
SPECIES_IMAGE_ROW_NODE_TYPE
|
static int |
SPECIES_NODE_TYPE
|
static int |
TERRAIN_NODE_TYPE
|
static int |
TRAIT_NODE_TYPE
|
static int |
WORLD_NODE_TYPE
Node types, assuming the tree looks like world | +- species 1 | | | +- chromosome 1 of species 1 | | | | | +- gene 1 of species 1 on chromosome 1 | | | | | | | +- allele 1 of gene 1 of species 1 on chromosome 1 | | | +- allele 2 of gene 1 of species 1 on chromosome 1 | | | | | +- gene 2 of species 1 on chromosome 1 | | | | | +- allele 1 of gene 2 of species 1 on chromosome 1 | | +- allele 2 of gene 2 of species 1 on chromosome 1 | | | +- chromosome 2 of species 1 | | | | | +- gene 3 of species 1 on chromosome 2 | | | | | | | +- allele 1 of gene 3 of species 1 on chromosome 2 | | | +- allele 2 of gene 3 of species 1 on chromosome 2 | | | | | +- gene 4 of species 1 on chromosome 2 | | | | | +- allele 1 of gene 4 of species 1 on chromosome 2 | | +- allele 2 of gene 4 of species 1 on chromosome 2 | | | +- other chromosomes ... |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
TreeViewNode(TreeView aTreeView,
EngineObject anEngineObject)
Constructs a new TreeViewNode object. |
Method Summary | |
protected void |
createChildNodes()
Create the child nodes of this node. |
javax.swing.tree.TreeNode |
getChildAt(int index)
Return the child at the given index. |
int |
getChildCount()
Return the number of children. |
boolean |
getHasFocus()
Get whether this node has focus. |
int |
getNodeType()
Returns node type of this node. |
boolean |
isLeaf()
Returns if this node is a leaf node (has no children) or not. |
boolean |
isLocked()
Return the locked state of this node. |
boolean |
isSelected()
Return the selected state of this node |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Handle property change events |
void |
setHasFocus(boolean hasFocus)
Set whether this node has focus. |
void |
setSelected(boolean aSelected)
Set the selected state of this node. |
java.lang.String |
toString()
Get the string corresponding to this node. |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int WORLD_NODE_TYPE
public static final int SPECIES_NODE_TYPE
public static final int SPECIES_CHROMOSOME_NODE_TYPE
public static final int GENE_NODE_TYPE
public static final int SPECIES_ALLELE_NODE_TYPE
public static final int RULE_NODE_TYPE
public static final int TRAIT_NODE_TYPE
public static final int CHARACTERISTIC_NODE_TYPE
public static final int ENVIRONMENT_NODE_TYPE
public static final int ORGANISM_NODE_TYPE
public static final int TERRAIN_NODE_TYPE
public static final int SPECIES_IMAGE_NODE_TYPE
public static final int SPECIES_IMAGE_COLUMN_NODE_TYPE
public static final int SPECIES_IMAGE_ROW_NODE_TYPE
public static final int ORGANISM_CHROMOSOME_NODE_TYPE
public static final int ORGANISM_ALLELE_NODE_TYPE
public static final int ORGANISM_CHROMOSOME_PAIR_NODE_TYPE
public static final int ORGANISM_ALLELE_PAIR_NODE_TYPE
Constructor Detail |
public TreeViewNode(TreeView aTreeView, EngineObject anEngineObject)
aTreeView
- TreeView - tree view containing this nodeanEngineObject
- EngineObject - the object for this node, may not be nulljava.lang.IllegalArgumentException
- - input argument(s) illegalMethod Detail |
public boolean isLeaf()
isLeaf
in class javax.swing.tree.DefaultMutableTreeNode
public int getChildCount()
getChildCount
in class javax.swing.tree.DefaultMutableTreeNode
public javax.swing.tree.TreeNode getChildAt(int index)
We override this method to ensure that the child nodes are created.
getChildAt
in class javax.swing.tree.DefaultMutableTreeNode
index
- int - child indexprotected void createChildNodes()
Called when we know we finally need to create child nodes, presumably because some event occurred where we need to show the child nodes.
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public int getNodeType()
public boolean getHasFocus()
public void setHasFocus(boolean hasFocus)
hasFocus
- boolean - true if has focus, false if doesn't have focuspublic boolean isSelected()
public void setSelected(boolean aSelected)
aSelected
- boolean - selected state of this nodepublic boolean isLocked()
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
event
- PropertyChangeEvent - the property change event
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |