Class TLspShapePainter

java.lang.Object
com.luciad.view.lightspeed.painter.shape.TLspShapePainter
All Implemented Interfaces:
ILspPaintGroupsChangeListener, ILspEditableStyledPainter, ILspPainter

public class TLspShapePainter extends Object implements ILspEditableStyledPainter
Painter that supports vector based objects and geo-referenced meshes. An ILspShapeDiscretizer is used to create a discretized representation of the shape's geometry. By default, TLspShapeDiscretizer is used. By consequence, this painter supports all shapes supported by this discretizer. Adding support for additional shape types will usually be done by extending the shape discretizer, and calling setShapeDiscretizer.

The geometry that is painted for a given style is retrieved using the corresponding ALspStyleTargetProvider. If a style target provider is not available, the object will be passed to the shape discretizer directly, which supports most ILcdShape implementations by default.

Geo-referenced meshes are not passed to the discretizer, as the meshes are assumed to be discretized.

Styling of the painted shapes and meshes is performed through the set ILspStyler. Separate stylers can be configured depending on the TLspPaintState. This allows different styles for, regular, selected, or edited objects.

Note that you should avoid using this painter directly, have a look at TLspShapeLayerBuilder instead.

In all cases, the painting is conditional based on the presence of an appropriate style in the output of the ILspStyler. The following styles are supported:

The painter supports multiple styles for a given object, except for TLspFillStyle and TLsp3DMeshStyle. You can for instance specify two icon styles for a point, in which case both icons will be shown on top of each other.

Visualizing density plots

This painter can also be used to visualize density plots. This is done by letting the styler submit TLspDensityLineStyle, TLspDensityLineStyle or TLspDensityPointStyle instances. The colors used for the density plot can be controlled by also passing a TLspIndexColorModelStyle instance.

Limitations

  • Selection and editing is not supported for density plots. For those paint states, the painter won't paint anything.
  • Only one elevation mode is supported for the whole density plot. Using a mix of different elevation modes in the density styles will have no effect.
  • Only one TLspIndexColorModelStyle can be used for the whole density plot. Submitting multiple ones in the styler will have no effect. Note that the same TLspIndexColorModelStyle must be submitted for each object.
  • Mixing ALspDensityStyle instances with regular styles is not supported and will throw exceptions. When painting density plots, the styler should only submit ALspDensityStyle instances and optionally a single TLspIndexColorModelStyle.

Since:
2012.0
  • Constructor Details

    • TLspShapePainter

      public TLspShapePainter(ILspStyler aDefaultStyler)
      Creates a new shape painter using the given styler for default styles.
      Parameters:
      aDefaultStyler - The styler that will be used for PaintState.DEFAULT.
    • TLspShapePainter

      public TLspShapePainter()
      Constructs a shape painter that will be initialized with default styling that allows basic visualization of most geometries supported by this painter.

      Default styling is available for surfaces, curves and points, and is defined by the defaults in the styles themselves. An ILspCustomizableStyler is used, so the default styles can be enabled/disabled or replaced.

      See Also:
  • Method Details