|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.EdgeRealizer
public abstract class EdgeRealizer
Abstract graphical representation of an edge. This class provides
methods to draw an edge. For this to happen an edge must be bound
to the realizer. This can be done by calling
Graph2D.setRealizer(Edge,EdgeRealizer)
An edge realizer allows the use of control points, so called bends. These bends influence the graphical path of the edge.
Field Summary | |
---|---|
protected BendList |
bends
The list where bends are stored. |
protected java.awt.geom.GeneralPath |
path
The graphical path of this realizer that will be drawn. |
static byte |
PATH_CLIPPED_AT_SOURCE
Possible return value of calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D) . |
static byte |
PATH_CLIPPED_AT_SOURCE_AND_TARGET
Possible return value of calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D) . |
static byte |
PATH_CLIPPED_AT_TARGET
Possible return value of calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D) . |
static byte |
PATH_INVISBLE
Possible return value of calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D) . |
static byte |
PATH_UNCLIPPED
Possible return value of calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D) . |
Constructor Summary | |
---|---|
protected |
EdgeRealizer()
Instantiates a new EdgeRealizer with default values. |
protected |
EdgeRealizer(EdgeRealizer argEdgeRealizer)
Instantiates a new EdgeRealizer as a copy of the given edge realizer. |
Method Summary | |
---|---|
void |
addLabel(EdgeLabel label)
Adds the given edge label to this realizer. |
void |
addPoint(double x,
double y)
EdgeLayout interface implementation. |
Bend |
appendBend(double x,
double y)
Appends a newly created bend at location (x,y) to the list
of bends. |
void |
bendChanged(Bend b,
double oldX,
double oldY)
Informs the edge, that a bend has changed position By default this method does nothing. |
int |
bendCount()
Returns the number of bends of this realizer. |
int |
bendPos(Bend b)
Returns the index of the bend in the bend sequence. |
BendCursor |
bends()
Returns a cursor over all bends of this realizer. |
protected void |
bindEdge(Edge e)
Binds an actual edge to this realizer. |
static byte |
calculateClippingAndIntersection(EdgeRealizer er,
java.awt.geom.GeneralPath path,
java.awt.geom.GeneralPath result,
java.awt.geom.Point2D sourceIntersectionOut,
java.awt.geom.Point2D targetIntersectionOut)
Static helper method that can be used as a convenience to calculate a clipped version of a GeneralPath for an EdgeRealizer. |
protected abstract byte |
calculatePath(java.awt.geom.Point2D sourceIntersectionOut,
java.awt.geom.Point2D targetIntersectionOut)
Calculates the visible path of this realizer. |
void |
calcUnionRect(java.awt.geom.Rectangle2D r)
Calculates the union of rectangle enclosed by this realizer and r. |
void |
clearBends()
Removes all bends from this realizer. |
void |
clearPoints()
EdgeLayout interface implementation. |
boolean |
contains(double x,
double y)
Query if the visible path of this realizer contains the point (x,y). |
int |
containsSeg(double dx,
double dy)
like contains(), but returns number of the hit segment, 0 otherwise. |
abstract Bend |
createBend(double x,
double y,
Bend refBend,
int dir)
Adds a new bend before or after the given reference bend. |
EdgeRealizer |
createCopy()
Returns a copy of this realizer that is not bound to any edge. |
abstract EdgeRealizer |
createCopy(EdgeRealizer er)
Returns a realizer of the same type as this realizer, that adopts as many attributes as possible from the given realizer. |
EdgeLabel |
createEdgeLabel()
Creates a new edge label that can be added to this realizer. |
Bend |
firstBend()
Returns the first bend of the edge, null if the edge has none. |
Arrow |
getArrow()
Returns the arrow type at the target location of the edge path. |
double |
getArrowScaleFactor()
Calculates and returns the scaling factor of the arrows using the currently set LineType. |
Bend |
getBend(int index)
Returns the bend at the given positional index. |
Edge |
getEdge()
Returns the edge bound to this realizer. |
static java.awt.Color |
getHighlightedBendColor()
Returns the color of all highlighted bends. |
EdgeLabel |
getLabel()
Returns the first label associated with this realizer. |
EdgeLabel |
getLabel(int i)
Returns the i-th label of this realizer. |
java.lang.String |
getLabelText()
Returns the text of the associated label of this realizer. |
byte |
getLayer()
Returns the logical graphical layer for this realizer. |
java.awt.Color |
getLineColor()
Returns the line color of the edge path. |
LineType |
getLineType()
Returns the line type of the edge path. |
int |
getMinBendCount()
Returns the minimal number of bends the edge must have. |
MouseInputEditorProvider |
getMouseInputEditorProvider()
Returns a provider, that can be used to query for a mouse input editor for this realizer. |
java.awt.geom.GeneralPath |
getPath()
Returns the visible path of the edge as it will be drawn on a graphics context. |
YPoint |
getPoint(int index)
EdgeLayout interface implementation. |
static java.awt.Color |
getSelectionColor()
Returns the color of all selected edges. |
static java.awt.Stroke |
getSelectionStroke()
Returns the stroke of the selected edge. |
Arrow |
getSourceArrow()
Returns the arrow at the source location of the edge path. |
java.awt.geom.Point2D |
getSourceIntersection()
Returns the intersection point between this realizer and the source node realizer. |
YPoint |
getSourcePoint()
EdgeLayout interface implementation. |
Port |
getSourcePort()
Returns the source port of this edge realizer. |
NodeRealizer |
getSourceRealizer()
Returns the node realizer that is bound to the source node of the underlying edge. |
Arrow |
getTargetArrow()
Returns the arrow type at the target location of the edge path. |
java.awt.geom.Point2D |
getTargetIntersection()
Returns the intersection point between this realizer and the target node realizer. |
YPoint |
getTargetPoint()
EdgeLayout interface implementation. |
Port |
getTargetPort()
Returns the target port of this edge realizer. |
NodeRealizer |
getTargetRealizer()
Returns the node realizer that is bound to the target node of the underlying edge. |
boolean |
hasVisiblePath()
Determines whether this realizer is both visible and
has a currently visible, non-empty path . |
abstract Bend |
insertBend(double x,
double y)
Inserts a new bend into this realizer and returns it. |
boolean |
intersects(java.awt.geom.Rectangle2D box)
Checks whether the given rectangle overlaps the edge. |
protected boolean |
isDirty()
Whether or not this realizer requires an update of it's graphical representation. |
static boolean |
isLabelRenderingOrderInverted()
Returns whether or not the rendering order of the labels is inverted. |
boolean |
isPathClippedAtSource()
Returns whether the calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D) method
indicated that the calculated path had been clipped at the source side
of the path in order to account for the length
of the source arrow . |
boolean |
isPathClippedAtTarget()
Returns whether the calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D) method
indicated that the calculated path had been clipped at the source side
of the path in order to account for the length
of the source arrow . |
boolean |
isReversedPathRenderingEnabled()
Returns whether or not to render the path in reversed direction. |
boolean |
isSelected()
Returns the selected state of this realizer. |
boolean |
isVisible()
Returns the visibility state of this realizer. |
protected void |
labelBoundsChanged()
Callback method that should be overwritten by subclasses, that are interested in changes of the realizer's label bounds. |
int |
labelCount()
Returns the number of labels associated with this realizer. |
Bend |
lastBend()
Returns the last bend of the edge, null if the edge has none. |
void |
paint(java.awt.Graphics2D gfx)
Paints this realizer on the given graphics context. |
protected void |
paintArrows(java.awt.Graphics2D g)
Paints the arrows of this realizer. |
protected void |
paintBends(java.awt.Graphics2D gfx)
Paints the bends if they are in selected state. |
protected void |
paintHighlightedBends(java.awt.Graphics2D gfx)
Paints the bends if this realizer is in a selected state |
protected void |
paintLabels(java.awt.Graphics2D gfx)
Paints the labels belonging to this realizer. |
protected void |
paintPorts(java.awt.Graphics2D gfx)
Paints the ports of this realizer. |
void |
paintSloppy(java.awt.Graphics2D g)
Paints this realizer in a quick and rather sloppy way. |
boolean |
pathIntersects(java.awt.geom.Rectangle2D box,
boolean considerLabels)
This method complements the contains(double,double) method. |
int |
pointCount()
EdgeLayout interface implementation. |
void |
read(java.io.ObjectInputStream in)
Deprecated. Use the GraphML format instead. |
protected void |
recalculateFeatures()
Recalculates all features. |
void |
registerObstacles(BridgeCalculator calculator)
This callback method is e.g. by DefaultGraph2DRenderer if a BridgeCalculator
is used for the rendering whose crossing mode is set to
values other than BridgeCalculator.CROSSING_MODE_ORDER_INDUCED . |
abstract void |
reInsertBend(Bend bend,
Bend refBend,
int dir)
Reinserts a bend to the edge which had been removed before. |
abstract Bend |
removeBend(Bend b)
Removes a Bend of this realizer. |
void |
removeLabel(EdgeLabel label)
Removes the given edge label from this realizer. |
void |
removeLabel(int i)
Removes the i -th edge label from this realizer. |
void |
repaint()
Repaints this realizer. |
void |
setArrow(Arrow arrow)
Sets the arrow type at the target location of the edge path. |
void |
setDirty()
Marks this realizer as dirty. |
static void |
setHighlightedBendColor(java.awt.Color color)
Sets the color of all highlighted bends. |
static void |
setLabelRenderingOrderInverted(boolean isInverted)
Specifies whether or not the rendering order of the labels is inverted. |
void |
setLabelText(java.lang.String label)
Sets the text of the associated label for this realizer. |
void |
setLayer(byte l)
Sets the logical graphical layer for this realizer. |
void |
setLineColor(java.awt.Color c)
Sets the line color of the edge path. |
void |
setLineType(LineType t)
Sets the line type for the edge path. |
void |
setPoint(int index,
double x,
double y)
EdgeLayout interface implementation. |
void |
setPorts(Port sourceP,
Port targetP)
Sets the specified source- and target-port for this edge realizer. |
void |
setReversedPathRenderingEnabled(boolean enabled)
Specifies whether or not to render the path in reversed direction. |
void |
setSelected(boolean s)
Sets the selected state of this realizer. |
static void |
setSelectionColor(java.awt.Color color)
Sets the color of all selected edges. |
static void |
setSelectionStroke(LineType t)
Sets the stroke of a selected edges. |
void |
setSourceArrow(Arrow arrow)
Sets the arrow at the source location of the edge path. |
void |
setSourcePoint(YPoint point)
EdgeLayout interface implementation. |
void |
setSourcePort(Port p)
Sets the specified source port to this edge realizer. |
void |
setTargetArrow(Arrow arrow)
Sets the arrow type at the target location of the edge path. |
void |
setTargetPoint(YPoint point)
EdgeLayout interface implementation. |
void |
setTargetPort(Port p)
Sets the specified target port to this edge realizer. |
void |
setVisible(boolean visible)
Sets the visibility state of this realizer. |
void |
write(java.io.ObjectOutputStream out)
Deprecated. Use the GraphML format instead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte PATH_UNCLIPPED
calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D)
.
This value indicates that neither the source end nor the target end of the calculated path
took into account the length of the arrows
.
public static final byte PATH_CLIPPED_AT_SOURCE
calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D)
.
This value indicates that the source end but not the target end of the calculated path
took into account the length of the corresponding arrows
.
This constant can be bitwise combined with PATH_CLIPPED_AT_TARGET
to
produce PATH_CLIPPED_AT_SOURCE_AND_TARGET
.
public static final byte PATH_CLIPPED_AT_TARGET
calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D)
.
This value indicates that the target end but not the source end of the calculated path
took into account the length of the corresponding arrows
.
This constant can be bitwise combined with PATH_CLIPPED_AT_SOURCE
to
produce PATH_CLIPPED_AT_SOURCE_AND_TARGET
.
public static final byte PATH_CLIPPED_AT_SOURCE_AND_TARGET
calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D)
.
This value indicates that both the source end and the target end of the calculated path
took into account the length of the arrows
.
This value is the bitwise combination of with PATH_CLIPPED_AT_SOURCE
and
PATH_CLIPPED_AT_TARGET
.
public static final byte PATH_INVISBLE
calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D)
.
This value indicates that the calculation yielded an empty path because the whole path
had been clipped.
protected BendList bends
protected java.awt.geom.GeneralPath path
Constructor Detail |
---|
protected EdgeRealizer()
protected EdgeRealizer(EdgeRealizer argEdgeRealizer)
Method Detail |
---|
public EdgeRealizer createCopy()
createCopy(this)
.
public abstract EdgeRealizer createCopy(EdgeRealizer er)
protected void bindEdge(Edge e)
public NodeRealizer getTargetRealizer()
public NodeRealizer getSourceRealizer()
public Edge getEdge()
public void setPorts(Port sourceP, Port targetP)
public void setSourcePort(Port p)
public void setTargetPort(Port p)
public Port getSourcePort()
public Port getTargetPort()
public abstract Bend createBend(double x, double y, Bend refBend, int dir)
x
- X-coordinate of the Bendy
- Y-coordinate of the BendrefBend
- Bend which should be neighbordir
- indicates if the new Bend should be added before
Graph.BEFORE
or after Graph.AFTER
the refBend in
the bend sequence of the edgepublic abstract void reInsertBend(Bend bend, Bend refBend, int dir)
bend
- the bend to be reinsertedrefBend
- reference bend already contained in this realizerdir
- indicates whether the bend should be inserted before or after the
reference bend.Allowed values are Graph.AFTER
and Graph.BEFORE
.public abstract Bend insertBend(double x, double y)
x
- X-coordinates of the bendy
- Y-coordinates of the bend
Bend
instance or null
if no
bend was created for the given coordinates.public abstract Bend removeBend(Bend b)
b
- Bend to be removedpublic void bendChanged(Bend b, double oldX, double oldY)
b
- Bend which has changed positionoldX
- previous x-coordinateoldY
- previous y-coordinateprotected void labelBoundsChanged()
EdgeLabel
(position or size)
have changed.
public Bend appendBend(double x, double y)
(x,y)
to the list
of bends.
x
- X-coordinates of bendy
- Y-coordinates of bendpublic int bendPos(Bend b)
b
- the bend in questionpublic int bendCount()
public Bend getBend(int index)
index
- position of the Bend in the bend sequencepublic BendCursor bends()
public Bend firstBend()
public Bend lastBend()
public int getMinBendCount()
public void clearBends()
public YPoint getPoint(int index)
getPoint
in interface EdgeLayout
index
- the position of the control point in the control point sequence
EdgeLayout.getPoint(int)
public int pointCount()
pointCount
in interface EdgeLayout
EdgeLayout.pointCount()
public YPoint getSourcePoint()
getSourcePoint
in interface EdgeLayout
EdgeLayout.getSourcePoint()
public YPoint getTargetPoint()
getTargetPoint
in interface EdgeLayout
EdgeLayout.getTargetPoint()
public void setSourcePoint(YPoint point)
setSourcePoint
in interface EdgeLayout
point
- the new relative coordinates of the source pointEdgeLayout.setSourcePoint(YPoint)
public void setTargetPoint(YPoint point)
setTargetPoint
in interface EdgeLayout
point
- the new relative coordinates of the target pointEdgeLayout.setTargetPoint(YPoint)
public void setPoint(int index, double x, double y)
setPoint
in interface EdgeLayout
index
- the position of the changing control point in the sequencex
- the new absolute x-coordinate of the control point at the given indexy
- the new absolute y-coordinate of the control point at the given indexEdgeLayout.setPoint(int,double,double)
public void addPoint(double x, double y)
addPoint
in interface EdgeLayout
x
- the absolute x-coordinate of the new control pointy
- the absolute y-coordinate of the new control pointEdgeLayout.addPoint(double,double)
public void clearPoints()
clearPoints
in interface EdgeLayout
EdgeLayout.clearPoints()
public void registerObstacles(BridgeCalculator calculator)
DefaultGraph2DRenderer
if a BridgeCalculator
is used for the rendering whose crossing mode
is set to
values other than BridgeCalculator.CROSSING_MODE_ORDER_INDUCED
.
Implementations should use the provided calculator instance to call
BridgeCalculator.registerObstacles(java.awt.geom.PathIterator)
using the getPath()
method for example or
BridgeCalculator.registerObstacleLine(double, double, double, double)
directly to
add obstacle lines for the calculation directly.
This implementation does nothing.
calculator
- the calculator instance used for the next rendering pass.public void paintSloppy(java.awt.Graphics2D g)
public void repaint()
public void paint(java.awt.Graphics2D gfx)
protected void paintHighlightedBends(java.awt.Graphics2D gfx)
protected void paintBends(java.awt.Graphics2D gfx)
protected void paintPorts(java.awt.Graphics2D gfx)
protected void paintArrows(java.awt.Graphics2D g)
public double getArrowScaleFactor()
protected void paintLabels(java.awt.Graphics2D gfx)
protected abstract byte calculatePath(java.awt.geom.Point2D sourceIntersectionOut, java.awt.geom.Point2D targetIntersectionOut)
length
of
the source and/or target arrow.
Implementations of this method may use the
calculateClippingAndIntersection(EdgeRealizer, java.awt.geom.GeneralPath, java.awt.geom.GeneralPath, java.awt.geom.Point2D, java.awt.geom.Point2D)
method to perform the clipping.
sourceIntersectionOut
- a Point2D instance that must be set by the implementation to point
to the source intersection point
unless the path is empty.targetIntersectionOut
- a Point2D instance that must be set by the implementation to point
to the target intersection point
unless the path is empty.
PATH_UNCLIPPED
, PATH_CLIPPED_AT_SOURCE
,
PATH_CLIPPED_AT_TARGET
, or PATH_CLIPPED_AT_SOURCE_AND_TARGET
path
,
isPathClippedAtSource()
,
isPathClippedAtTarget()
public static final byte calculateClippingAndIntersection(EdgeRealizer er, java.awt.geom.GeneralPath path, java.awt.geom.GeneralPath result, java.awt.geom.Point2D sourceIntersectionOut, java.awt.geom.Point2D targetIntersectionOut)
lengths
of the source and target arrow. It will put the resulting intersection points into the out parameters
provided and return one of the constants as required for the calculatePath(java.awt.geom.Point2D, java.awt.geom.Point2D)
method.
er
- the EdgeRealizer which serves as the context of the pathpath
- a GeneralPath instance that will be flattened and appropriately clipped.result
- the GeneralPath instance that will store the result. This can be the same instance as path
. It
will be initially Path2D.reset()
sourceIntersectionOut
- the out parameter that will contain the source intersection point after the method has completedtargetIntersectionOut
- the out parameter that will contain the target intersection point after the method has completed
PATH_UNCLIPPED
, PATH_CLIPPED_AT_SOURCE
,
PATH_CLIPPED_AT_TARGET
, or PATH_CLIPPED_AT_SOURCE_AND_TARGET
protected final void recalculateFeatures()
public boolean hasVisiblePath()
visible
and
has a currently visible, non-empty path
.
public java.awt.geom.Point2D getSourceIntersection()
public java.awt.geom.Point2D getTargetIntersection()
public boolean isReversedPathRenderingEnabled()
By default this feature is disabled.
true
if the visual path will be rendered from target
to source end and false
if it will be rendered from source to
target end.setReversedPathRenderingEnabled(boolean)
public void setReversedPathRenderingEnabled(boolean enabled)
By default this feature is disabled.
enabled
- if true
the visual path will be rendered from
target to source end; otherwise it will be rendered from source to target
end.isReversedPathRenderingEnabled()
public java.awt.Color getLineColor()
This attribute defaults to Color.black
.
setLineColor(java.awt.Color)
public void setLineColor(java.awt.Color c)
This attribute defaults to Color.black
.
getLineColor()
public static java.awt.Color getSelectionColor()
By default the color Color.orange
is returned.
setSelectionColor(java.awt.Color)
public static void setSelectionColor(java.awt.Color color)
By default the color Color.cyan
is set.
getSelectionColor()
public static void setHighlightedBendColor(java.awt.Color color)
By default the color Color.green
is set.
getHighlightedBendColor()
public static java.awt.Color getHighlightedBendColor()
By default the color Color.green
is returned.
setHighlightedBendColor(java.awt.Color)
public static void setLabelRenderingOrderInverted(boolean isInverted)
By default the rendering order is inverted that means the last inserted label is rendered first.
isLabelRenderingOrderInverted()
public static boolean isLabelRenderingOrderInverted()
By default the rendering order is inverted that means the last inserted label is rendered first.
setLabelRenderingOrderInverted(boolean)
public LineType getLineType()
This attribute defaults to LineType.LINE_1
.
setLineType(LineType)
public void setLineType(LineType t)
This attribute defaults to LineType.LINE_1
.
getLineType()
public static void setSelectionStroke(LineType t)
This attribute defaults to LineType.LINE_5
.
getSelectionStroke()
public static java.awt.Stroke getSelectionStroke()
This attribute defaults to LineType.LINE_5
.
setSelectionStroke(LineType)
public Arrow getArrow()
getTargetArrow()
.
This attribute defaults to Arrow.NONE
.
setTargetArrow(Arrow)
,
getSourceArrow()
,
setSourceArrow(Arrow)
public void setArrow(Arrow arrow)
setTargetArrow(Arrow)
.
This attribute defaults to Arrow.NONE
.
getTargetArrow()
,
setTargetArrow(Arrow)
,
getSourceArrow()
,
setSourceArrow(Arrow)
public Arrow getTargetArrow()
This attribute defaults to Arrow.NONE
.
setTargetArrow(Arrow)
,
getSourceArrow()
,
setSourceArrow(Arrow)
public void setTargetArrow(Arrow arrow)
This attribute defaults to Arrow.NONE
.
getTargetArrow()
,
getSourceArrow()
,
setSourceArrow(Arrow)
public Arrow getSourceArrow()
This attribute defaults to Arrow.NONE
.
setSourceArrow(Arrow)
,
getTargetArrow()
,
setTargetArrow(Arrow)
public void setSourceArrow(Arrow arrow)
This attribute defaults to Arrow.NONE
.
getSourceArrow()
,
getTargetArrow()
,
setTargetArrow(Arrow)
public void setLayer(byte l)
Graph2DView.FG_LAYER
,
Graph2DView.BG_LAYER
public byte getLayer()
Graph2DView.FG_LAYER
,
Graph2DView.BG_LAYER
public void setVisible(boolean visible)
public boolean isVisible()
public boolean isPathClippedAtSource()
calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D)
method
indicated that the calculated path had been clipped at the source side
of the path in order to account for the length
of the source arrow
.
This information is queried by paintArrows(java.awt.Graphics2D)
.
public boolean isPathClippedAtTarget()
calculatePath(java.awt.geom.Point2D,java.awt.geom.Point2D)
method
indicated that the calculated path had been clipped at the source side
of the path in order to account for the length
of the source arrow
.
This information is queried by paintArrows(java.awt.Graphics2D)
.
public void setSelected(boolean s)
public boolean isSelected()
public void setDirty()
protected boolean isDirty()
public java.awt.geom.GeneralPath getPath()
public MouseInputEditorProvider getMouseInputEditorProvider()
MouseInputEditorProvider
interface.
MouseInputEditorProvider
or null,
if no such provider is bound to this realizer.public void addLabel(EdgeLabel label)
public void removeLabel(EdgeLabel label)
label
- the edge label to remove from this realizer.removeLabel(int)
public void removeLabel(int i)
i
-th edge label from this realizer.
i
- the index of the edge label to remove.
java.lang.IndexOutOfBoundsException
- if i >= labelCount
or
i < 0
.removeLabel(EdgeLabel)
public EdgeLabel getLabel()
created
,
added
to the realizer, and returned.
public int labelCount()
public EdgeLabel getLabel(int i)
public void setLabelText(java.lang.String label)
public java.lang.String getLabelText()
public EdgeLabel createEdgeLabel()
public boolean contains(double x, double y)
public int containsSeg(double dx, double dy)
public void calcUnionRect(java.awt.geom.Rectangle2D r)
public boolean pathIntersects(java.awt.geom.Rectangle2D box, boolean considerLabels)
contains(double,double)
method.
Its primary use is for checking whether or not an edge lies within
the bounds of a selection box.
box
- the box that will be used for the intersection testconsiderLabels
- if true
, labels will be considered
public boolean intersects(java.awt.geom.Rectangle2D box)
box
- The box that has to be checked on intersection with this edge.public void write(java.io.ObjectOutputStream out) throws java.io.IOException
GraphML format
instead.
java.io.IOException
public void read(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
GraphML format
instead.
write(ObjectOutputStream)
method.
java.io.IOException
java.lang.ClassNotFoundException
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |