Class TLspPOLStyler

java.lang.Object
com.luciad.view.lightspeed.style.styler.ALspStyler
com.luciad.format.pol.lightspeed.TLspPOLStyler
All Implemented Interfaces:
ILspStyler

public class TLspPOLStyler extends ALspStyler
A styler for POL elements.

The styler contains a color table and a type table to define the colors to render the elements in based on their type or their color index when the color is set to be different from the default color for that type.

Since:
2012.0
  • Constructor Details

    • TLspPOLStyler

      public TLspPOLStyler()
      Creates a new POL styler.
  • Method Details

    • getColorTable

      public ILcdPOLColorTable getColorTable()
    • setColorTable

      public void setColorTable(ILcdPOLColorTable aColorTable)
    • getTypeTable

      public ILcdPOLTypeTable getTypeTable()
    • setTypeTable

      public void setTypeTable(ILcdPOLTypeTable aTypeTable)
    • style

      public void style(Collection<?> aObjects, ALspStyleCollector aStyleCollector, TLspContext aContext)
      Description copied from interface: ILspStyler

      Styles the objects or labels contained in aObjects using the methods provided by ALspStyleCollector.

      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 aStyleCollector must be objects that are contained in aObjects. Note that not all objects have to be styled. Objects that are not submitted in aStyleCollector will 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.