|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.datatools.sqltools.plan.treeplan.TreePlanNodeComponent
public abstract class TreePlanNodeComponent
Use composite pattern to store the tree. Instance of this class renders a node in a tree --- either composite node or
a leaf. Consumer can put any data in this node using _data
field, meanwhile, some necessary
informations are defined:
Constructor Summary | |
---|---|
TreePlanNodeComponent()
Empty constructor, the consumer should call setXXX methods after constructing the node |
|
TreePlanNodeComponent(java.lang.String name,
java.lang.String tip,
java.lang.String detail,
java.lang.Object data,
java.lang.String label1,
boolean isLabel1Highlighted,
java.lang.String label2,
boolean isLabel2Highlighted,
TreePlanNodeComponent parent)
Constructor |
Method Summary | |
---|---|
abstract void |
addChild(TreePlanNodeComponent child)
Adds child to this node, simply return if this node is a leaf |
abstract TreePlanNodeComponent |
getChild(int index)
Returns the child at the given index (the index is based on 0) |
abstract java.util.ArrayList |
getChildren()
Returns the children of this node, return null if this node is a leaf |
abstract int |
getChildrenCount()
Returns the number of children |
java.lang.Object |
getData()
Returns the data of this node |
java.lang.String |
getDetail()
Returns the detail information of this node |
java.lang.String |
getLabel1()
Returns the first label of this node |
java.lang.String |
getLabel2()
Returns the second label of this node |
java.lang.String |
getName()
Returns the name of this node |
TreePlanNodeComponent |
getParent()
Returns the parent of this node |
java.lang.String |
getToolTip()
Returns the tool tip of this node |
boolean |
isLabel1Highlighted()
Checks if should highlight label 1 |
boolean |
isLabel2Highlighted()
Checks if should highlight label 2 |
void |
setData(java.lang.Object data)
Sets the data of this node |
void |
setDetail(java.lang.String detail)
Sets the detail information of this node |
void |
setLabel1(java.lang.String label1)
Sets the first label of this node |
void |
setLabel1Highlighted(boolean label1Highlighted)
Sets _isLabel1Highlighted |
void |
setLabel2(java.lang.String label2)
Sets the second label of this node |
void |
setLabel2Highlighted(boolean label2Highlighted)
Sets _isLabel2Highlighted |
void |
setName(java.lang.String name)
Sets the name of this node |
void |
setParent(TreePlanNodeComponent parent)
Sets the parent of this node |
void |
setToolTip(java.lang.String tip)
Sets the tool tip of this node |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreePlanNodeComponent(java.lang.String name, java.lang.String tip, java.lang.String detail, java.lang.Object data, java.lang.String label1, boolean isLabel1Highlighted, java.lang.String label2, boolean isLabel2Highlighted, TreePlanNodeComponent parent)
name
- name of this nodetip
- tooltip of this nodedetail
- detail information of this nodedata
- data of this node, consumer can put anythinglabel1
- first labelisLabel1Highlighted
- used to control if label 1 should be highlightedlabel2
- second labelisLabel2Highlighted
- used to control if label 2 should be highlightedparent
- parent node of this nodepublic TreePlanNodeComponent()
Method Detail |
---|
public abstract java.util.ArrayList getChildren()
null
if this node is a leaf
public abstract int getChildrenCount()
public abstract TreePlanNodeComponent getChild(int index)
index
- the index
public abstract void addChild(TreePlanNodeComponent child)
child
- the childpublic java.lang.String getDetail()
public void setDetail(java.lang.String detail)
detail
- the detail informationpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the namepublic TreePlanNodeComponent getParent()
public void setParent(TreePlanNodeComponent parent)
parent
- the new parentpublic java.lang.String getToolTip()
public void setToolTip(java.lang.String tip)
tip
- the tool tippublic java.lang.Object getData()
public void setData(java.lang.Object data)
data
- the datapublic java.lang.String getLabel1()
public void setLabel1(java.lang.String label1)
label1
- the labelpublic java.lang.String getLabel2()
public void setLabel2(java.lang.String label2)
label2
- the labelpublic boolean isLabel1Highlighted()
true
if label 1 should be highlightedpublic void setLabel1Highlighted(boolean label1Highlighted)
label1Highlighted
- the new valuepublic boolean isLabel2Highlighted()
true
if label 2 should be highlightedpublic void setLabel2Highlighted(boolean label2Highlighted)
label2Highlighted
- the new value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |