public class IlvOrthogonalLinkShapePolicy extends IlvAbstractLinkShapePolicy
IlvOrthogonalLinkShapePolicy always keeps the links
orthogonal.
The policy can be shared between all links.
The parameters of the policy can be set via
setMinFinalSegmentLength(double) and setBendDeltaOnStraightLink(double).
IlvPolicyAwareLinkImage| Constructor and Description |
|---|
IlvOrthogonalLinkShapePolicy()
Creates an orthogonal link shape policy.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterAdd(IlvLinkImage link)
Allows the policy to react after a link with installed policy is added
to a grapher.
|
void |
afterApplyTransform(IlvLinkImage link,
IlvTransformer t)
Allows the policy to react after a transformation was applied.
|
void |
afterFromNodeMoved(IlvLinkImage link)
Allows the policy to react after the source node of the link was moved.
|
void |
afterInsertPoint(IlvLinkImage link,
int index,
IlvTransformer t)
Allows the policy to react after a point was inserted.
|
void |
afterMovePoint(IlvLinkImage link,
int index,
IlvTransformer t)
Allows the policy to react after a point was moved.
|
void |
afterRemovePoint(IlvLinkImage link,
int index,
IlvTransformer t)
Allows the policy to react after a point was removed.
|
void |
afterSetIntermediateLinkPoints(IlvLinkImage link)
Allows the policy to react after the intermediate points were set.
|
void |
afterToNodeMoved(IlvLinkImage link)
Allows the policy to react after the target node of the link was moved.
|
boolean |
allowMovePoint(IlvLinkImage link,
int index,
double x,
double y,
IlvTransformer t)
Returns
true if the policy allows to move the point. |
boolean |
allowRemovePoint(IlvLinkImage link,
int index,
IlvTransformer t)
Returns
true if the policy allows to remove the point. |
double |
getBendDeltaOnStraightLink()
Returns the delta a newly created bend point is shifted if it was created
on a straight link.
|
IlvPoint[] |
getLinkPoints(IlvLinkImage link,
IlvTransformer t)
Returns the points that define the link.
|
IlvPoint |
getPointAt(IlvLinkImage link,
int index,
IlvTransformer t)
Returns the point at a given index.
|
void |
onInstall(IlvLinkImage link)
Allows the policy to react immediately when it is installed at a link.
|
void |
setBendDeltaOnStraightLink(double delta)
Sets the delta a newly created bend point is shifted if it was created
on a straight link.
|
double |
setMinFinalSegmentLength()
Returns the minimal segment length of a start segment or end segment
that is used when the link connection point is moved to a different
border side of the node.
|
void |
setMinFinalSegmentLength(double len)
Sets the minimal segment length of a start segment or end segment
that is used when the link connection point is moved to a different
border side of the node.
|
afterAny, allowApplyTransform, allowInsertPoint, allowSetIntermediateLinkPoints, beforeRemove, getChildPolicy, onUninstall, setChildPolicypublic IlvOrthogonalLinkShapePolicy()
public void setMinFinalSegmentLength(double len)
len - The new lengthpublic double setMinFinalSegmentLength()
public void setBendDeltaOnStraightLink(double delta)
public double getBendDeltaOnStraightLink()
public void afterAdd(IlvLinkImage link)
afterAdd in interface IlvLinkShapePolicyafterAdd in class IlvAbstractLinkShapePolicylink - The link.public void onInstall(IlvLinkImage link)
onInstall in interface IlvLinkShapePolicyonInstall in class IlvAbstractLinkShapePolicylink - The link.public void afterSetIntermediateLinkPoints(IlvLinkImage link)
afterSetIntermediateLinkPoints in interface IlvLinkShapePolicyafterSetIntermediateLinkPoints in class IlvAbstractLinkShapePolicylink - The link.public void afterInsertPoint(IlvLinkImage link, int index, IlvTransformer t)
afterInsertPoint in interface IlvLinkShapePolicyafterInsertPoint in class IlvAbstractLinkShapePolicylink - The link.index - The index at which the new point was inserted.t - The transformer through which the link is drawn.public boolean allowRemovePoint(IlvLinkImage link, int index, IlvTransformer t)
true if the policy allows to remove the point.
Returns false otherwise.
allowRemovePoint in interface IlvLinkShapePolicyallowRemovePoint in class IlvAbstractLinkShapePolicylink - The link.index - The index of the point to be removed.t - The transformer through which the link is drawn.public void afterRemovePoint(IlvLinkImage link, int index, IlvTransformer t)
afterRemovePoint in interface IlvLinkShapePolicyafterRemovePoint in class IlvAbstractLinkShapePolicylink - The link.index - The index at which a point was removed.t - The transformer through which the link is drawn.public boolean allowMovePoint(IlvLinkImage link, int index, double x, double y, IlvTransformer t)
true if the policy allows to move the point.
Returns false otherwise.
allowMovePoint in interface IlvLinkShapePolicyallowMovePoint in class IlvAbstractLinkShapePolicylink - The link.index - The index of the point to be moved.x - The new x coordinate (in manager coordinates).y - The new y coordinate (in manager coordinates).t - The transformer through which the link is drawn.public void afterMovePoint(IlvLinkImage link, int index, IlvTransformer t)
afterMovePoint in interface IlvLinkShapePolicyafterMovePoint in class IlvAbstractLinkShapePolicylink - The link.index - The index of the point that was moved.t - The transformer through which the link is drawn.public void afterApplyTransform(IlvLinkImage link, IlvTransformer t)
afterApplyTransform in interface IlvLinkShapePolicyafterApplyTransform in class IlvAbstractLinkShapePolicylink - The link.t - The applied transformer.public void afterFromNodeMoved(IlvLinkImage link)
afterFromNodeMoved in interface IlvLinkShapePolicyafterFromNodeMoved in class IlvAbstractLinkShapePolicylink - The link.public void afterToNodeMoved(IlvLinkImage link)
afterToNodeMoved in interface IlvLinkShapePolicyafterToNodeMoved in class IlvAbstractLinkShapePolicylink - The link.public IlvPoint[] getLinkPoints(IlvLinkImage link, IlvTransformer t)
getLinkPoints in interface IlvLinkShapePolicygetLinkPoints in class IlvAbstractLinkShapePolicylink - The link.t - The transformer to be applied.public IlvPoint getPointAt(IlvLinkImage link, int index, IlvTransformer t)
getPointAt in interface IlvLinkShapePolicygetPointAt in class IlvAbstractLinkShapePolicylink - The link.index - The index of the point.t - The transformer to be applied.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.