public class IlvSegmentedHyperEdge extends IlvHyperEdge implements IlvParameterizedCrossingAwareObject
IlvSegmentedHyperEdge
is a hyperedge that consists of several
line segments. The line segments can be orthogonal or vertical or have an
arbitrary angle.IlvHyperGrapher
,
IlvHyperEdge
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
IlvSegmentedHyperEdge.HyperEdgeEnd
This is the hyperedge end of an segmented hyperedge.
|
class |
IlvSegmentedHyperEdge.Segment
A segment of the hyperedge.
|
static class |
IlvSegmentedHyperEdge.SegmentShape
This class is used to store the internal shape of the hyperedge in ivl
files.
|
BRIDGE_CROSSINGS, CUSTOM_CROSSINGS, NO_CROSSINGS, TUNNEL_CROSSINGS
Constructor and Description |
---|
IlvSegmentedHyperEdge()
Creates a new segmented hyperedge.
|
IlvSegmentedHyperEdge(IlvGraphicVector from,
IlvGraphicVector to)
Creates a new segmented hyperedge.
|
IlvSegmentedHyperEdge(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
IlvSegmentedHyperEdge(IlvSegmentedHyperEdge source)
Creates an
IlvSegmentedHyperEdge by copying an existing one. |
Modifier and Type | Method and Description |
---|---|
protected void |
actOnAdjustmentEnd()
Reacts on adjustment end.
|
IlvSegmentedHyperEdge.Segment |
addSegment(IlvHyperEdgeEnd end,
double angle)
Adds a new segment at the hyperedge end.
|
IlvSegmentedHyperEdge.Segment |
addSegment(IlvHyperEdgeEnd end,
double x,
double y,
IlvTransformer t)
Adds a new segment at the hyperedge end.
|
IlvSegmentedHyperEdge.Segment |
addSegment(IlvHyperEdgeEnd end1,
IlvHyperEdgeEnd end2)
Adds a new segment at the hyperedge ends.
|
IlvSegmentedHyperEdge.Segment |
addSegment(IlvSegmentedHyperEdge.Segment existingSegment,
double x1,
double y1,
double x2,
double y2,
IlvTransformer t)
Adds a new segment incident to the existing input segment.
|
IlvSegmentedHyperEdge.Segment |
addSegment(IlvSegmentedHyperEdge.Segment existingSegment,
double angle,
double x,
double y,
IlvTransformer t)
Adds a new segment incident to the existing input segment.
|
IlvSegmentedHyperEdge.Segment |
addSegment(IlvSegmentedHyperEdge.Segment existingSegment,
double x,
double y,
IlvTransformer t)
Adds a new segment incident to the existing input segment.
|
protected void |
afterAddEnd(IlvHyperEdgeEnd end,
boolean fromSide)
Called after the hyperedge end point is added to the edge.
|
void |
afterDo(IlvOrderedCompoundEdit undo)
This method must be called if undo support is needed for a specific
operation.
|
void |
applyTransform(IlvTransformer t)
Applies a transformation to the shape of the hyperedge.
|
IlvOrderedCompoundEdit |
beforeDo(String undoPresentationName)
This method must be called if undo support is needed for a specific
operation.
|
protected void |
beforeRemoveEnd(IlvHyperEdgeEnd end,
boolean fromSide)
Called before the hyperedge end point is removed from the edge.
|
IlvRect |
boundingBoxCrossingGraphic(IlvTransformer t)
Returns the bounding rectangle of the crossing graphic that belongs to this
object.
|
protected IlvRect |
calcBoundingBox(IlvTransformer t)
Calculates the bounding rectangle of the object.
|
protected void |
clearBoundingBoxCache()
Clears the bounding box cache.
|
boolean |
connectSegments(IlvSegmentedHyperEdge.Segment segment1,
IlvSegmentedHyperEdge.Segment segment2)
Connects both input segments.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of the hyperedge.
|
boolean |
containsAtCrossingGraphic(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of the crossing graphic that
belongs to this object.
|
HashMap |
copyShapeFrom(IlvHyperEdge source)
Copies all the ends from the input source edge.
|
protected IlvGraphic |
createCrossingGraphic(int mode)
Creates the appropriate crossing graphic.
|
protected IlvHyperEdgeEnd |
createEnd(IlvGraphic node,
boolean origin)
Creates a hyperedge end point.
|
boolean |
deleteSelection(boolean redraw)
Deletes the selection in the inner of the hyperedge.
|
void |
deSelectAll(boolean redraw)
Deselects all segments of this hyperedge.
|
boolean |
disconnectSegments(IlvSegmentedHyperEdge.Segment segment1,
IlvSegmentedHyperEdge.Segment segment2)
Disconnects both input segments.
|
void |
draw(Graphics dst,
IlvTransformer t)
Draws the hyperedge.
|
void |
drawCrossingGraphic(Graphics dst,
IlvTransformer t)
Draws the crossing graphic that belongs to this object.
|
protected void |
drawLine(IlvPoint[] points,
double lineWidth,
float[] lineStyle,
Graphics dst,
IlvTransformer t)
Draws a line between the input points.
|
protected Paint |
getAdaptedSelectedSegmentsPaint(IlvTransformer t)
Returns the stroke paint of the selected segments adapted to the input
transformer.
|
protected IlvPoint |
getArrowHeadControlPoint(IlvSegmentedHyperEdge.Segment segment,
IlvSegmentedHyperEdge.HyperEdgeEnd end,
IlvPoint arrowPoint,
IlvPoint[] segmentPoints,
IlvTransformer t)
Returns the control point of the arrow head drawn at the input segment.
|
IlvSegmentedHyperEdge.Segment |
getClosestSegment(double x,
double y,
IlvTransformer t)
Returns the segment closest to the input point.
|
IlvSegmentedHyperEdge.Segment[] |
getClosestSegments(double x,
double y,
IlvTransformer t,
IlvSegmentedHyperEdge.Segment[] segments)
Returns the two segments whose connection point is closest to the input
point.
|
IlvPoint |
getConnectionPoint(IlvSegmentedHyperEdge.Segment segment1,
IlvSegmentedHyperEdge.Segment segment2,
IlvTransformer t)
Returns the connection point of both input segments if the one segment is
incident to the other segment.
|
IlvGraphic |
getCrossingAwareGraphic()
Returns the corresponding graphic.
|
IlvCrossingAwareSegment[] |
getCrossingAwareSegments(IlvTransformer t)
Returns those segments of the hyperedge that can display a crossing.
|
IlvGraphic |
getCrossingGraphic()
Returns the graphic object that draws the crossings.
|
int |
getCrossingMode()
Returns the crossing mode of the hyperedge.
|
IlvSegmentedHyperEdge.Segment |
getEndSegment(IlvHyperEdgeEnd end)
Returns the segment incident to the hyperedge end.
|
double |
getGap()
Returns the gap width of the hyperedge crossings.
|
int |
getLayerOfCrossingGraphic()
Returns the default layer of the graphic object that draws the crossings.
|
IlvSegmentedHyperEdge.Segment |
getNearEndSegment(IlvSegmentedHyperEdge.Segment segment)
Returns the near end segment that is reachable from the input segment along
a segment path that never branches.
|
int |
getNodeSide(IlvHyperEdgeEnd end)
Decides on which side of the node the hyperedge end is located.
|
Iterator |
getSegments()
Returns the segments of the hyperedge.
|
int |
getSegmentsCount()
Returns the number of segments of the hyperedge.
|
IlvSegmentedHyperEdge.Segment[] |
getSelectedSegments()
Returns all selected segments.
|
Paint |
getSelectedSegmentsPaint()
Returns the stroke paint of the selected segments.
|
IlvPoint[] |
getUnclippedSegmentPoints(IlvHyperEdgeEnd end,
IlvTransformer t)
Returns the end points of the segment that ends at the input hyperedge end.
|
boolean |
isAutoConnect()
Returns
true if adding source or target nodes to the hyperedge
creates segments that connect the new hyperedge end to the remaining
segments. |
boolean |
isConnected(IlvSegmentedHyperEdge.Segment segment1,
IlvSegmentedHyperEdge.Segment segment2)
Returns whether both input segments are connected.
|
boolean |
isCrossingAdjusting()
Returns whether the segmented hyperedge is inside an adjustment session for
the crossings.
|
boolean |
isCrossingEnabled()
Returns
true if tunnel (jog) crossing display is enabled for
this hyperedge. |
boolean |
isGapZoomable()
Returns
true if the gap of the link crossings is zoomable. |
boolean |
isSegmentSetComplete()
Tests if the set of segments is complete.
|
IlvSegmentedHyperEdge.Segment |
joinSegments(IlvSegmentedHyperEdge.Segment segment1,
IlvSegmentedHyperEdge.Segment segment2)
Join the two input segments.
|
IlvSegmentedHyperEdge.Segment |
joinSegments(IlvSegmentedHyperEdge.Segment segment1,
IlvSegmentedHyperEdge.Segment segment2,
IlvTransformer t)
Join the two input segments.
|
IlvSelection |
makeSelection()
Creates a selection object for this object.
|
protected boolean |
mergeCrossings(IlvCrossing cr1,
IlvCrossing cr2,
double dist,
double gap)
Decides when to merge crossings.
|
protected boolean |
modeFitsCrossingGraphic(int mode)
Tests if the current crossing graphic fits to the input mode.
|
void |
moveConnectionPoint(IlvSegmentedHyperEdge.Segment seg1,
IlvSegmentedHyperEdge.Segment seg2,
double x,
double y,
IlvTransformer t)
Moves the connection point of both input segments to the input point.
|
IlvSegmentedHyperEdge.Segment[] |
parallelSplitSegment(IlvSegmentedHyperEdge.Segment segment,
double x,
double y,
IlvTransformer t)
Splits the input segment and redistributes the incident segments, if the
segment has incident segments at both sides.
|
void |
removeAllCrossings(IlvTransformer t)
Removes all crossings added at the object for a given transformer.
|
void |
removeAllSegments()
Removes all segments of the hyperedge.
|
IlvSegmentedHyperEdge.Segment[] |
removeSegment(IlvSegmentedHyperEdge.Segment segment)
Removes the input segment.
|
void |
removeSegments(IlvHyperEdgeEnd end)
Removes all segments of the hyperedge that branch from the current segment
trunk to the input hyperedge end.
|
void |
selectAll(boolean redraw)
Selects all segments of this hyperedge.
|
void |
setAutoConnect(boolean autoconnect)
Sets whether adding source or target nodes to the hyperedge creates
segments that connect the new hyperedge end to the remaining segments.
|
void |
setCrossingAdjusting(boolean adjusting)
Starts or end an adjustment session for the crossings.
|
void |
setCrossingEnabled(boolean enable)
Sets whether tunnel (jog) crossing display is enabled for this hyperedge.
|
void |
setCrossingGraphic(IlvGraphic g)
Sets the graphic object that draws the crossings.
|
void |
setCrossingGraphic(IlvGraphic g,
int layerNumber)
Sets the graphic object that draws the crossings.
|
void |
setCrossingMode(int mode)
Sets the crossing mode of the hyperedge.
|
void |
setEndSegmentAngle(IlvHyperEdgeEnd end,
double angle)
Sets the angle of the segment incident to the input end to the given angle.
|
void |
setGap(double gap)
Sets the gap width of the hyperedge crossings.
|
void |
setGapZoomable(boolean zoomable)
Sets whether the gap of the hyperedge crossings is zoomable.
|
void |
setGraphicBag(IlvGraphicBag bag)
Changes the bag that contains the object.
|
void |
setLayerOfCrossingGraphic(int layerNumber)
Sets the default layer of the graphic object that draws the crossings.
|
boolean |
setSegmentAngle(IlvSegmentedHyperEdge.Segment segment,
double angle)
Sets the angle of a segment.
|
void |
setSelected(IlvSegmentedHyperEdge.Segment segment,
boolean select,
boolean redraw)
Selects or deselects the segment.
|
void |
setSelectedSegmentsPaint(Paint p)
Changes the stroke paint of the selected segments.
|
IlvSegmentedHyperEdge.Segment[] |
splitSegment(IlvSegmentedHyperEdge.Segment segment,
double x,
double y,
IlvTransformer t)
Splits the input segment at the input point.
|
IlvSegmentedHyperEdge.Segment[] |
splitSegment(IlvSegmentedHyperEdge.Segment segment,
IlvSegmentedHyperEdge.Segment connectingSegment)
Splits the input segment at the connection point with the connecting
segment.
|
IlvSegmentedHyperEdge.Segment[] |
splitSegment(IlvSegmentedHyperEdge.Segment segment,
IlvSegmentedHyperEdge.Segment connectingSegment,
IlvTransformer t)
Splits the input segment at the connection point with the connecting
segment.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream . |
adaptPaint, addFrom, addTo, arrowBBox, boundingBox, copy, drawArrow, finalize, getAdaptedStrokePaint, getArrowSize, getBoundingBoxCacheSize, getCenter, getClosestEnd, getEndNodeBoundingBox, getFrom, getFromArray, getFromConnectionPoints, getFromCount, getFromEnds, getFromEndsArray, getFromEndsArray, getFromEndsCount, getLineStyle, getLineWidth, getLineWidth, getMaximumLineWidth, getStrokePaint, getTo, getToArray, getToConnectionPoints, getToCount, getToEnds, getToEndsArray, getToEndsArray, getToEndsCount, getVisibleEndNode, isFromEnd, isInterGraphHyperEdge, isPaintAbsolute, isToEnd, isVisibleFrom, isVisibleTo, moveConnectionPoint, readEnds, removeFrom, removeFrom, removeTo, removeTo, setBoundingBoxCacheSize, setForeground, setFrom, setLineStyle, setLineWidth, setMaximumLineWidth, setPaintAbsolute, setStrokePaint, setTo, shortenForArrowDraw, writeEnds, zoomable
addActionListener, addNamedPropertyListener, allViewsRemoved, baseTextDirectionChanged, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, getAndAssociateObjectInteractor, getBaseTextDirection, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getComponentOrientation, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getResolvedBaseTextDirection, getToolTipBaseTextDirection, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getULocale, getZOrderIndex, hasProperty, inside, intersects, invalidateBBoxCache, invalidateBidiCache, isBaseTextDirectionSensitive, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isPersistent, isSelectable, isVisible, localeChanged, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setBaseTextDirection, setBaseTextDirectionDuringConstruction, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLineWidth
public IlvSegmentedHyperEdge()
public IlvSegmentedHyperEdge(IlvGraphicVector from, IlvGraphicVector to)
from
- The origin nodes.to
- The destination nodes.public IlvSegmentedHyperEdge(IlvSegmentedHyperEdge source)
IlvSegmentedHyperEdge
by copying an existing one.source
- The origin of the copy.public IlvSegmentedHyperEdge(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public HashMap copyShapeFrom(IlvHyperEdge source)
If both edges are currently in different graphers, then this edge must be
removed from its grapher before calling this method. Otherwise, if this
edge can remain inside its grapher, this must be done inside an
applyToObject session of the edge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
copyShapeFrom
in class IlvHyperEdge
source
- The source hyperedgepublic void draw(Graphics dst, IlvTransformer t)
draw
in class IlvHyperEdge
dst
- The destination Graphics.t
- The transformation used to draw the object.IlvGraphic.callDraw(Graphics,IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
protected void drawLine(IlvPoint[] points, double lineWidth, float[] lineStyle, Graphics dst, IlvTransformer t)
points
- An array of two points that are the start and the end of the line
in view coordinates.lineWidth
- The line width in manager coordinates.lineStyle
- The line style in manager coordinates.dst
- The destination Graphics.t
- The transformation used to draw the object.public IlvPoint[] getUnclippedSegmentPoints(IlvHyperEdgeEnd end, IlvTransformer t)
IlvHyperEdgeClippingConnector
to calculate the clipping point.getUnclippedSegmentPoints
in class IlvHyperEdge
end
- The hyperedge end.t
- The transformer used to draw the hyperedge.protected IlvRect calcBoundingBox(IlvTransformer t)
IlvHyperEdge.boundingBox(ilog.views.IlvTransformer)
).calcBoundingBox
in class IlvHyperEdge
t
- The transformer used to draw the object.protected void clearBoundingBoxCache()
IlvHyperEdge.boundingBox(ilog.views.IlvTransformer)
.clearBoundingBoxCache
in class IlvHyperEdge
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
in class IlvHyperEdge
p
- The point to be tested.tp
- The point p
transformed by the transformer
t
.t
- The transformation that was applied to the object when it was
drawn.true
if the point lies inside this graphic object.IlvGraphic
protected IlvPoint getArrowHeadControlPoint(IlvSegmentedHyperEdge.Segment segment, IlvSegmentedHyperEdge.HyperEdgeEnd end, IlvPoint arrowPoint, IlvPoint[] segmentPoints, IlvTransformer t)
null
if the segment is not
incoming to any hyperedge end, because in this case, no arrow head must be
drawn.segment
- The hyperedge segment that has this arrow head.end
- The hyperedge end that has this arrow head.arrowPoint
- The point where the arrow must be drawn.segmentPoints
- The two end points of the segment.t
- The transformer to draw the hyperedge.public IlvSelection makeSelection()
IlvSegmentedHyperEdgeSelection
.makeSelection
in class IlvHyperEdge
IlvSegmentedHyperEdgeSelection
public void applyTransform(IlvTransformer t)
applyTransform
in class IlvHyperEdge
t
- The transformation to be applied.IlvGraphic
protected IlvHyperEdgeEnd createEnd(IlvGraphic node, boolean origin)
IlvSegmentedHyperEdge.HyperEdgeEnd
. This method can be overridden if a different type is
needed.createEnd
in class IlvHyperEdge
node
- The end node that is connected to the hyperedge by the new end
point.origin
- Whether the new end will be an origin end point or a destination
end point.public Iterator getSegments()
Iterator.remove()
operation. Use removeSegment(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
instead.IlvSegmentedHyperEdge.Segment
objects.public int getSegmentsCount()
public IlvSegmentedHyperEdge.Segment getEndSegment(IlvHyperEdgeEnd end)
null
if there was
never any segment added to the hyperedge end.public boolean isSegmentSetComplete()
public IlvSegmentedHyperEdge.Segment addSegment(IlvHyperEdgeEnd end, double angle)
The new segment has a fixed angle. If the angle is 0, the segment is horizontal. If the angle is 90, the segment is vertical.
If the edge is inside a grapher, this must be done inside an
applyToObject
session of the hyperedge (see
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
end
- The hyperedge end incident to the new segment.angle
- The fixed angle of the new segment.addSegment(IlvHyperEdgeEnd, double, double, IlvTransformer)
,
addSegment(IlvHyperEdgeEnd, IlvHyperEdgeEnd)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double,
IlvTransformer)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double, double,
IlvTransformer)
,
getEndSegment(ilog.views.hypergraph.IlvHyperEdgeEnd)
,
removeSegment(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment addSegment(IlvHyperEdgeEnd end, double x, double y, IlvTransformer t)
The new segment has a variable angle and reaches from the input hyperedge end to the position (x, y).
If the edge is inside a grapher, this must be done inside an
applyToObject
session of the hyperedge (see
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
end
- The hyperedge end incident to the new segment.x
- The x coordinate of the other end point (in transformed view
coordinates).y
- The y coordinate of the other end point (in transformed view
coordinates).t
- The transformer to draw this hyperedge.addSegment(IlvHyperEdgeEnd, double)
,
addSegment(IlvHyperEdgeEnd, IlvHyperEdgeEnd)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double,
IlvTransformer)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double, double,
IlvTransformer)
,
getEndSegment(ilog.views.hypergraph.IlvHyperEdgeEnd)
,
removeSegment(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment addSegment(IlvHyperEdgeEnd end1, IlvHyperEdgeEnd end2)
The new segment has a variable angle.
If the edge is inside a grapher, this must be done inside an
applyToObject
session of the hyperedge (see
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
end1
- The one hyperedge end incident to the new segment.end2
- The other hyperedge end incident to the new segment.addSegment(IlvHyperEdgeEnd, double)
,
addSegment(IlvHyperEdgeEnd, double, double, IlvTransformer)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double,
IlvTransformer)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double, double,
IlvTransformer)
,
getEndSegment(ilog.views.hypergraph.IlvHyperEdgeEnd)
,
removeSegment(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment addSegment(IlvSegmentedHyperEdge.Segment existingSegment, double angle, double x, double y, IlvTransformer t)
The input segment must belong to this hyperedge. The input segment can have a fixed or a variable angle. If it has a fixed angle, the angle must be at least 1 degree different to the input angle, otherwise both segments would be colinear.
If it has a variable angle, adding a fixed segment is only possible if the input segment is not yet fully terminated. The new segment becomes a terminating segment of the input segment. Note that a variable segment can have only a limited number of terminating segments: 2 if it is not incident to any hyperedge end, 1 if it is incident to one hyperedge end, and 0 if it is incident to two hyperedge ends.
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
existingSegment
- The segment incident to the new segment.angle
- The fixed angle of the new segment.x
- The x coordinate of the new segment (in transformed view
coordinates).y
- The y coordinate of the new segment (in transformed view
coordinates).t
- The transformer to draw this hyperedge.addSegment(IlvHyperEdgeEnd, double)
,
addSegment(IlvHyperEdgeEnd, double, double, IlvTransformer)
,
addSegment(IlvHyperEdgeEnd, IlvHyperEdgeEnd)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double, double,
IlvTransformer)
,
getEndSegment(ilog.views.hypergraph.IlvHyperEdgeEnd)
,
removeSegment(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment addSegment(IlvSegmentedHyperEdge.Segment existingSegment, double x, double y, IlvTransformer t)
The input segment must belong to this hyperedge. The input segment can have a fixed or a variable angle.
If it has a variable angle, adding a fixed segment is only possible if the input segment is not yet fully terminated. The new segment becomes a terminating segment of the input segment. Note that a variable segment can have only a limited number of terminating segments: 2 if it is not incident to any hyperedge end, 1 if it is incident to one hyperedge end, and 0 if it is incident to two hyperedge ends.
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
existingSegment
- The segment incident to the new segment.x
- The x coordinate of the new segment (in transformed view
coordinates).y
- The y coordinate of the new segment (in transformed view
coordinates).t
- The transformer to draw this hyperedge.addSegment(IlvHyperEdgeEnd, double)
,
addSegment(IlvHyperEdgeEnd, double, double, IlvTransformer)
,
addSegment(IlvHyperEdgeEnd, IlvHyperEdgeEnd)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double,
IlvTransformer)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double, double,
IlvTransformer)
,
getEndSegment(ilog.views.hypergraph.IlvHyperEdgeEnd)
,
removeSegment(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment addSegment(IlvSegmentedHyperEdge.Segment existingSegment, double x1, double y1, double x2, double y2, IlvTransformer t)
The input segment must belong to this hyperedge. The input segment can have a fixed or a variable angle. The input segment becomes a terminating segment of the new segment. If the input segment has a variable angle and is not fully terminated yet, the new segment also becomes a terminating segment of the input segment.
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
existingSegment
- The segment incident to the new segment.x1
- The start x coordinate of the new segment (in transformed view
coordinates).y1
- The start y coordinate of the new segment (in transformed view
coordinates).x2
- The end x coordinate of the new segment (in transformed view
coordinates).y2
- The end y coordinate of the new segment (in transformed view
coordinates).t
- The transformer to draw this hyperedge.addSegment(IlvHyperEdgeEnd, double)
,
addSegment(IlvHyperEdgeEnd, double, double, IlvTransformer)
,
addSegment(IlvHyperEdgeEnd, IlvHyperEdgeEnd)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double,
IlvTransformer)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double, double,
IlvTransformer)
,
getEndSegment(ilog.views.hypergraph.IlvHyperEdgeEnd)
,
removeSegment(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment[] removeSegment(IlvSegmentedHyperEdge.Segment segment)
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
segment
- The segment to be removed.addSegment(IlvHyperEdgeEnd, double)
,
addSegment(IlvHyperEdgeEnd, double, double, IlvTransformer)
,
addSegment(IlvHyperEdgeEnd, IlvHyperEdgeEnd)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double,
IlvTransformer)
,
addSegment(IlvSegmentedHyperEdge.Segment, double, double, double, double,
IlvTransformer)
,
disconnectSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public void removeAllSegments()
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).public void removeSegments(IlvHyperEdgeEnd end)
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
end
- The end of the hyperedge whose branch is removed.public boolean connectSegments(IlvSegmentedHyperEdge.Segment segment1, IlvSegmentedHyperEdge.Segment segment2)
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
segment1
- The one segment.segment2
- The other segment.true
if both segments were not yet connected before.disconnectSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
,
isConnected(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public boolean disconnectSegments(IlvSegmentedHyperEdge.Segment segment1, IlvSegmentedHyperEdge.Segment segment2)
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
segment1
- The one segment.segment2
- The other segment.true
if both segments were connected before.connectSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
,
isConnected(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public boolean isConnected(IlvSegmentedHyperEdge.Segment segment1, IlvSegmentedHyperEdge.Segment segment2)
segment1
- The one segment.segment2
- The other segment.true
if both segments are connected.IlvSegmentedHyperEdge.Segment.isIncident(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvPoint getConnectionPoint(IlvSegmentedHyperEdge.Segment segment1, IlvSegmentedHyperEdge.Segment segment2, IlvTransformer t)
segment1
- The one segment.segment2
- The other segment.t
- The transformer to draw the hyperedge.null
if both segments are not
connected.public IlvSegmentedHyperEdge.Segment[] splitSegment(IlvSegmentedHyperEdge.Segment segment, double x, double y, IlvTransformer t)
Splitting a segment creates one or two new segments which are returned. The new segment get their coordinate from the input point. Segments incident to the input segment are distributed between the input segment and the new segments.
Note: in certain situations, the input segment cannot be reused. In this case, the operation removes the input segment and replaces it by a new segment.
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
segment
- The segment to be split.x
- The x coordinate of the segment if it is vertical.y
- The y coordinate of the segment if it is horizontal.t
- The transformer to draw the hyperedge.null
if the split was not successful.joinSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.IlvTransformer)
,
disconnectSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment[] splitSegment(IlvSegmentedHyperEdge.Segment segment, IlvSegmentedHyperEdge.Segment connectingSegment, IlvTransformer t)
This operation cannot be done if one of both segments has a variable angle and the other segment has a fixed angle.
Splitting the segment can create one or two new segments. Usually, the input segment is reused, therefore only one new segment is created. The new segment is also connected to the connecting segment. Segments incident to the input segment are distributed between the input segment and the new segment. If the input segment cannot be reused, two new segments are created. In this case, segments incident to the input segment are distributed between the two new segments. The new segments are returned.
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
segment
- The segment to be split.connectingSegment
- The segment that connects to the first segment.t
- The transformer to draw the hyperedge.null
if the split was not successful.joinSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.IlvTransformer)
,
disconnectSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment[] splitSegment(IlvSegmentedHyperEdge.Segment segment, IlvSegmentedHyperEdge.Segment connectingSegment)
This operation cannot be done if one of both segments has a variable angle and the other segment has a fixed angle.
This convenience method calls
splitSegment(Segment, Segment, IlvTransformer)
with a
null
transformer.
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
segment
- The segment to be split.connectingSegment
- The segment that connects to the first segment.null
if the split was not successful.joinSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.IlvTransformer)
,
disconnectSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment[] parallelSplitSegment(IlvSegmentedHyperEdge.Segment segment, double x, double y, IlvTransformer t)
Splitting a segment creates two new segments (the bridge segment and the
new parallel segment) which are returned. Splitting is not possible if all
incident segments of the input segment come from the same side. In this
case null
is returned.
If the input segment is not an end segment and has exactly one incident
segment coming from the left and another one coming from the right, the
effect of a parallel split is the same as the effect of a regular split via
splitSegment(IlvSegmentedHyperEdge.Segment, double, double, IlvTransformer)
.
As intuitive reminder: If a segment has multiple incident segments, the
regular split is like a cut perpendicular to the segment orientation while
the parallel split is like a cut parallel to the segment orientation.
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
segment
- The segment to be split.x
- The x coordinate of the segment if it is vertical.y
- The y coordinate of the segment if it is horizontal.t
- The transformer to draw the hyperedge.null
if the split was not successful.joinSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.IlvTransformer)
,
disconnectSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment joinSegments(IlvSegmentedHyperEdge.Segment segment1, IlvSegmentedHyperEdge.Segment segment2, IlvTransformer t)
splitSegment(Segment, double, double, IlvTransformer)
or
splitSegment(Segment, Segment, IlvTransformer)
or
parallelSplitSegment(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, double, double, ilog.views.IlvTransformer)
. In principle, this is the inverse operation
of the various split operations.
It does not work if the number of ends of both segments together is more than 2 if at least one segment has a variable angle, or more than 1 if both segments have a fixed angle. It also does not work if the resulting segment must have a variable angle but would need to connect to more than 2 incident segments with fixed angle. It also does not work if the resulting segment must have a fixed angle but would need to connect to a colinear segment. One of both segments is removed. All segments incident to the removed segment are connected to the surviving segment. The surviving segment is returned.
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
segment1
- The one segment.segment2
- The other segment.t
- The transformer to draw the hyperedge.null
if the join was not successful.connectSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public IlvSegmentedHyperEdge.Segment joinSegments(IlvSegmentedHyperEdge.Segment segment1, IlvSegmentedHyperEdge.Segment segment2)
joinSegments(Segment, Segment, IlvTransformer)
with a
null
transformer.
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
segment1
- The one segment.segment2
- The other segment.null
if the join was not successful.connectSegments(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment)
public void moveConnectionPoint(IlvSegmentedHyperEdge.Segment seg1, IlvSegmentedHyperEdge.Segment seg2, double x, double y, IlvTransformer t)
Note that end segments cannot be moved by this method. In order to move an
end segment, you must move the associated hyperedge end (see
IlvSegmentedHyperEdge.Segment.getEnds()
).
If the edge is inside a grapher, this must be done inside an applyToObject
session of the hyperedge (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
seg1
- The one segment to be moved.seg2
- The other segment to be moved.x
- The x coordinate.y
- The y coordinate.t
- The transformer to draw the hyperedge.public boolean setSegmentAngle(IlvSegmentedHyperEdge.Segment segment, double angle)
segment
- The segment.angle
- The desired angle.true
if the change of the angle was successful.public void setEndSegmentAngle(IlvHyperEdgeEnd end, double angle)
end
- The hyperedge end.angle
- The desired angle of the segment.public int getNodeSide(IlvHyperEdgeEnd end)
IlvDirection.Top
,
IlvDirection.Bottom
, IlvDirection.Left
,
IlvDirection.Right
.public IlvSegmentedHyperEdge.Segment getClosestSegment(double x, double y, IlvTransformer t)
x
- The x coordinate.y
- The y coordinate.t
- The transformer to draw the hyperedge.null
if there are no segments
yet.public IlvSegmentedHyperEdge.Segment[] getClosestSegments(double x, double y, IlvTransformer t, IlvSegmentedHyperEdge.Segment[] segments)
x
- The x coordinate.y
- The y coordinate.t
- The transformer to draw the hyperedge.segments
- If null
a new array of segments is allocated and
returned. Otherwise the input array is filled with the segments
and returned.null
if there are no
segments yet.public IlvSegmentedHyperEdge.Segment getNearEndSegment(IlvSegmentedHyperEdge.Segment segment)
IlvSegmentedHyperEdge.Segment.getEnds()
returns not an empty array),
it returns the input segment. Otherwise it searches by traversing the
segments starting at the input segment until it reaches a branch of
multiple segments or an end segment. A branch of multiple segments is a
segment with more than 2 incident segments (that is, one incident segment
where it came from and the other to continue the traversal). If it reaches
the end segment and the end segment has only one incident segment and only
one incident end, the end segment is returned (because otherwise the end
segment itself is a branch). If no end segment is reachable without going
over a branch, the method returns null
.public void setSelected(IlvSegmentedHyperEdge.Segment segment, boolean select, boolean redraw)
segment
- The segment to be selected.select
- If true
the object will be selected, and deselected
otherwise.redraw
- If true
, the hyperedge is redrawn.getSelectedSegments()
,
selectAll(boolean)
,
deSelectAll(boolean)
,
IlvSegmentedHyperEdge.Segment.isSelected()
public void selectAll(boolean redraw)
redraw
- If true
, the hyperedge is redrawn.setSelected(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, boolean, boolean)
,
deSelectAll(boolean)
,
IlvSegmentedHyperEdge.Segment.isSelected()
public void deSelectAll(boolean redraw)
redraw
- If true
, the hyperedge is redrawn.setSelected(ilog.views.hypergraph.IlvSegmentedHyperEdge.Segment, boolean, boolean)
,
selectAll(boolean)
,
IlvSegmentedHyperEdge.Segment.isSelected()
public boolean deleteSelection(boolean redraw)
true
if any inner segment was selected, and false
otherwise.deleteSelection
in class IlvHyperEdge
public IlvSegmentedHyperEdge.Segment[] getSelectedSegments()
public void setSelectedSegmentsPaint(Paint p)
p
- The new paint.getSelectedSegmentsPaint()
public Paint getSelectedSegmentsPaint()
setSelectedSegmentsPaint(java.awt.Paint)
protected Paint getAdaptedSelectedSegmentsPaint(IlvTransformer t)
t
- The transformer used to draw the object.public void setAutoConnect(boolean autoconnect)
If autoconnect is disabled, any call of IlvHyperEdge.addFrom(ilog.views.IlvGraphic)
or IlvHyperEdge.addTo(ilog.views.IlvGraphic)
adds the hyperedge end, but no additional segments. Hence the hyperedge
segments will be incomplete (see isSegmentSetComplete()
). You are
responsible for adding the segments yourself to make the segment set
complete.
public boolean isAutoConnect()
true
if adding source or target nodes to the hyperedge
creates segments that connect the new hyperedge end to the remaining
segments. This is enabled by default.setAutoConnect(boolean)
protected void afterAddEnd(IlvHyperEdgeEnd end, boolean fromSide)
afterAddEnd
in class IlvHyperEdge
end
- The hyperedge end.fromSide
- Whether the hyperedge end is origin or destination.protected void beforeRemoveEnd(IlvHyperEdgeEnd end, boolean fromSide)
beforeRemoveEnd
in class IlvHyperEdge
end
- The hyperedge end.fromSide
- Whether the hyperedge end is origin or destination.public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
. You should not call
this method directly; instead, you should use the write
methods of the manager.write
in interface IlvPersistentObject
write
in class IlvHyperEdge
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public void setCrossingMode(int mode)
IlvParameterizedCrossingAwareObject.NO_CROSSINGS
- crossings are not displayed in any particular
way.
IlvParameterizedCrossingAwareObject.TUNNEL_CROSSINGS
- crossings are displayed with a tunnel
shape.
IlvParameterizedCrossingAwareObject.BRIDGE_CROSSINGS
- crossings are displayed with a bridge
shape.
IlvParameterizedCrossingAwareObject.CUSTOM_CROSSINGS
- crossings are displayed with a custom shape
that was set by setCrossingGraphic(ilog.views.IlvGraphic, int)
.
IlvParameterizedCrossingAwareObject.NO_CROSSINGS
This method is a convenience method that internally calls
setCrossingEnabled(boolean)
, setCrossingGraphic(ilog.views.IlvGraphic, int)
and
createCrossingGraphic(int)
to adjust the corresponding mode.
setCrossingMode
in interface IlvParameterizedCrossingAwareObject
getCrossingMode()
public final int getCrossingMode()
modeFitsCrossingGraphic(int)
.getCrossingMode
in interface IlvParameterizedCrossingAwareObject
setCrossingMode(int)
protected IlvGraphic createCrossingGraphic(int mode)
IlvTunnelCrossings
if the mode is
IlvParameterizedCrossingAwareObject.TUNNEL_CROSSINGS
,
IlvBridgeCrossings
if the mode is
IlvParameterizedCrossingAwareObject.BRIDGE_CROSSINGS
,
null
in all other cases.
setCrossingMode(int)
,
modeFitsCrossingGraphic(int)
protected boolean modeFitsCrossingGraphic(int mode)
createCrossingGraphic(int)
is
overridden as well. The default implementation returns true
IlvTunnelCrossings
and the mode is IlvParameterizedCrossingAwareObject.TUNNEL_CROSSINGS
,
IlvBridgeCrossings
and the mode is IlvParameterizedCrossingAwareObject.BRIDGE_CROSSINGS
.
getCrossingMode()
public void setCrossingEnabled(boolean enable)
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).setCrossingEnabled
in interface IlvParameterizedCrossingAwareObject
isCrossingEnabled()
public boolean isCrossingEnabled()
true
if tunnel (jog) crossing display is enabled for
this hyperedge.isCrossingEnabled
in interface IlvCrossingAwareObject
setCrossingEnabled(boolean)
public void setCrossingGraphic(IlvGraphic g, int layerNumber)
IlvGraphic
that can draw all the crossing points of this
link. It must implement the IlvCrossingGraphic
interface.
This operation does not change the shape of this hyperedge, but it changes bounds of the crossing graphic. You can only set a crossing graphic when the crossing graphic is outside any grapher.
When the crossing graphic becomes active due to crossings, it is
automatically inserted into an appropriate grapher into the specified
layer. The layer number should be above the layer that contains the links.
If the layer number is -1
, an appropriate layer is
automatically calculated.
setCrossingGraphic(IlvGraphic)
,
getCrossingGraphic()
public void setCrossingGraphic(IlvGraphic g)
IlvGraphic
that can draw all the crossing points of this
hyperedge. It must implement the IlvCrossingGraphic
interface.
This operation does not change the shape of this hyperedge, but it changes bounds of the crossing graphic. You can only set a crossing graphic when the crossing graphic is outside any grapher.
setCrossingGraphic
in interface IlvParameterizedCrossingAwareObject
setCrossingGraphic(IlvGraphic, int)
,
getCrossingGraphic()
public IlvGraphic getCrossingGraphic()
getCrossingGraphic
in interface IlvCrossingAwareObject
setCrossingGraphic(IlvGraphic)
,
setCrossingGraphic(IlvGraphic, int)
public void setLayerOfCrossingGraphic(int layerNumber)
-1
, an appropriate layer is
automatically calculated.setLayerOfCrossingGraphic
in interface IlvParameterizedCrossingAwareObject
getLayerOfCrossingGraphic()
,
setCrossingGraphic(IlvGraphic, int)
public final int getLayerOfCrossingGraphic()
-1
if the layer is automatically calculated.getLayerOfCrossingGraphic
in interface IlvParameterizedCrossingAwareObject
setLayerOfCrossingGraphic(int)
public void setGap(double gap)
setGap
in interface IlvParameterizedCrossingAwareObject
getGap()
public final double getGap()
getGap
in interface IlvParameterizedCrossingAwareObject
setGap(double)
public void setGapZoomable(boolean zoomable)
The option is enabled by default.
setGapZoomable
in interface IlvParameterizedCrossingAwareObject
isGapZoomable()
public final boolean isGapZoomable()
true
if the gap of the link crossings is zoomable.isGapZoomable
in interface IlvParameterizedCrossingAwareObject
setGapZoomable(boolean)
public IlvGraphic getCrossingAwareGraphic()
IlvGraphic
implements this interface, it should return the this
handle.getCrossingAwareGraphic
in interface IlvCrossingAwareObject
public IlvCrossingAwareSegment[] getCrossingAwareSegments(IlvTransformer t)
getCrossingAwareSegments
in interface IlvCrossingAwareObject
t
- The transformer to draw the object.public void removeAllCrossings(IlvTransformer t)
removeAllCrossings
in interface IlvCrossingAwareObject
t
- The transformer to draw the object.public void drawCrossingGraphic(Graphics dst, IlvTransformer t)
draw
method to this method if necessary.drawCrossingGraphic
in interface IlvCrossingAwareObject
dst
- The destination Graphics.t
- The transformation used to draw this object.IlvAbstractCrossingGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer)
public boolean containsAtCrossingGraphic(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
method to this method if necessary.containsAtCrossingGraphic
in interface IlvCrossingAwareObject
p
- The point to be tested in the coordinate system of this object.tp
- The point p
transformed by the transformer
t
.t
- The transformation that was applied to this object when it was
drawn.IlvAbstractCrossingGraphic.contains(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
public IlvRect boundingBoxCrossingGraphic(IlvTransformer t)
boundingBox
method to this method if necessary.boundingBoxCrossingGraphic
in interface IlvCrossingAwareObject
t
- The transformer used to draw this object.IlvAbstractCrossingGraphic.boundingBox(ilog.views.IlvTransformer)
public void setCrossingAdjusting(boolean adjusting)
IlvCrossingAwareObject
interface. You should not call this method.setCrossingAdjusting
in interface IlvCrossingAwareObject
public boolean isCrossingAdjusting()
IlvCrossingAwareObject
interface. You should not call this method.protected void actOnAdjustmentEnd()
actOnAdjustmentEnd
in class IlvHyperEdge
IlvHyperGrapher.registerWaitingForAdjustmentEnd(ilog.views.hypergraph.IlvHyperEdge)
public void setGraphicBag(IlvGraphicBag bag)
setGraphicBag
in class IlvGraphic
bag
- The graphic bag.IlvGraphic
protected boolean mergeCrossings(IlvCrossing cr1, IlvCrossing cr2, double dist, double gap)
cr1
- The one crossing.cr2
- The other crossing.dist
- The distance between this crossing and the next crossing.gap
- The desired gap for the crossing.public IlvOrderedCompoundEdit beforeDo(String undoPresentationName)
The following example illustrates the typical use case:
IlvOrderedCompoundEdit edit = hyperedge.beforeDo("Hyperedge Edition"); ... do any changes on the hyperedge ... hyperedge.afterDo(edit); // now add the edit to the undo manager so that the user can request // undoing the operation undoManager.addEdit(edit);
beforeDo
in class IlvHyperEdge
afterDo(ilog.views.hypergraph.undo.IlvOrderedCompoundEdit)
public void afterDo(IlvOrderedCompoundEdit undo)
afterDo
in class IlvHyperEdge
undo
- The undoable edit returned by beforeDo(java.lang.String)
.beforeDo(java.lang.String)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.