Class TLcdNetCDFGXYPainterProvider
- All Implemented Interfaces:
ILcdCloneable
,ILcdGXYPainterProvider
,Serializable
,Cloneable
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 Summary
ConstructorDescriptionCreates a new painter provider that provider image painters with a default styling for the given model. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a clone of this painter provider.static TLcdColorMap
createDefaultColorMap
(Object aNetCDFObject) Creates a default color map for the given NetCDF object.protected ILcdGXYPainter
createImagePainter
(ILcdModel aModel) Creates and configures an image painter for the given model.getGXYPainter
(Object aObject) Returns an image painter for the given object.
-
Constructor Details
-
TLcdNetCDFGXYPainterProvider
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
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
Returns an image painter for the given object. This image painter was created by thecreateImagePainter
method.- Specified by:
getGXYPainter
in interfaceILcdGXYPainterProvider
- Parameters:
aObject
- the object to find a painter for- Returns:
- an image painter for the given object.
-
createImagePainter
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 theALcdImage
to be painted contains 2 bands. In that case it returnsTLcdGXYImageIconPainter
, configured with a default icon. In order to customize the icon used, it is possible to override this method and return aTLcdGXYImageIconPainter
, configured with a different icon.- Parameters:
aModel
- to model for which to create a painter- Returns:
- a configured image painter
-
clone
Returns a clone of this painter provider.- Specified by:
clone
in interfaceILcdCloneable
- Specified by:
clone
in interfaceILcdGXYPainterProvider
- Overrides:
clone
in classObject
- Returns:
- a clone of this painter provider.
- See Also:
-