Class TLspRulerDistanceFormatStyle
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.painter.label.style.ALspLabelTextProviderStyle
com.luciad.view.lightspeed.controller.ruler.TLspRulerDistanceFormatStyle
- All Implemented Interfaces:
ILcdCloneable,ILspStyler,Cloneable
- Direct Known Subclasses:
TLspRulerSegmentLabelContentStyle
A simple extension of
ALspLabelTextProviderStyle. The label content when the domain
object is an instance of ALspRulerMeasurement is equal to the
total length of the ruler measurement, formatted using a
a distance format.- Since:
- 2012.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for the ruler distance format style styles. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new builder initialized with all the properties of this style.booleanReturns the used distance format.String[]getText(Object aDomainObject, Object aSubLabelID, TLspContext aContext) Returns text (one or more strings) for the given domain object and sublabel ID.inthashCode()static TLspRulerDistanceFormatStyle.Builder<?> Creates a new builder with the default value: Distance format:TLcdDistanceFormatwith user unit metre.Methods 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
-
TLspRulerDistanceFormatStyle
-
-
Method Details
-
newBuilder
Creates a new builder with the default value:- Distance format:
TLcdDistanceFormatwith user unit metre.
- Returns:
- the new builder.
- Distance format:
-
asBuilder
Creates a new builder initialized with all the properties of this style.- Overrides:
asBuilderin classALspLabelTextProviderStyle- Returns:
- the new builder.
-
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 classALspLabelTextProviderStyle- Parameters:
aDomainObject- a domain object.aSubLabelID- a sublabel ID.aContext- the context.- Returns:
- text for the given identifier.
-
equals
-
hashCode
public int hashCode() -
getDistanceFormat
Returns the used distance format.- Returns:
- the current distance format.
-