|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfi.paatti.research.paattiapplication.views.eventview.tools.Clickable
fi.paatti.research.paattiapplication.views.eventview.tools.NodeFactory.TreeNode
public class NodeFactory.TreeNode
TreeNode is the base class extended by all the nodes in an event tree. The base class contains the basic functionality for things like setting and getting the node's description, content, etc.
![]() |
![]() |
![]() |
![]() |
| Field Summary | |
|---|---|
protected Color |
baseColor
|
protected LinkedList<NodeFactory.TreeNode> |
children
|
protected LinkedList<NodeFactory.TreeNode> |
parents
|
| Fields inherited from class fi.paatti.research.paattiapplication.views.eventview.tools.Clickable |
|---|
height, width, x, y |
| Method Summary | |
|---|---|
void |
addChild(NodeFactory.TreeNode child)
Adds a node to this node's children list. |
void |
addParent(NodeFactory.TreeNode parent)
Adds a node to this node's parents list. |
void |
detach()
Removes all the connections between this node and the connected child and parent nodes. |
LinkedList<NodeFactory.TreeNode> |
getChildren()
Returns the children list. |
String |
getContent()
Returns the node's content. |
String |
getDescription()
Returns the node's description. |
int |
getId()
Returns the node's tree id. |
LinkedList<NodeFactory.TreeNode> |
getParents()
Returns the parents list. |
com.vaadin.data.Property |
getProperty(String s)
Returns property s using the BeanItem set in the constructor. |
int |
getRealId()
Returns the node's real (db) id. |
int |
getType()
Returns the node's type (db table TASKTYPE). |
int |
getX()
Returns the node's x coordinate. |
int |
getY()
Returns the node's y coordinate. |
void |
moveTo(int x,
int y)
Moves the node to the given coordinates, its center positioned in (x,y). |
void |
paint(Graphics g)
Draws the node to the current graphics context. |
void |
removeChild(NodeFactory.TreeNode child)
Removes a node from this node's children list, also removing this node from the given node's parents list. |
void |
removeParent(NodeFactory.TreeNode parent)
Removes a node from this node's parents list. |
void |
setActive(boolean a)
Sets the node's state. |
void |
setContent(String s)
Sets the node's content. |
void |
setDescription(String s)
Sets the node's description. |
void |
setRealId(int id)
Sets the node's real (db) id. |
void |
setType(int i)
Sets the node's type (db table TASKTYPE). |
void |
setX(int x)
Sets the node's x coordinate. |
void |
setY(int y)
Sets the node's y coordinate. |
String |
toString()
Returns the node's string presentation. |
| Methods inherited from class fi.paatti.research.paattiapplication.views.eventview.tools.Clickable |
|---|
contains |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected LinkedList<NodeFactory.TreeNode> parents
protected LinkedList<NodeFactory.TreeNode> children
protected Color baseColor
| Method Detail |
|---|
public int getId()
public void setRealId(int id)
id - the node's db idpublic int getRealId()
public int getType()
public void setType(int i)
i - new typepublic String getDescription()
public void setDescription(String s)
s - new descriptionpublic String getContent()
public void setContent(String s)
s - new contentpublic com.vaadin.data.Property getProperty(String s)
s - property to look for
public void setActive(boolean a)
a - statepublic int getX()
public void setX(int x)
x - the node's new x coordinatepublic int getY()
public void setY(int y)
y - the node's y coordinatepublic void addChild(NodeFactory.TreeNode child)
child - node to be addedpublic void removeChild(NodeFactory.TreeNode child)
child - node to be removedpublic void addParent(NodeFactory.TreeNode parent)
parent - node to be addedpublic void removeParent(NodeFactory.TreeNode parent)
parent - node to be removedpublic void detach()
public LinkedList<NodeFactory.TreeNode> getChildren()
public LinkedList<NodeFactory.TreeNode> getParents()
public void moveTo(int x,
int y)
public void paint(Graphics g)
paint in class Clickableg - graphics contextpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||