public class GraphView.VisualVertex extends java.lang.Object implements Serializable
Vertex
.
ensureVisibility()
.Modifier and Type | Method and Description |
---|---|
void |
deserialize(Serializer s)
Deserializes (loads) the object data from the given serializer.
|
void |
ensureVisibility()
Ensures that the vertex is in the visible area of the graph.
|
int |
getAttachmentX()
Gets the x position of the attachment point.
|
int |
getAttachmentY()
Gets the y position of the attachment point.
|
java.awt.Color |
getBackground()
Gets the background color of the vertex.
|
int |
getEdgeWidth()
Gets the line width of the vertex edge.
|
java.awt.Color |
getForeground()
Gets the foreground color of the vertex.
|
int |
getIndex()
Gets the index of the vertex in the list of vertices.
|
float |
getScale()
Gets the scale factor of the vertex circle.
|
V |
getVertex()
Gets the vertex.
|
int |
getX()
Gets the x position of the center of circle.
|
int |
getY()
Gets the y position of the center of circle.
|
boolean |
isSelected()
Indicates if the vertex is currently selected.
|
boolean |
isVisible()
Indicates if the vertex is currently inside the visible area of the graph.
|
void |
serialize(Serializer s)
Serializes (saves) the object data to the given serializer.
|
void |
setBackground(java.awt.Color c)
Sets the background color of the vertex.
|
void |
setEdgeWidth(int w)
Sets the line width of the vertex edge.
|
void |
setForeground(java.awt.Color c)
Sets the foreground color of the vertex.
|
void |
setScale(float scale)
Sets the scale factor of the vertex circle.
|
java.lang.String |
toString()
Gets the string representation of the visual vertex.
|
public final V getVertex()
public final int getIndex()
public final java.awt.Color getBackground()
public final void setBackground(java.awt.Color c) throws java.lang.IllegalArgumentException
GraphView.setAutoRepaint(boolean)
)!c
- the background colorjava.lang.IllegalArgumentException
- public final java.awt.Color getForeground()
public final void setForeground(java.awt.Color c) throws java.lang.IllegalArgumentException
GraphView.setAutoRepaint(boolean)
)!c
- the foreground colorjava.lang.IllegalArgumentException
- public final int getEdgeWidth()
public final void setEdgeWidth(int w) throws java.lang.IllegalArgumentException
GraphView.setAutoRepaint(boolean)
)!w
- the line width of the vertex edgejava.lang.IllegalArgumentException
- w < 1
public final float getScale()
> 0.0f
public final void setScale(float scale) throws java.lang.IllegalArgumentException
GraphView.setAutoRepaint(boolean)
)!scale
- the scale factor that means a value > 0.0f
(1.0f
means normal size)java.lang.IllegalArgumentException
- <= 0.0f
public final int getX()
public final int getY()
public final int getAttachmentX()
public final int getAttachmentY()
public final boolean isSelected()
true
if vertex is selected otherwise false
public final boolean isVisible()
true
if vertex is visible otherwise false
public final void ensureVisibility()
GraphView.setAutoRepaint(boolean)
)!public java.lang.String toString()
toString
in class java.lang.Object
public void serialize(Serializer s)
Serializable
serialize
in interface Serializable
s
- the serializer for the objectpublic void deserialize(Serializer s)
Serializable
deserialize
in interface Serializable
s
- the serializer