|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jgraph.graph.AbstractCellView
com.jgraph.graph.EdgeView
The default implementation of an edge view.
| Nested Class Summary | |
class |
EdgeView.EdgeHandle
|
| Field Summary | |
protected java.awt.Point |
labelPosition
Cached label position of the edge. |
protected java.util.List |
points
List of points of the edge. |
static EdgeRenderer |
renderer
Renderer for the class. |
protected PortView |
source
Cached source and target portview of the edge. |
protected PortView |
target
Cached source and target portview of the edge. |
| Fields inherited from class com.jgraph.graph.AbstractCellView |
attributes, cell, cellEditor, childViews, graph, mapper, parent |
| Constructor Summary | |
EdgeView(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.Point p)
Adds p at position index. |
java.awt.Rectangle |
getBounds()
Returns the location for this portview. |
EdgeRenderer |
getEdgeRenderer()
Returns the local renderer. |
CellHandle |
getHandle(GraphContext context)
Returns a cell handle for the view. |
java.awt.Point |
getLabelPosition()
Returns a point that describes the position of the label. |
java.awt.Point |
getPoint(int index)
Returns the cached points for this edge. |
int |
getPointCount()
Returns the number of point for this edge. |
CellViewRenderer |
getRenderer()
Returns a renderer for the class. |
PortView |
getSource()
Returns the portview that represents the source of the edge. |
PortView |
getTarget()
Returns the portview that represents the target of the edge. |
boolean |
intersects(java.awt.Graphics g,
java.awt.Rectangle rect)
Returns true if this view intersects the given rectangle. |
boolean |
isAddPointEvent(java.awt.event.MouseEvent event)
Returning true signifies a mouse event adds a new point to an edge. |
boolean |
isRemovePointEvent(java.awt.event.MouseEvent event)
Returning true signifies a mouse event removes a given point. |
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.Point pos)
Sets the description of the label position. |
void |
setPoint(int index,
java.awt.Point p)
Sets the point at index to p. |
void |
setSource(PortView sourceView)
Sets the sourceView of the edge. |
void |
setTarget(PortView targetView)
Sets the targetView of the edge. |
void |
update()
Update attributes and recurse children. |
| Methods inherited from class com.jgraph.graph.AbstractCellView |
getAttributes, getBounds, getCell, getChildViews, getDescendantViews, getEditor, getGraph, getMapper, getModel, getParentView, getRendererComponent, isControlAttribute, isLeaf, removeFromParent, scale, setAttributes, setBounds, translate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static EdgeRenderer renderer
protected java.util.List points
protected PortView source
protected PortView target
protected java.awt.Point labelPosition
| Constructor Detail |
public EdgeView(java.lang.Object cell,
JGraph graph,
CellMapper mapper)
cell - reference to the model object| Method Detail |
public void refresh(boolean createDependentViews)
refresh in interface CellViewrefresh in class AbstractCellViewpublic void update()
update in interface CellViewupdate in class AbstractCellView
public boolean intersects(java.awt.Graphics g,
java.awt.Rectangle rect)
intersects in interface CellViewintersects in class AbstractCellViewpublic java.awt.Rectangle getBounds()
getBounds in interface CellViewgetBounds in class AbstractCellViewpublic EdgeRenderer getEdgeRenderer()
public CellViewRenderer getRenderer()
getRenderer in class AbstractCellViewpublic CellHandle getHandle(GraphContext context)
getHandle in interface CellViewgetHandle in class AbstractCellViewpublic PortView getSource()
public void setSource(PortView sourceView)
sourceView of the edge.
public PortView getTarget()
public void setTarget(PortView targetView)
targetView of the edge.
public java.awt.Point getLabelPosition()
public void setLabelPosition(java.awt.Point pos)
public int getPointCount()
public java.awt.Point getPoint(int index)
public void setPoint(int index,
java.awt.Point p)
index to p.
public void addPoint(int index,
java.awt.Point p)
p at position index.
public void removePoint(int index)
index.
public boolean isAddPointEvent(java.awt.event.MouseEvent event)
public boolean isRemovePointEvent(java.awt.event.MouseEvent event)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||