EDU.auburn.VGJ.graph
Class Edge
java.lang.Object
|
+--EDU.auburn.VGJ.graph.Edge
- Direct Known Subclasses:
- Link
- public class Edge
- extends java.lang.Object
A class for representing a graph edge.
Here is the source.
- Author:
- Larry Barowski, Dennis Wagelaar
Method Summary |
void |
draw(java.awt.Graphics graphics,
Matrix44 transform,
boolean inplane,
boolean directed,
boolean arrow_only,
int quality,
GraphCanvas canvas,
int which_gr)
|
java.lang.String |
getLabel()
|
int |
getLineStyle()
|
Node |
head()
|
boolean |
isDummy()
|
DPoint3[] |
points()
|
protected java.lang.String |
PSnum_(double num)
Formats a number for use in Postscript. |
protected java.lang.StringBuffer |
psString_(java.lang.String source)
Add escape characters for PostScript. |
void |
saveState()
|
void |
setGMLvalues(GMLobject gml)
|
void |
setLabel(java.lang.String label)
|
void |
setLineStyle(int line_style)
|
void |
slide(Matrix44 moveTransform,
Matrix44 viewTransform,
int xoffs,
int yoffs)
|
Node |
tail()
|
java.lang.String |
toPS(Matrix44 transform,
boolean inplane,
boolean directed)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
head_
protected Node head_
tail_
protected Node tail_
points_
protected DPoint3[] points_
selected
public boolean selected
styleNames
public static java.lang.String[] styleNames
styleColors
public static java.awt.Color[] styleColors
styleLabels
public static java.lang.String[] styleLabels
stylePatterns
public static java.lang.String[] stylePatterns
defaultDataTypes_
public static java.lang.String[] defaultDataTypes_
- Just change this list to change the data types.
data_
public java.util.Hashtable data_
data
public java.lang.Object data
- A general purpose data field.
Algorithms that operate on Edges can store any necessary data here.
Edge
public Edge(Node tail,
Node head,
DPoint3[] points,
boolean dummy)
Edge
public Edge(Node tail,
Node head,
Edge from)
Edge
public Edge(Node tail,
Node head,
GMLobject gml)
setGMLvalues
public void setGMLvalues(GMLobject gml)
draw
public void draw(java.awt.Graphics graphics,
Matrix44 transform,
boolean inplane,
boolean directed,
boolean arrow_only,
int quality,
GraphCanvas canvas,
int which_gr)
toPS
public java.lang.String toPS(Matrix44 transform,
boolean inplane,
boolean directed)
psString_
protected java.lang.StringBuffer psString_(java.lang.String source)
- Add escape characters for PostScript. Make this part of a
static utility later. Was private, made protected by Dennis Wagelaar.
- Parameters:
source
- The string to format.- Returns:
- The formatted string.
PSnum_
protected java.lang.String PSnum_(double num)
- Formats a number for use in Postscript. Was private, made protected
by Dennis Wagelaar. Removed bug (>0 has become >= 0).
- Parameters:
num
- The number to format.- Returns:
- The formatted number.
points
public DPoint3[] points()
head
public Node head()
tail
public Node tail()
isDummy
public boolean isDummy()
saveState
public void saveState()
slide
public void slide(Matrix44 moveTransform,
Matrix44 viewTransform,
int xoffs,
int yoffs)
getLabel
public java.lang.String getLabel()
setLabel
public void setLabel(java.lang.String label)
setLineStyle
public void setLineStyle(int line_style)
getLineStyle
public int getLineStyle()