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.
Constructor and Description |
---|
TLcdNetCDFGXYPainterProvider(ILcdModel aModel)
Creates a new painter provider that provider image painters with a default
styling for the given model.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
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.
|
ILcdGXYPainter |
getGXYPainter(Object aObject)
Returns an image painter for the given object.
|
public TLcdNetCDFGXYPainterProvider(ILcdModel aModel)
aModel
- a netCDF model.public static TLcdColorMap createDefaultColorMap(Object aNetCDFObject)
aNetCDFObject
- the NetCDF object for which to create a color map.IllegalArgumentException
- if the given image is not created by the
NetCDF model decoder.public ILcdGXYPainter getGXYPainter(Object aObject)
createImagePainter
method.getGXYPainter
in interface ILcdGXYPainterProvider
aObject
- the object to find a painter forprotected 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.
aModel
- to model for which to create a painterpublic Object clone()
clone
in interface ILcdCloneable
clone
in interface ILcdGXYPainterProvider
clone
in class Object
Object.clone()