public class VisualEdge extends AbstractVisualGraphComponent
| Constructor and Description |
|---|
VisualEdge(Edge edge,
VisualGraph vGraph)
Creates a new VisualEdge object that encapsulates the given Edge object.
|
| Modifier and Type | Method and Description |
|---|---|
Edge |
getEdge()
Returns the Edge object that VisualEdge encapsulates.
|
float |
getEdgeLength(VisualEdge vEdge,
Point fromPoint,
Point toPoint)
Returns the length of the VisualEdge as dictated by its GeneralPath
|
Point2D.Double |
getFromPortAssignment() |
Point2D.Double |
getToPortAssignment() |
VisualVertex |
getVisualVertexA()
Returns the VisualVertex object at the tail of the edge.
|
VisualVertex |
getVisualVertexB()
Returns the VisualVertex object at the head of the edge.
|
void |
paint(Graphics2D g2d,
GraphLayoutManager layoutmanager)
Draw the VisualEdge with the specified 2D graphics context.
|
double |
ptSegDist(int x,
int y)
Returns the distance between a point and the edge's path.
|
void |
rescale()
Do nothing.
|
void |
setFromPortAssignment(Point2D newport) |
protected void |
setLinetype(int linetype) |
void |
setOrthogonalLine() |
void |
setStraightLine() |
void |
setToPortAssignment(Point2D newport) |
String |
toString()
String representation of the VisualGraphComponent.
|
addMouseListener, addMouseMotionListener, getBounds, getBounds2D, getFillcolor, getFont, getFontcolor, getFontMetrics, getGeneralPath, getLabel, getOutlinecolor, getPainter, getVisualGraph, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeMouseListener, removeMouseMotionListener, setFillcolor, setFont, setFontcolor, setGeneralPath, setGeneralPath, setLabel, setOutlinecolor, setPainterpublic VisualEdge(Edge edge, VisualGraph vGraph)
edge - The Edge object that the VisualEdge will encapsulate.visualgraph - The VisualGraph object where the VisualEdge will be drawn.public Edge getEdge()
public VisualVertex getVisualVertexA()
public VisualVertex getVisualVertexB()
protected void setLinetype(int linetype)
public void setOrthogonalLine()
public void setStraightLine()
public void setFromPortAssignment(Point2D newport)
public void setToPortAssignment(Point2D newport)
public Point2D.Double getFromPortAssignment()
public Point2D.Double getToPortAssignment()
public String toString()
VisualGraphComponenttoString in interface VisualGraphComponenttoString in class Objectpublic double ptSegDist(int x,
int y)
x - x coordinate of the pointy - y coordinate of the pointspublic void paint(Graphics2D g2d, GraphLayoutManager layoutmanager)
g2d - The Graphics2D graphics context object used to draw
the VisualEdge object.public void rescale()
public float getEdgeLength(VisualEdge vEdge, Point fromPoint, Point toPoint)
Copyright © 2019 JULIE Lab, Germany. All rights reserved.