Class TLspPathLabelLocation
- All Implemented Interfaces:
ILcdCloneable,Cloneable
This label location contains two fields used to identify the position of a label on a path.
TLspCurvedPathLabelingAlgorithm uses this label location extension in order to place curved
text labels on a path. TLspLabelPainter can paint labels with path label locations.
The path index is used to identify the 'sub-path' of a path. The path parameter is used
to identify a location on that sub-path. The parameter lies in the interval [0, 1], or is
-1 if it is invalid. The path parameter should be used for paths
in world coordinates.
- Since:
- 2012.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new path label location with the default parameters.TLspPathLabelLocation(int aPathIndex, double aPathParameter) Creates a new path location with the given path index and path parameter. -
Method Summary
Modifier and TypeMethodDescriptionclone()MakesObject.clone()public.voidcopyFrom(ALspLabelLocation aLabelLocation) Copies the location settings from the given label location.booleanintReturns the index used to identify the sub-path of a path.doubleReturns the parameter used to identify a location on a sub-path of a world path.inthashCode()voidsetPathIndex(int aPathIndex) Sets the index used to identify the sub-path of a path.voidsetPathParameter(double aPathParameter) Set the parameter used to identify a location on a sub-path of a world path.toString()Methods inherited from class com.luciad.view.lightspeed.label.location.ALspLabelLocation
isEditedByEditor, isEditedByPlacer, isSticky, setEditedByEditor, setEditedByPlacer, setSticky
-
Constructor Details
-
TLspPathLabelLocation
public TLspPathLabelLocation()Creates a new path label location with the default parameters. -
TLspPathLabelLocation
public TLspPathLabelLocation(int aPathIndex, double aPathParameter) Creates a new path location with the given path index and path parameter.- Parameters:
aPathIndex- a path index.aPathParameter- a path parameter.
-
-
Method Details
-
getPathIndex
public int getPathIndex()Returns the index used to identify the sub-path of a path.- Returns:
- the index used to identify the sub-path of a path.
- See Also:
-
setPathIndex
public void setPathIndex(int aPathIndex) Sets the index used to identify the sub-path of a path. This index determines the subpath on which this label will be placed.- Parameters:
aPathIndex- the index used to identify the sub-path of a path.- See Also:
-
getPathParameter
public double getPathParameter()Returns the parameter used to identify a location on a sub-path of a world path.- Returns:
- the parameter used to identify a location on a sub-path of a world path.
- See Also:
-
setPathParameter
public void setPathParameter(double aPathParameter) Set the parameter used to identify a location on a sub-path of a world path.The parameter should lie in the interval [0, 1]. If it lies outside the interval [0, 1], this label location should be handled as a regular
TLcdLabelLocation.- Parameters:
aPathParameter- the parameter used to identify a location on a sub-path of a world path.- See Also:
-
copyFrom
Description copied from class:ALspLabelLocationCopies the location settings from the given label location.
When creating an extension of this class, also overwrite this method to make sure your extra properties are copied.
- Overrides:
copyFromin classALspLabelLocation- Parameters:
aLabelLocation- the label location to copy properties from.
-
clone
Description copied from interface:ILcdCloneableMakes
When for example extending fromObject.clone()public.java.lang.Object, it can be implemented like this:public Object clone() { try { return super.clone(); } catch ( CloneNotSupportedException e ) { // Cannot happen: extends from Object and implements Cloneable (see also Object.clone) throw new RuntimeException( e ); } }- Specified by:
clonein interfaceILcdCloneable- Overrides:
clonein classALspLabelLocation- See Also:
-
toString
- Overrides:
toStringin classALspLabelLocation
-
equals
- Overrides:
equalsin classALspLabelLocation
-
hashCode
public int hashCode()- Overrides:
hashCodein classALspLabelLocation
-