Class TLspRulerSegmentLabelContentStyle
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.painter.label.style.ALspLabelTextProviderStyle
com.luciad.view.lightspeed.controller.ruler.TLspRulerDistanceFormatStyle
com.luciad.view.lightspeed.controller.ruler.TLspRulerSegmentLabelContentStyle
- All Implemented Interfaces:
ILcdCloneable,ILspStyler,Cloneable
An extension of
TLspRulerDistanceFormatStyle that adds support for displaying the
azimuth of a segment (if available). The segment is identified by an Integer passed
as aSubLabelId along side an domain object that is an instance of
ALspRulerMeasurement.- Since:
- 2012.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for the ruler segment label content style. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionCreates a new builder initialized with all the properties of this style.booleanReturns the used azimuth format.String[]getText(Object aDomainObject, Object aSubLabelID, TLspContext aContext) Returns text (one or more strings) for the given domain object and sublabel ID.inthashCode()booleanReturns whether or not the azimuth is displayed in the segment labels.Creates a new builder with the default values: Distance format:TLcdDistanceFormatwith user unit metre. Azimuth format: aDecimalFormatwith pattern"0.0°". Display azimuth: false.Methods inherited from class com.luciad.view.lightspeed.controller.ruler.TLspRulerDistanceFormatStyle
getDistanceFormatMethods inherited from class com.luciad.view.lightspeed.painter.label.style.ALspLabelTextProviderStyle
clone, isTransparentMethods inherited from class com.luciad.view.lightspeed.style.ALspStyle
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
-
Constructor Details
-
TLspRulerSegmentLabelContentStyle
-
-
Method Details
-
newBuilder
Creates a new builder with the default values:- Distance format:
TLcdDistanceFormatwith user unit metre. - Azimuth format: a
DecimalFormatwith pattern"0.0°". - Display azimuth: false.
- Returns:
- the new builder.
- Distance format:
-
asBuilder
Creates a new builder initialized with all the properties of this style.- Overrides:
asBuilderin classTLspRulerDistanceFormatStyle- Returns:
- the new builder.
-
getAzimuthFormat
Returns the used azimuth format.- Returns:
- the current azimuth format.
-
isDisplayAzimuth
public boolean isDisplayAzimuth()Returns whether or not the azimuth is displayed in the segment labels.- Returns:
- true if azimuth are to be displayed, false otherwise.
-
getText
Description copied from class:ALspLabelTextProviderStyleReturns text (one or more strings) for the given domain object and sublabel ID. When no label should be painted, this method should return
nullor an empty array.By default, this method returns an array containing only the result of the toString() method of the given domain object.
When overriding this method, the implementation should make sure that the returned text is consistent for the given label. I.e. it should not return a different
Stringevery time it is called for a given label. Not doing so may lead to worse performance and incorrectly visualized labels.- Overrides:
getTextin classTLspRulerDistanceFormatStyle- Parameters:
aDomainObject- a domain object.aSubLabelID- a sublabel ID.aContext- the context.- Returns:
- text for the given identifier.
-
equals
- Overrides:
equalsin classTLspRulerDistanceFormatStyle
-
hashCode
public int hashCode()- Overrides:
hashCodein classTLspRulerDistanceFormatStyle
-