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
ConstructorDescriptionCreates 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.void
copyFrom
(ALspLabelLocation aLabelLocation) Copies the location settings from the given label location.boolean
int
Returns the index used to identify the sub-path of a path.double
Returns the parameter used to identify a location on a sub-path of a world path.int
hashCode()
void
setPathIndex
(int aPathIndex) Sets the index used to identify the sub-path of a path.void
setPathParameter
(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:ALspLabelLocation
Copies 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:
copyFrom
in classALspLabelLocation
- Parameters:
aLabelLocation
- the label location to copy properties from.
-
clone
Description copied from interface:ILcdCloneable
Makes
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:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classALspLabelLocation
- See Also:
-
toString
- Overrides:
toString
in classALspLabelLocation
-
equals
- Overrides:
equals
in classALspLabelLocation
-
hashCode
public int hashCode()- Overrides:
hashCode
in classALspLabelLocation
-