Package org.intermine.web.logic
Class TreeNode
- java.lang.Object
-
- org.intermine.web.logic.TreeNode
-
public class TreeNode extends java.lang.Object
Bean to represent one row in the display of a tree- Author:
- Kim Rutherford, Mark Woodbridge
-
-
Constructor Summary
Constructors Constructor Description TreeNode(java.lang.Object o, java.lang.String text, int indentation, boolean selected, boolean leaf, boolean open, java.util.List<java.lang.String> structure)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getIndentation()
Get the indentationjava.lang.Object
getObject()
Get the Objectjava.util.List<java.lang.String>
getStructure()
Returns the structure of the tree.java.lang.String
getText()
Get the text that was passed to the constructorint
hashCode()
boolean
isLeaf()
Is this node a leaf?boolean
isOpen()
Is this node expanded?boolean
isSelected()
Is this node selected?java.lang.String
toString()
-
-
-
Constructor Detail
-
TreeNode
public TreeNode(java.lang.Object o, java.lang.String text, int indentation, boolean selected, boolean leaf, boolean open, java.util.List<java.lang.String> structure)
Constructor- Parameters:
o
- the Objecttext
- extra text describing this nodeindentation
- the indentationselected
- whether the node has been selectedleaf
- whether this is a leaf nodeopen
- whether this node is 'open' ie. expandedstructure
- a List of Strings - for definition, see getStructure()
-
-
Method Detail
-
getObject
public java.lang.Object getObject()
Get the Object- Returns:
- the Object
-
getText
public java.lang.String getText()
Get the text that was passed to the constructor- Returns:
- the test
-
getIndentation
public int getIndentation()
Get the indentation- Returns:
- the indentation
-
isSelected
public boolean isSelected()
Is this node selected?- Returns:
- true if this node is selected, and false otherwise
-
isLeaf
public boolean isLeaf()
Is this node a leaf?- Returns:
- true if this node is a leaf, and false otherwise
-
isOpen
public boolean isOpen()
Is this node expanded?- Returns:
- true if this node is expanded, and false otherwise
-
getStructure
public java.util.List<java.lang.String> getStructure()
Returns the structure of the tree. This is an array of Strings, which are one of four possible strings, in order to draw a tree structure:- blank - Do not draw any lines.
- straight - Draw a straight vertical line.
- ell - Draw an L-shaped line.
- tee - Draw a T-junction, with lines going vertically and to the right.
- Returns:
- a List of Strings
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-