|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tigris.gef.presentation.Fig
org.tigris.gef.presentation.FigEdge
public abstract class FigEdge
Abastract Fig class for representing edges between ports.
FigEdgeLine,
FigEdgeRectiline,
Serialized Form| Field Summary | |
|---|---|
protected ArrowHead |
_arrowHeadEnd
The ArrowHead at the end of the line |
protected ArrowHead |
_arrowHeadStart
The ArrowHead at the start of the line |
protected FigNode |
_destFigNode
FigNode presenting the edge's to-port's parent node. |
protected Fig |
_fig
Fig that presents the edge. |
protected boolean |
_highlight
True when the FigEdgde should be drawn highlighted. |
protected java.util.Vector |
_pathItems
The items that are accumulated along the path, a vector. |
protected FigNode |
_sourceFigNode
FigNode presenting the edge's from-port's parent node. |
protected boolean |
_useNearest
True if the FigEdge should be drawn from the nearest point of each port Fig. |
| Fields inherited from class org.tigris.gef.presentation.Fig |
|---|
_allowsSaving, _context, _dashes, _dashPeriod, _dashStyle, _filled, _h, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, MIN_SIZE |
| Constructor Summary | |
|---|---|
FigEdge()
Contruct a new FigEdge without any underlying edge. |
|
FigEdge(Fig s,
Fig d,
FigNode sfn,
FigNode dfn,
java.lang.Object edge)
Contruct a new FigEdge with the given source and destination port figs and FigNodes. |
|
| Method Summary | |
|---|---|
void |
addPathItem(Fig newFig,
PathConv newPath)
Add a new path item to this FigEdge. |
void |
calcBounds()
Update my bounding box |
void |
cleanUp()
|
void |
computeRoute()
Method to compute the route a FigEdge should follow. |
boolean |
contains(int x,
int y)
Reply true if the given point is inside the given Fig. |
boolean |
getBetweenNearestPoints()
Get and set the flag about using Fig connection points rather than centers. |
java.awt.Rectangle |
getBounds()
Reply the bounding box for this FigEdge. |
java.awt.Rectangle |
getBounds(java.awt.Rectangle r)
Reply the bounding box for this FigEdge. |
boolean |
getDashed()
Get the dashed attribute |
ArrowHead |
getDestArrowHead()
Get the ArrowHead at the end of this FigEdge. |
Fig |
getDestFigNode()
USED BY PGML.tee |
Fig |
getDestPortFig()
USED BY PGML.tee |
Fig |
getFig()
Return the Fig that will be drawn. |
java.awt.Point |
getFirstPoint()
The first point ion an edge USED BY PGML.tee |
boolean |
getHighlight()
|
java.awt.Point |
getLastPoint()
|
java.awt.Color |
getLineColor()
USED BY PGML.tee |
int |
getLineWidth()
USED BY PGML.tee |
int |
getNumPoints()
|
Fig |
getPathItem(PathConv pointOnPath)
Return the path item on this FigEdge closest to the given location. |
Fig |
getPathItemFig(org.tigris.gef.presentation.FigEdge.PathItem pathItem)
Return the fig of a given path item. |
java.util.Vector |
getPathItemFigs()
Return all figs of the path items |
java.util.Vector |
getPathItemsRaw()
Return the vector of path items on this FigEdge. |
int |
getPerimeterLength()
Return the length of the path around this Fig. |
java.awt.Point |
getPoint(int i)
|
java.awt.Point[] |
getPoints()
|
java.lang.String |
getPrivateData()
TODO document Used in SVG.TEE |
ArrowHead |
getSourceArrowHead()
Get the ArrowHead at the start of this FigEdge. |
Fig |
getSourceFigNode()
USED BY PGML.tee |
Fig |
getSourcePortFig()
USED BY PGML.tee |
int[] |
getXs()
|
int[] |
getYs()
|
boolean |
hasFillColor()
An edge cannot be filled with color |
boolean |
hit(java.awt.Rectangle r)
Determine if the given rectangle contains some pixels of the Fig. |
Fig |
hitFig(java.awt.Rectangle r)
|
boolean |
intersects(java.awt.Rectangle r)
Reply true if the object intersects the given rectangle. |
boolean |
isReshapable()
Returns true if this Fig can be reshaped by the user. |
boolean |
isResizable()
Determine if this Fig can be resized |
boolean |
isRotatable()
Returns true if this Fig can be rotated by the user. |
protected abstract Fig |
makeEdgeFig()
Abstract method to make the Fig that will be drawn for this FigEdge. |
void |
paint(java.awt.Graphics g)
Paint this FigEdge. |
protected void |
paintArrowHeads(java.awt.Graphics g)
Paint ArrowHeads on this FigEdge. |
void |
paintHighlightLine(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2)
|
protected void |
paintPathItems(java.awt.Graphics g)
Paint any labels that are located relative to this FigEdge. |
void |
postLoad()
After the file is loaded, re-establish any connections from the model to the Figs |
void |
propertyChange(java.beans.PropertyChangeEvent pce)
By default just pass it up to enclosing groups. |
void |
removeFromDiagram()
Remove this Fig from the Layer it belongs to. |
void |
removePathItem(Fig goneFig)
|
void |
removePathItem(org.tigris.gef.presentation.FigEdge.PathItem goneItem)
Removes the given path item. |
void |
setBetweenNearestPoints(boolean un)
|
void |
setDashed(boolean d)
Set line to be dashed or not |
void |
setDestArrowHead(ArrowHead newArrow)
Set the ArrowHead at the end of this FigEdge. |
void |
setDestFigNode(FigNode fn)
Set the FigNode reprenting this FigEdge's to-node. |
void |
setDestPortFig(Fig fig)
Set the Fig reprenting this FigEdge's to-port. |
void |
setFig(Fig f)
|
void |
setHighlight(boolean b)
|
void |
setLineColor(java.awt.Color c)
Sets the line color of the edge and of soure/destination arrows. |
void |
setLineWidth(int w)
Set the line width. |
void |
setNumPoints(int npoints)
|
void |
setOwner(java.lang.Object own)
Set the edge (some object in an underlying model) that this FigEdge should represent. |
void |
setPoint(Handle h,
int x,
int y)
|
void |
setPoint(int i,
int x,
int y)
|
void |
setPoints(java.awt.Point[] ps)
Get and set the points along a path for Figs that are path-like. |
void |
setSourceArrowHead(ArrowHead newArrow)
Set the ArrowHead at the start of this FigEdge. |
void |
setSourceFigNode(FigNode fn)
Set the FigNode reprenting this FigEdge's from-node. |
void |
setSourcePortFig(Fig fig)
Get the Fig reprenting this FigEdge's from-port. |
void |
setXs(int[] xs)
|
void |
setYs(int[] ys)
|
void |
stuffPointAlongPerimeter(int dist,
java.awt.Point res)
|
void |
translateEdge(int dx,
int dy)
|
void |
updatePathItemLocations()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.tigris.gef.ui.Highlightable |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
protected FigNode _sourceFigNode
protected FigNode _destFigNode
protected Fig _fig
protected boolean _useNearest
protected boolean _highlight
protected ArrowHead _arrowHeadStart
protected ArrowHead _arrowHeadEnd
protected java.util.Vector _pathItems
| Constructor Detail |
|---|
public FigEdge()
public FigEdge(Fig s,
Fig d,
FigNode sfn,
FigNode dfn,
java.lang.Object edge)
| Method Detail |
|---|
public void addPathItem(Fig newFig,
PathConv newPath)
public void calcBounds()
calcBounds in class FigFigText.calcBounds()public void cleanUp()
cleanUp in class Figpublic void computeRoute()
public boolean contains(int x,
int y)
Fig
contains in class FigFigCircle,
FigEdgepublic void removeFromDiagram()
Fig
removeFromDiagram in class Figpublic boolean getBetweenNearestPoints()
public java.awt.Rectangle getBounds()
getBounds in class Figpublic java.awt.Rectangle getBounds(java.awt.Rectangle r)
getBounds in class Figr - the return value, modified to the components bounds
public boolean getDashed()
Fig
getDashed in class Figpublic ArrowHead getDestArrowHead()
public Fig getDestFigNode()
public Fig getDestPortFig()
public Fig getFig()
public java.awt.Point getFirstPoint()
getFirstPoint in class Figpublic boolean getHighlight()
getHighlight in interface Highlightablepublic java.awt.Point getLastPoint()
getLastPoint in class Figpublic java.awt.Color getLineColor()
getLineColor in class Figpublic boolean hasFillColor()
hasFillColor in class Figpublic int getLineWidth()
getLineWidth in class Figpublic int getNumPoints()
getNumPoints in class Figpublic Fig getPathItem(PathConv pointOnPath)
public Fig getPathItemFig(org.tigris.gef.presentation.FigEdge.PathItem pathItem)
public java.util.Vector getPathItemFigs()
public java.util.Vector getPathItemsRaw()
public int getPerimeterLength()
Fig
getPerimeterLength in class Figpublic java.awt.Point[] getPoints()
getPoints in class Figpublic java.awt.Point getPoint(int i)
getPoint in class Figpublic java.lang.String getPrivateData()
getPrivateData in class Figpublic ArrowHead getSourceArrowHead()
public Fig getSourceFigNode()
public Fig getSourcePortFig()
public int[] getXs()
getXs in class Figpublic int[] getYs()
getYs in class Figpublic boolean hit(java.awt.Rectangle r)
Fig
hit in class Figr - the rectangular hit area
public Fig hitFig(java.awt.Rectangle r)
public boolean intersects(java.awt.Rectangle r)
Fig
intersects in class Figpublic boolean isReshapable()
Fig
isReshapable in class Figpublic boolean isResizable()
Fig
isResizable in class Figpublic boolean isRotatable()
Fig
isRotatable in class Figprotected abstract Fig makeEdgeFig()
public void paint(java.awt.Graphics g)
paint in class Figprotected void paintArrowHeads(java.awt.Graphics g)
public void paintHighlightLine(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2)
protected void paintPathItems(java.awt.Graphics g)
public void postLoad()
postLoad in class Figpublic void propertyChange(java.beans.PropertyChangeEvent pce)
Fig
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class Figpublic void removePathItem(org.tigris.gef.presentation.FigEdge.PathItem goneItem)
public void removePathItem(Fig goneFig)
public void setBetweenNearestPoints(boolean un)
public void setDashed(boolean d)
Fig
setDashed in class Figpublic void setDestArrowHead(ArrowHead newArrow)
public void setDestFigNode(FigNode fn)
public void setDestPortFig(Fig fig)
public void setFig(Fig f)
public void setHighlight(boolean b)
setHighlight in interface Highlightablepublic void setLineColor(java.awt.Color c)
setLineColor in class Figc - public void setLineWidth(int w)
Fig
setLineWidth in class Figw - The new lineWidth valuepublic void setNumPoints(int npoints)
setNumPoints in class Figpublic void setOwner(java.lang.Object own)
setOwner in class Figpublic void setPoints(java.awt.Point[] ps)
Fig
setPoints in class Fig
public void setPoint(int i,
int x,
int y)
setPoint in class Fig
public void setPoint(Handle h,
int x,
int y)
setPoint in class Figpublic void setSourceArrowHead(ArrowHead newArrow)
public void setSourceFigNode(FigNode fn)
public void setSourcePortFig(Fig fig)
public void setXs(int[] xs)
setXs in class Figpublic void setYs(int[] ys)
setYs in class Fig
public void stuffPointAlongPerimeter(int dist,
java.awt.Point res)
stuffPointAlongPerimeter in class Fig
public void translateEdge(int dx,
int dy)
public void updatePathItemLocations()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||