public class IlvDefaultHyperEdgeEnd extends Object implements IlvHyperEdgeEnd
IlvDefaultHyperEdgeEnd
is the default implementation of the
end point of a hyperedge at a node.IlvHyperEdge
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
IlvDefaultHyperEdgeEnd(IlvHyperEdge edge,
IlvGraphic node)
Creates a new hyperedge end point at the input node.
|
|
IlvDefaultHyperEdgeEnd(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
IlvHyperEdgeEnd |
copy()
Creates a copy of this object.
|
IlvHyperEdge |
getHyperEdge()
Returns the hyperedge of this end point.
|
IlvGraphic |
getNode()
Returns the end node that is connected to the hyperedge by this end point.
|
IlvPoint |
getPosition(IlvTransformer t,
boolean checkConnector)
Returns the position of the hyperedge end in view coordinates.
|
boolean |
isAbsolutePositioning()
Returns
true if absolute positioning is used, and
false otherwise. |
boolean |
isDragging()
Returns
true if we are currently dragging the hyperedge end
interactively. |
void |
positionChanged()
Called when the position of this end might have changed.
|
void |
setAbsolutePositioning(boolean absolute)
Enables or disables absolute positioning.
|
void |
setDragging(boolean dragging)
Sets whether we are currently dragging the hyperedge end interactively.
|
void |
setHyperEdge(IlvHyperEdge edge)
Sets the hyperedge of this end point.
|
void |
setPosition(IlvPoint p,
IlvTransformer t)
Sets the position of the hyperedge end.
|
void |
write(IlvOutputStream stream)
Writes the attributes of this object.
|
boolean |
zoomable()
Returns
true if the end point of a hyperedge is zoomable. |
protected IlvDefaultHyperEdgeEnd(IlvHyperEdge edge, IlvGraphic node)
edge
- The hyperedge of the end point.node
- The end node that is connected to the hyperedge by this
end point.public IlvDefaultHyperEdgeEnd(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public IlvHyperEdgeEnd copy()
copy
in interface IlvHyperEdgeEnd
public IlvHyperEdge getHyperEdge()
getHyperEdge
in interface IlvHyperEdgeEnd
public void setHyperEdge(IlvHyperEdge edge)
IlvInputStream
.setHyperEdge
in interface IlvHyperEdgeEnd
IlvPersistentObject
public IlvGraphic getNode()
getNode
in interface IlvHyperEdgeEnd
public IlvPoint getPosition(IlvTransformer t, boolean checkConnector)
getPosition
in interface IlvHyperEdgeEnd
t
- The transformer to draw the hyperedge.checkConnector
- Whether the hyperedge connector is queried for
the connection point.public void setPosition(IlvPoint p, IlvTransformer t)
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).setPosition
in interface IlvHyperEdgeEnd
p
- The new position of the hyperedge in view coordinates.t
- The transformer to draw the hyperedge.public void setDragging(boolean dragging)
setDragging
in interface IlvHyperEdgeEnd
public boolean isDragging()
true
if we are currently dragging the hyperedge end
interactively.public boolean zoomable()
true
if the end point of a hyperedge is zoomable.
The end point of a hyperedge is zoomable if the following holds:
t.apply(getPosition(null, true)) == getPosition(t, true)
zoomable
in interface IlvHyperEdgeEnd
public void setAbsolutePositioning(boolean absolute)
By default, relative positioning is used. This means the position of the hyperedge end point is always relative to the current position of the end node.
If the edge is inside a grapher, changing between absolute and relative
positioning requires an applyToObject session of the corresponding edge
(see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).
absolute
- Whether absolute positioning is used.isAbsolutePositioning()
public boolean isAbsolutePositioning()
true
if absolute positioning is used, and
false
otherwise.setAbsolutePositioning(boolean)
public void positionChanged()
positionChanged
in interface IlvHyperEdgeEnd
public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.