|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object EdgeView net.clackrouter.router.graph.WireView
public class WireView
Represents a view of both a RouterWire
and TopoWire
.
Based heavily on the EdgeView JGraph class.
Nested Class Summary | |
---|---|
static class |
WireView.EdgeHandle
|
Field Summary | |
---|---|
WireRenderer |
wireRenderer
|
Constructor Summary | |
---|---|
WireView(java.lang.Object cell,
JGraph graph,
CellMapper mapper)
Constructs an edge view for the specified model object. |
Method Summary | |
---|---|
void |
addPoint(int index,
java.awt.geom.Point2D p)
Adds p at position index . |
void |
alert()
|
void |
clackPaint()
|
java.awt.geom.Rectangle2D |
getBounds()
Returns the location for this portview. |
ClackView |
getClackView()
|
CellHandle |
getHandle(GraphContext context)
Returns a cell handle for the view. |
java.awt.geom.Point2D |
getLabelPosition()
Returns a point that describes the position of the label. |
static double |
getLength(CellView view)
|
java.awt.geom.Point2D |
getPoint(int index)
Returns the cached points for this edge. |
int |
getPointCount()
Returns the number of point for this edge. |
java.util.List |
getPoints()
Returns the points. |
CellViewRenderer |
getRenderer()
|
java.awt.Shape |
getShape()
Returns the shape of the view according to the last rendering state |
CellView |
getSource()
Returns the CellView that represents the source of the edge. |
CellView |
getTarget()
Returns the CellView that represents the target of the edge. |
boolean |
intersects(java.awt.Graphics g,
java.awt.geom.Rectangle2D rect)
Returns true if this view intersects the given rectangle. |
boolean |
isHighlighted()
|
void |
refresh(boolean createDependentViews)
Overrides the parent method to udpate the cached points, source and target port. |
void |
removePoint(int index)
Removes the point at position index . |
void |
setLabelPosition(java.awt.geom.Point2D pos)
Sets the description of the label position. |
void |
setPoint(int index,
java.awt.geom.Point2D p)
Sets the point at index to p . |
void |
setSource(CellView sourceView)
Sets the sourceView of the edge. |
void |
setTarget(CellView targetView)
Sets the targetView of the edge. |
void |
startHighlight()
|
void |
update()
Update attributes and recurse children. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public WireRenderer wireRenderer
Constructor Detail |
---|
public WireView(java.lang.Object cell, JGraph graph, CellMapper mapper)
cell
- reference to the model objectMethod Detail |
---|
public CellViewRenderer getRenderer()
public ClackView getClackView()
getClackView
in interface ClackPaintable
public boolean isHighlighted()
public void startHighlight()
public void clackPaint()
clackPaint
in interface ClackPaintable
public void alert()
alert
in interface Alerter.Alertable
public void refresh(boolean createDependentViews)
public void update()
public java.awt.Shape getShape()
public boolean intersects(java.awt.Graphics g, java.awt.geom.Rectangle2D rect)
public java.awt.geom.Rectangle2D getBounds()
public CellHandle getHandle(GraphContext context)
public CellView getSource()
public void setSource(CellView sourceView)
sourceView
of the edge.
public CellView getTarget()
public void setTarget(CellView targetView)
targetView
of the edge.
public java.awt.geom.Point2D getLabelPosition()
public void setLabelPosition(java.awt.geom.Point2D pos)
public java.util.List getPoints()
public int getPointCount()
public java.awt.geom.Point2D getPoint(int index)
public void setPoint(int index, java.awt.geom.Point2D p)
index
to p
.
public void addPoint(int index, java.awt.geom.Point2D p)
p
at position index
.
public void removePoint(int index)
index
.
public static double getLength(CellView view)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |