|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.touchgraph.graphlayout.Node
Node.
Field Summary | |
static java.awt.Color |
BACK_DEFAULT_COLOR
|
static java.awt.Color |
BACK_FIXED_COLOR
|
static java.awt.Color |
BACK_HILIGHT_COLOR
|
static java.awt.Color |
BACK_SELECT_COLOR
|
protected java.awt.Color |
backColor
|
static java.awt.Color |
BORDER_DRAG_COLOR
|
static java.awt.Color |
BORDER_INACTIVE_COLOR
|
static java.awt.Color |
BORDER_MOUSE_OVER_COLOR
|
static int |
DEFAULT_TYPE
|
double |
drawx
|
double |
drawy
|
protected double |
dx
|
protected double |
dy
|
protected boolean |
fixed
|
protected java.awt.Font |
font
|
protected java.awt.FontMetrics |
fontMetrics
|
boolean |
justMadeLocal
|
protected java.lang.String |
lbl
|
boolean |
markedForRemoval
|
protected int |
repulsion
|
static java.awt.Font |
SMALL_TAG_FONT
|
static java.awt.Color |
TEXT_COLOR
|
static java.awt.Font |
TEXT_FONT
|
protected java.awt.Color |
textColor
|
protected int |
typ
an int indicating the Node type. |
static int |
TYPE_CIRCLE
This Node's type is a Circle. |
static int |
TYPE_ELLIPSE
This Node's type is an Ellipse. |
static int |
TYPE_RECTANGLE
This Node's type is a Rectangle. |
static int |
TYPE_ROUNDRECT
This Node's type is a Round Rectangle. |
protected boolean |
visible
|
int |
visibleEdgeCnt
|
double |
x
|
double |
y
|
Constructor Summary | |
Node()
Minimal constructor which will generate an ID value from Java's Date class. |
|
Node(java.lang.String id)
Constructor with the required ID id, using defaults for type (rectangle), color (a static variable from TGPanel). |
|
Node(java.lang.String id,
int type,
java.awt.Color color,
java.lang.String label)
Constructor with a String ID id, an int type, Background Color bgColor, and a String label. |
|
Node(java.lang.String id,
java.lang.String label)
Constructor with Strings for ID id and label, using defaults for type (rectangle) and color (a static variable from TGPanel). |
Method Summary | |
void |
addEdge(Edge edge)
Add the Edge edge to the graph. |
boolean |
containsPoint(double px,
double py)
Returns true if this Node contains the Point px,py. |
boolean |
containsPoint(java.awt.Point p)
Returns true if this Node contains the Point p. |
Edge |
edgeAt(int index)
Return the Edge at int index. |
int |
edgeCount()
Return the number of Edges in the cumulative Vector. |
int |
edgeNum()
Deprecated. this method has been replaced by the edgeCount() method. |
java.awt.Color |
getBackColor()
Return the background color of this Node as a Color. |
java.util.Iterator |
getEdges()
Return an iterator over the Edges in the cumulative Vector, null if it is empty. |
boolean |
getFixed()
Returns true if this Node is fixed (in place). |
java.awt.Font |
getFont()
Returns the font of this Node as a Font |
int |
getHeight()
Return the height of this Node. |
java.lang.String |
getID()
Return the ID of this Node as a String. |
java.lang.String |
getLabel()
Return the label of this Node as a String. |
java.awt.Point |
getLocation()
Return the location of this Node as a Point. |
java.awt.Color |
getPaintBackColor(TGPanel tgPanel)
|
java.awt.Color |
getPaintBorderColor(TGPanel tgPanel)
|
java.awt.Color |
getPaintTextColor(TGPanel tgPanel)
|
java.awt.Color |
getTextColor()
Return the text color of this Node as a Color. |
int |
getType()
Return the type of this Node as an int. |
int |
getWidth()
Return the width of this Node. |
boolean |
intersects(java.awt.Dimension d)
Returns true if this Node intersects Dimension d. |
boolean |
isVisible()
Return the visibility of this Node as a boolean. |
void |
paint(java.awt.Graphics g,
TGPanel tgPanel)
Paints the Node. |
void |
paintNodeBody(java.awt.Graphics g,
TGPanel tgPanel)
Paints the background of the node, along with its label |
void |
paintSmallTag(java.awt.Graphics g,
TGPanel tgPanel,
int tagX,
int tagY,
java.awt.Color backCol,
java.awt.Color textCol,
char character)
Paints a tag with containing a character in a small font. |
void |
removeEdge(Edge edge)
Remove the Edge edge from the graph. |
void |
setBackColor(java.awt.Color bgColor)
Set the background color of this Node to the Color bgColor. |
void |
setFixed(boolean fixed)
Set the fixed status of this Node to the boolean fixed. |
void |
setFont(java.awt.Font font)
Set the font of this Node to the Font font. |
void |
setID(java.lang.String id)
Set the ID of this Node to the String id. |
void |
setLabel(java.lang.String label)
Set the label of this Node to the String label. |
void |
setLocation(java.awt.Point p)
Set the location of this Node provided the Point p. |
static void |
setNodeBackDefaultColor(java.awt.Color color)
|
static void |
setNodeBackFixedColor(java.awt.Color color)
|
static void |
setNodeBackHilightColor(java.awt.Color color)
|
static void |
setNodeBackSelectColor(java.awt.Color color)
|
static void |
setNodeBorderDragColor(java.awt.Color color)
|
static void |
setNodeBorderInactiveColor(java.awt.Color color)
|
static void |
setNodeBorderMouseOverColor(java.awt.Color color)
|
static void |
setNodeTextColor(java.awt.Color color)
|
static void |
setNodeTextFont(java.awt.Font font)
|
static void |
setNodeType(int type)
|
void |
setTextColor(java.awt.Color txtColor)
Set the text color of this Node to the Color txtColor. |
void |
setType(int type)
Set the type of this Node to the int type. |
void |
setVisible(boolean v)
Set the visibility of this Node to the boolean v. |
int |
visibleEdgeCount()
Returns the local Edge count. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TYPE_RECTANGLE
public static final int TYPE_ROUNDRECT
public static final int TYPE_ELLIPSE
public static final int TYPE_CIRCLE
public static final java.awt.Font SMALL_TAG_FONT
public static java.awt.Color BACK_FIXED_COLOR
public static java.awt.Color BACK_SELECT_COLOR
public static java.awt.Color BACK_DEFAULT_COLOR
public static java.awt.Color BACK_HILIGHT_COLOR
public static java.awt.Color BORDER_DRAG_COLOR
public static java.awt.Color BORDER_MOUSE_OVER_COLOR
public static java.awt.Color BORDER_INACTIVE_COLOR
public static java.awt.Color TEXT_COLOR
public static java.awt.Font TEXT_FONT
public static int DEFAULT_TYPE
protected int typ
TYPE_RECTANGLE
,
TYPE_ROUNDRECT
,
TYPE_ELLIPSE
public double drawx
public double drawy
protected java.awt.FontMetrics fontMetrics
protected java.awt.Font font
protected java.lang.String lbl
protected java.awt.Color backColor
protected java.awt.Color textColor
public double x
public double y
protected double dx
protected double dy
protected boolean fixed
protected int repulsion
public boolean justMadeLocal
public boolean markedForRemoval
public int visibleEdgeCnt
protected boolean visible
Constructor Detail |
public Node()
public Node(java.lang.String id)
public Node(java.lang.String id, java.lang.String label)
public Node(java.lang.String id, int type, java.awt.Color color, java.lang.String label)
TYPE_RECTANGLE
,
TYPE_ROUNDRECT
Method Detail |
public static void setNodeBackFixedColor(java.awt.Color color)
public static void setNodeBackSelectColor(java.awt.Color color)
public static void setNodeBackDefaultColor(java.awt.Color color)
public static void setNodeBackHilightColor(java.awt.Color color)
public static void setNodeBorderDragColor(java.awt.Color color)
public static void setNodeBorderMouseOverColor(java.awt.Color color)
public static void setNodeBorderInactiveColor(java.awt.Color color)
public static void setNodeTextColor(java.awt.Color color)
public static void setNodeTextFont(java.awt.Font font)
public static void setNodeType(int type)
public void setID(java.lang.String id)
public java.lang.String getID()
public void setLocation(java.awt.Point p)
public java.awt.Point getLocation()
public void setVisible(boolean v)
public boolean isVisible()
public void setType(int type)
TYPE_RECTANGLE
,
TYPE_ROUNDRECT
,
TYPE_ELLIPSE
,
TYPE_CIRCLE
public int getType()
TYPE_RECTANGLE
,
TYPE_ROUNDRECT
,
TYPE_ELLIPSE
,
TYPE_CIRCLE
public void setFont(java.awt.Font font)
public java.awt.Font getFont()
public void setBackColor(java.awt.Color bgColor)
public java.awt.Color getBackColor()
public void setTextColor(java.awt.Color txtColor)
public java.awt.Color getTextColor()
public void setLabel(java.lang.String label)
public java.lang.String getLabel()
public void setFixed(boolean fixed)
public boolean getFixed()
public int edgeNum()
public int edgeCount()
public java.util.Iterator getEdges()
public int visibleEdgeCount()
public Edge edgeAt(int index)
public void addEdge(Edge edge)
public void removeEdge(Edge edge)
public int getWidth()
public int getHeight()
public boolean intersects(java.awt.Dimension d)
public boolean containsPoint(double px, double py)
public boolean containsPoint(java.awt.Point p)
public void paint(java.awt.Graphics g, TGPanel tgPanel)
public java.awt.Color getPaintBorderColor(TGPanel tgPanel)
public java.awt.Color getPaintBackColor(TGPanel tgPanel)
public java.awt.Color getPaintTextColor(TGPanel tgPanel)
public void paintNodeBody(java.awt.Graphics g, TGPanel tgPanel)
public void paintSmallTag(java.awt.Graphics g, TGPanel tgPanel, int tagX, int tagY, java.awt.Color backCol, java.awt.Color textCol, char character)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |