Class TLcdNetCDFGXYPainterProvider

java.lang.Object
com.luciad.format.netcdf.gxy.TLcdNetCDFGXYPainterProvider
All Implemented Interfaces:
ILcdCloneable, ILcdGXYPainterProvider, Serializable, Cloneable

public class TLcdNetCDFGXYPainterProvider extends Object implements ILcdGXYPainterProvider

Painter provider for NetCDF models. It provides painters with sensible styling defaults for NetCDF data.

In order to customize the styling, it is possible to override createImagePainter and create and configure an image painter or TLcdGXYImageIconPainter for a given model.

By default, this class uses a TLcdGXYImagePainter, unless the ALcdImage to be painted contains 2 bands. In that case it uses a TLcdGXYImageIconPainter, configured with a default icon.

Since:
2015.0
See Also:
  • Constructor Details

    • TLcdNetCDFGXYPainterProvider

      public TLcdNetCDFGXYPainterProvider(ILcdModel aModel)
      Creates a new painter provider that provider image painters with a default styling for the given model.
      Parameters:
      aModel - a netCDF model.
  • Method Details

    • createDefaultColorMap

      public static TLcdColorMap createDefaultColorMap(Object aNetCDFObject)
      Creates a default color map for the given NetCDF object. It takes into account the type of data and the min and max values of the data, if available. This painter provider uses the color map retrieved from this method as default color map.
      Parameters:
      aNetCDFObject - the NetCDF object for which to create a color map.
      Returns:
      a default color map for the given image.
      Throws:
      IllegalArgumentException - if the given image is not created by the NetCDF model decoder.
    • getGXYPainter

      public ILcdGXYPainter getGXYPainter(Object aObject)
      Returns an image painter for the given object. This image painter was created by the createImagePainter method.
      Specified by:
      getGXYPainter in interface ILcdGXYPainterProvider
      Parameters:
      aObject - the object to find a painter for
      Returns:
      an image painter for the given object.
    • createImagePainter

      protected ILcdGXYPainter createImagePainter(ILcdModel aModel)

      Creates and configures an image painter for the given model. Override this method to create and configure a custom image painter.

      By default, this method returns a TLcdGXYImagePainter, unless the ALcdImage to be painted contains 2 bands. In that case it returns TLcdGXYImageIconPainter, configured with a default icon. In order to customize the icon used, it is possible to override this method and return a TLcdGXYImageIconPainter, configured with a different icon.

      Parameters:
      aModel - to model for which to create a painter
      Returns:
      a configured image painter
    • clone

      public Object clone()
      Returns a clone of this painter provider.
      Specified by:
      clone in interface ILcdCloneable
      Specified by:
      clone in interface ILcdGXYPainterProvider
      Overrides:
      clone in class Object
      Returns:
      a clone of this painter provider.
      See Also: