Class TLspIndexColorModelStyle

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.TLspIndexColorModelStyle
All Implemented Interfaces:
ILspStyler

public class TLspIndexColorModelStyle extends ALspStyle
Index color model style.

Construction of a color model style is done through the Builder design pattern mechanism.

Since:
2012.0
See Also:
  • Constructor Details

    • TLspIndexColorModelStyle

      protected TLspIndexColorModelStyle(TLspIndexColorModelStyle.Builder aBuilder)
      Creates a new style with the properties that are set on the builder
      Parameters:
      aBuilder - a builder which will be used to initialize this style.
  • Method Details

    • newBuilder

      public static TLspIndexColorModelStyle.Builder<?> newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
    • asBuilder

      public TLspIndexColorModelStyle.Builder<?> asBuilder()
      Creates a new builder initialized with all the properties of this style.
      Specified by:
      asBuilder in class ALspStyle
      Returns:
      the new builder.
    • isTransparent

      public boolean isTransparent()
      Description copied from class: ALspStyle
      Determines whether this style is transparent.

      Shapes that are transparent can be painted in a different paint phase than shapes that are not transparent.

      Specified by:
      isTransparent in class ALspStyle
      Returns:
      whether or not this style is transparent
    • getIndexColorModel

      public IndexColorModel getIndexColorModel()
      Gets the index color model. Should never be null.

      This indexed color model should never be modified. To change the indexed color model you should create a new style with a different indexed color model instance.

      Returns:
      the index color model
    • getScaleFactor

      public float getScaleFactor()
      Returns the scale factor with which values are multiplied prior to looking them up in the color model.

      Example use-case:

      Assume you want to visualize a density plot for a layer containing cities, each represented by a point. The density should be based on the population of the city: cities with a large population should have a larger contribution to the density plot compared to cities with a small population.

      This can be done by associating a weight to each city, based on the population. However, the weight should be a factor between 0 and 1. We could for example use as weight: city population / max population in the dataset.

      If you want to use a color model which maps population values onto colors (and not the weighted values), you can use this method to rescale the weights back to populations. In this example, the scale factor would be max population in the dataset.

      Returns:
      the scale factor
      Since:
      2017.1
      See Also:
    • equals

      public boolean equals(Object aO)
      Overrides:
      equals in class ALspStyle
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ALspStyle