Class TLspNVGStyler
- All Implemented Interfaces:
ILspStyler
TLspNVGStyler uses the TLcdNVGStyle and the TLcdNVGSymbol of an nvg element for its visualization.
If the standard defined in TLcdNVGSymbol specifies how an object should be rendered, the symbol has
precedence over the style.
If an element has a symbol with an unsupported standard, only the style is used for visualization.
For the visualization of domain specific symbols, implement a custom styler as described in the NVG Developer's guide.
If an element doesn't have a style set, a style with default values according to NVG specifications will be used.
Style customization of military symbols is possible by setting an ILcdAPP6AStyle and
an ILcdMS2525bStyle.
This styler can only style NVG objects and should only be used with layers made by TLspNVGLayerBuilder.
- Since:
- 2015.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor withTLspPaintState.REGULARas paint state.TLspNVGStyler(TLspPaintState aPaintState) if the paint state is different thatTLspPaintState.REGULAR, this styler will decorate the default styling to emphasize the nvg objects. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the default symbology style for APP-6 and MIL-STD 2525 domain objects that do not contain any styling.Deprecated.usegetDefaultMilitarySymbolStyle()instead.Returns the defaultTLcdNVGStyleof this styler.voidsetDefaultAPP6AStyle(ILcdAPP6AStyle aDefaultAPP6AStyle) Deprecated.voidsetDefaultMilitarySymbolStyle(TLcdMilitarySymbolStyle aDefaultStyle) Sets the default symbology style for APP-6 and MIL-STD 2525 domain objects that do not contain any styling.voidsetDefaultMS2525bStyle(ILcdMS2525bStyle aDefaultMS2525bStyle) Deprecated.voidsetDefaultNVGStyle(TLcdNVGStyle aDefaultNVGStyle) Set the defaultTLcdNVGStyleof this styler.voidstyle(Collection<?> aObjects, ALspStyleCollector aStyleCollector, TLspContext aContext) Styles the objects or labels contained inaObjectsusing the methods provided byALspStyleCollector.Methods inherited from class com.luciad.view.lightspeed.style.styler.ALspStyler
addStyleChangeListener, fireStyleChangeEvent, fireStyleChangeEvent, removeStyleChangeListener
-
Constructor Details
-
TLspNVGStyler
public TLspNVGStyler()Default constructor withTLspPaintState.REGULARas paint state.- See Also:
-
TLspNVGStyler
if the paint state is different thatTLspPaintState.REGULAR, this styler will decorate the default styling to emphasize the nvg objects.- Parameters:
aPaintState- the paint state which the styler is used for.
-
-
Method Details
-
style
Description copied from interface:ILspStylerStyles the objects or labels contained in
aObjectsusing the methods provided byALspStyleCollector.Example usages for object styling:
// Same style for all objects: aStyleCollector.objects(aObjects).style(myStyle).submit(); // Object specific styling: aStyleCollector.object(myObject1).style(myStyle1).submit(); aStyleCollector.object(myObject2).style(myStyle2).submit();Example usages for label styling:
if (aStyleCollector instanceof ALspLabelStyleCollector) { ALspLabelStyleCollector labelStyleCollector = (ALspLabelStyleCollector)aStyleCollector; // Specify a priority for all labels of all objects: labelStyleCollector.objects(aDomainObjects).allLabels().priority(3).styles(...).submit(); // Specify an algorithm for a specific label: labelStyleCollector.object(myObject1).label(123).algorithm(...).styles(...).submit(); }The objects that are provided to
aStyleCollectormust be objects that are contained inaObjects. Note that not all objects have to be styled. Objects that are not submitted inaStyleCollectorwill not be painted.This method can be called very frequently, depending on the (amount of) data. If this method is not implemented efficiently, painting performance may be affected.
- Parameters:
aObjects- The objects to be styled.aStyleCollector- A style collector to which all styling information should be passed, this collector is only valid within this method call, and can no longer be used afterwards.aContext- Provides context information that may affect styling, such as view specific properties.
-
getDefaultMS2525bStyle
Deprecated.usegetDefaultMilitarySymbolStyle()instead.Returns the default symbology style for MIL-STD 2525 domain objects that do not contain any styling.- Returns:
- a
ILcdMS2525bStyleinstance. - See Also:
-
setDefaultMS2525bStyle
Deprecated.Sets the default symbology style for MIL-STD 2525 domain objects that do not contain any styling.- Parameters:
aDefaultMS2525bStyle- the default MS2525 Style for the painter provider- See Also:
-
getDefaultAPP6AStyle
Deprecated.usegetDefaultMilitarySymbolStyle()instead.Returns the default symbology style for APP-6 domain objects that do not contain any styling.- Returns:
- a
ILcdAPP6AStyleinstance. - See Also:
-
setDefaultAPP6AStyle
Deprecated.Sets the default symbology style for APP-6 domain objects that do not contain any styling.- Parameters:
aDefaultAPP6AStyle- the default APP6A Style for the painter provider- See Also:
-
getDefaultMilitarySymbolStyle
Returns the default symbology style for APP-6 and MIL-STD 2525 domain objects that do not contain any styling.- Returns:
- a
TLcdMilitarySymbolStyleinstance. - Since:
- 2024.0
-
setDefaultMilitarySymbolStyle
Sets the default symbology style for APP-6 and MIL-STD 2525 domain objects that do not contain any styling.- Parameters:
aDefaultStyle- the default APP-6 and MIL-STD 2525 Style for the painter provider.- Since:
- 2024.0
-
getDefaultNVGStyle
Returns the defaultTLcdNVGStyleof this styler.- Returns:
- the default nvg style.
- See Also:
-
setDefaultNVGStyle
Set the defaultTLcdNVGStyleof this styler.This NVG Style allows to override the default values of the style attributes from NVG specifications. These values will be used to visualize an object if neither its style neither a style of its ancestors explicitly set these attributes. If some values aren't set on this style, the styler will use the ones from the specifications.
For example, a new default font can be set and every elements will use it except the element with a font set.
Note that this default nvg style is not used for elements with a military symbols.
- Parameters:
aDefaultNVGStyle- a default nvg style
-
getDefaultMilitarySymbolStyle()instead.