|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pedviz.view.DefaultNodeView pedviz.view.NodeView
public class NodeView
This class contains all informations that are needed for drawing a Node object in a GraphView.It saves also whether the node is selected or highlighted.
Constructor Summary | |
---|---|
NodeView(Node node,
DefaultNodeView defaultNodeView)
Constructs a NodeView for the given Node object with the given DefaultNodeView as template. |
Method Summary | |
---|---|
void |
addNodeViewListener(NodeViewListener listener)
|
float |
calcWidth(int nodeSize,
int gap)
Calcs the node's width. |
java.lang.Object |
clone()
Clones the NodeView. |
int |
compareTo(java.lang.Object arg0)
Compares two nodeviews. |
java.awt.geom.Rectangle2D.Float |
getBounds()
Returns the bounds of the node. |
java.awt.Color[] |
getColors()
Returns the Color array. |
java.lang.Object |
getData()
Returns the stored Object. |
java.lang.String |
getHint()
Return the hint-text. |
java.util.ArrayList<EdgeView> |
getInEdges()
Returns a collection of all in-edges. |
Node |
getNode()
Returns the Node object for the NodeView. |
java.util.ArrayList<NodeView> |
getNodes()
Returns a collection of all subnodes. |
java.util.ArrayList<EdgeView> |
getOutEdges()
Returns a collection of all out-edges. |
float |
getPosX()
Returns the position on the X-axis. |
float |
getPosY()
Returns the position on the X-axis. |
float |
getPosZ()
Returns the position on the X-axis. |
boolean |
isHidden()
Returns true, if the node is hidden. |
boolean |
isHighlighted()
Checks if the node is highlighted. |
boolean |
isMomLeft()
|
boolean |
isMouseOver()
Checks if the mouse is over the node. |
boolean |
isSelected()
Checks if the node is selected. |
void |
removeNodeViewListener(NodeViewListener listener)
|
void |
reset(DefaultNodeView defaultNodeView)
Resets all settings do the given DefaultNodeView object. |
void |
setBounds(double x,
double y,
double size)
Sets the bounds of this node. |
void |
setColors(java.awt.Color[] colors)
Sets the Color array. |
void |
setData(java.lang.Object data)
Sets the Object that will be stored. |
void |
setHidden(boolean hidden)
|
void |
setMomLeft(boolean momLeft)
|
void |
setPosX(float x)
Sets the position on the X-axis. |
void |
setPosY(float y)
Sets the position on the Y-axis. |
void |
setPosZ(float z)
Sets the position on the Z-axis. |
void |
sortSubNodes()
Sorts all subnodes. |
Methods inherited from class pedviz.view.DefaultNodeView |
---|
addHintAttribute, addSymbol, getBorderColor, getBorderWidth, getColor, getGap, getHeight, getHighlightedColor, getMouseOverColor, getSelectedColor, getSize, getSymbols, isExpand, setBorderColor, setBorderWidth, setColor, setExpand, setGap, setHighlightedColor, setHintAttribute, setHintText, setMouseOverColor, setSelectedColor, setSize, setSymbols |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeView(Node node, DefaultNodeView defaultNodeView)
node
- nodedefaultNodeView
- DefaultNodeViewMethod Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public Node getNode()
public boolean isSelected()
public boolean isHighlighted()
public boolean isMouseOver()
public java.lang.String getHint()
public float getPosX()
public float getPosY()
public float getPosZ()
public java.awt.geom.Rectangle2D.Float getBounds()
public void setBounds(double x, double y, double size)
x
- left positiony
- top positionsize
- widthpublic java.lang.Object getData()
public void setData(java.lang.Object data)
data
- public void setColors(java.awt.Color[] colors)
colors
- the Color array.public java.awt.Color[] getColors()
public boolean isHidden()
public void setHidden(boolean hidden)
hidden
- public java.util.ArrayList<NodeView> getNodes()
public java.util.ArrayList<EdgeView> getInEdges()
public java.util.ArrayList<EdgeView> getOutEdges()
public void setPosX(float x)
x
- the position on the X-axis.public void setPosY(float y)
y
- the position on the Y-axis.public void setPosZ(float z)
z
- the position on the Z-axis.public void sortSubNodes()
public int compareTo(java.lang.Object arg0)
compareTo
in interface java.lang.Comparable
public void reset(DefaultNodeView defaultNodeView)
defaultNodeView
- public float calcWidth(int nodeSize, int gap)
nodeSize
- the size of nodegap
- the gap between sub nodes
public void addNodeViewListener(NodeViewListener listener)
public void removeNodeViewListener(NodeViewListener listener)
public boolean isMomLeft()
public void setMomLeft(boolean momLeft)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |