public static class EdgeLabel.ParamModel extends java.lang.Object implements EdgeLabelPosition
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_RATIO
0.5f: The default ratio.
|
POSITION_HEAD, POSITION_SOURCETAIL, POSITION_TAIL, POSITION_TARGETTAIL, POSITION_UNDEF
Constructor and Description |
---|
ParamModel() |
Modifier and Type | Method and Description |
---|---|
int |
appliedOnSegment()
Return the segment on which the label is applied.
|
void |
applyOnSegment(int segment)
Set the segment on which the label is applied.
|
EdgeLabel.ParamModel |
clone() |
float |
getDistance()
Return the label distance from the edge.
|
short |
getPosition()
Return the position.
|
float |
getRatio()
Return the label ratio on the edge.
|
boolean |
isAutoFlip()
Return the auto-flip property of the model.
|
boolean |
isAutoRotate()
Return the auto-rotate property of the model.
|
boolean |
isDefaultRatio()
Return true if the ratio is the default ratio.
|
boolean |
isOnSegmentAutomatic()
Set if the label is applied automatically on the best segment depending on the ratio.
|
void |
setAutoFlip(boolean autoFlip)
Set the auto-flip property of the model.
|
void |
setAutoRotate(boolean autoRotate)
Set the auto-rotate property of the model.
|
void |
setDistance(float distance)
Set the label distance from the edge.
|
void |
setOnSegmentAutomatic(boolean isAutomatic)
Set if the label is applied automatically on the best segment depending on the ratio.
|
void |
setPosition(short position)
Set the position.
|
void |
setRatio(float ratio)
Set the label ratio on the edge.
|
void |
setSmartPosition(short position,
boolean onEdge)
Set the smart position of the label.
|
public static final float DEFAULT_RATIO
public EdgeLabel.ParamModel clone()
clone
in class java.lang.Object
public void setDistance(float distance)
distance
- the distancepublic float getDistance()
public void setOnSegmentAutomatic(boolean isAutomatic)
isAutomatic
- true if the label is applied automatically on the best segment depending on the ratiopublic boolean isOnSegmentAutomatic()
public void applyOnSegment(int segment)
segment
- the segmentpublic int appliedOnSegment()
public boolean isDefaultRatio()
public void setRatio(float ratio)
ratio
- the ratiopublic float getRatio()
public void setPosition(short position)
position
- the positionpublic short getPosition()
public void setAutoRotate(boolean autoRotate)
autoRotate
- true if the label auto-rotatespublic boolean isAutoRotate()
public void setAutoFlip(boolean autoFlip)
autoFlip
- true if the label auto-flipspublic boolean isAutoFlip()
public void setSmartPosition(short position, boolean onEdge)
position
- the positiononEdge
- true if the label must be alongside the edgeCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence