|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ucla.stat.SOCR.touchgraph.graphlayout.Node
public class Node
Node.
Field Summary | |
---|---|
java.awt.Color |
BACK_DEFAULT_COLOR
|
java.awt.Color |
BACK_FIXED_COLOR
|
java.awt.Color |
BACK_HILIGHT_COLOR
|
java.awt.Color |
BACK_HILIGHT1_COLOR
|
java.awt.Color |
BACK_HILIGHT2_COLOR
|
java.awt.Color |
BACK_HILIGHT3_COLOR
|
java.awt.Color |
BACK_JML_COLOR
|
java.awt.Color |
BACK_MRF_COLOR
|
java.awt.Color |
BACK_SELECT_COLOR
|
protected java.awt.Color |
backColor
|
java.awt.Color |
BORDER_DRAG_COLOR
|
java.awt.Color |
BORDER_INACTIVE_COLOR
|
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
|
protected int |
highlight_flag
|
protected boolean |
highlighted
|
boolean |
justMadeLocal
|
protected java.lang.String |
lbl
|
boolean |
markedForRemoval
|
double |
massfade
|
protected int |
repulsion
|
static java.awt.Font |
SMALL_TAG_FONT
|
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. |
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. |
java.lang.String |
getURL()
|
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 |
setHighlighted(boolean flag)
|
void |
setHighlightedAsBoth(boolean flag)
|
void |
setHighlightedAsChild(boolean flag)
|
void |
setHighlightedAsParent(boolean flag)
|
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. |
void |
setNodeBackDefaultColor(java.awt.Color color)
|
void |
setNodeBackFixedColor(java.awt.Color color)
|
void |
setNodeBackHilightColor(java.awt.Color color)
|
void |
setNodeBackSelectColor(java.awt.Color color)
|
void |
setNodeBorderDragColor(java.awt.Color color)
|
void |
setNodeBorderInactiveColor(java.awt.Color color)
|
void |
setNodeBorderMouseOverColor(java.awt.Color color)
|
void |
setNodeTextColor(java.awt.Color color)
|
void |
setNodeTextFont(java.awt.Font font)
|
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 |
setURL(java.lang.String strUrl)
|
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 java.awt.Color BACK_FIXED_COLOR
public java.awt.Color BACK_SELECT_COLOR
public java.awt.Color BACK_DEFAULT_COLOR
public java.awt.Color BACK_HILIGHT_COLOR
public java.awt.Color BACK_HILIGHT1_COLOR
public java.awt.Color BACK_HILIGHT2_COLOR
public java.awt.Color BACK_HILIGHT3_COLOR
public java.awt.Color BACK_MRF_COLOR
public java.awt.Color BACK_JML_COLOR
public java.awt.Color BORDER_DRAG_COLOR
public java.awt.Color BORDER_MOUSE_OVER_COLOR
public java.awt.Color BORDER_INACTIVE_COLOR
public 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
public double massfade
protected double dx
protected double dy
protected boolean fixed
protected boolean highlighted
protected int highlight_flag
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 void setNodeBackFixedColor(java.awt.Color color)
public void setNodeBackSelectColor(java.awt.Color color)
public void setNodeBackDefaultColor(java.awt.Color color)
public void setNodeBackHilightColor(java.awt.Color color)
public void setNodeBorderDragColor(java.awt.Color color)
public void setNodeBorderMouseOverColor(java.awt.Color color)
public void setNodeBorderInactiveColor(java.awt.Color color)
public void setNodeTextColor(java.awt.Color color)
public void setNodeTextFont(java.awt.Font font)
public 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 void setHighlighted(boolean flag)
public void setHighlightedAsParent(boolean flag)
public void setHighlightedAsChild(boolean flag)
public void setHighlightedAsBoth(boolean flag)
public boolean getFixed()
public int edgeNum()
public int edgeCount()
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)
public java.lang.String getURL()
public void setURL(java.lang.String strUrl)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |