Package com.luciad.format.vpf.gxy
Class TLcdVPFGXYPainterProvider
java.lang.Object
com.luciad.format.vpf.gxy.TLcdVPFGXYPainterProvider
- All Implemented Interfaces:
ILcdCloneable
,ILcdGXYLabelPainterProvider
,ILcdGXYPainterProvider
,Serializable
,Cloneable
public class TLcdVPFGXYPainterProvider
extends Object
implements ILcdGXYPainterProvider, ILcdGXYLabelPainterProvider
A painter provider for VPF data.
When GeoSym is active (TLcdVPFGeoSym.isActive()), a GeoSym painting style will be used,
otherwise,
a style provided by the
ILcdVPFLayerFactoryModel
will be used.- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a newTLcdVPFPainterProvider
, initialized with the default style provider. -
Method Summary
Modifier and TypeMethodDescriptionclone()
RedefinesObject.clone
to make it public.Returns theTLcdVPFGeoSymProvider
that is used.getGXYLabelPainter
(Object aObject) Finds anILcdGXYLabelPainter
that can be used to label the object passed.getGXYPainter
(Object aObject) Finds anILcdGXYPainter
that can be used to paint or locate the object passed.Returns theILcdVPFLayerFactoryModel
that is used when GeoSym is not active.boolean
Returns whether caching is used when painting this painter's object.void
setGeoSymProvider
(TLcdVPFGeoSymProvider aGeoSymProvider) Sets theTLcdVPFGeoSymProvider
to be used.void
setUsePaintCache
(boolean aPaintCache) Turns caching of the representation of the object on or off.void
setVPFLayerFactoryModel
(ILcdVPFLayerFactoryModel aVPFLayerFactoryModel) Sets theILcdVPFLayerFactoryModel
to be used when GeoSym is not active.
-
Constructor Details
-
TLcdVPFGXYPainterProvider
public TLcdVPFGXYPainterProvider()Constructs a newTLcdVPFPainterProvider
, initialized with the default style provider.
-
-
Method Details
-
setVPFLayerFactoryModel
Sets theILcdVPFLayerFactoryModel
to be used when GeoSym is not active.- Parameters:
aVPFLayerFactoryModel
- theILcdVPFLayerFactoryModel
to be used- See Also:
-
getVPFLayerFactoryModel
Returns theILcdVPFLayerFactoryModel
that is used when GeoSym is not active.- Returns:
- the
ILcdVPFLayerFactoryModel
that is used - See Also:
-
setGeoSymProvider
Sets theTLcdVPFGeoSymProvider
to be used.- Parameters:
aGeoSymProvider
- the GeoSym provider to be used.- See Also:
-
getGeoSymProvider
Returns theTLcdVPFGeoSymProvider
that is used.- Returns:
- the GeoSym provider that is used.
- See Also:
-
setUsePaintCache
public void setUsePaintCache(boolean aPaintCache) Turns caching of the representation of the object on or off. Caching reduces the time to paint an object but requires more memory. By default, caching is turned on.- Parameters:
aPaintCache
- A flag indicating whether to use caching when painting an object.- See Also:
-
isUsePaintCache
public boolean isUsePaintCache()Returns whether caching is used when painting this painter's object.- Returns:
true
if caching is used to paint this painter's object,false
otherwise.- See Also:
-
getGXYPainter
Description copied from interface:ILcdGXYPainterProvider
Finds anILcdGXYPainter
that can be used to paint or locate the object passed.The painter provider is responsible for setting the object to the painter before returning the painter. An implementation should therefore have the following structure:
public ILcdGXYPainter getGXYPainter(Object aObject) { ILcdGXYPainter painter = ... // find the painter for the object if (painter != null) { painter.setObject(aObject); } return painter; }
- Specified by:
getGXYPainter
in interfaceILcdGXYPainterProvider
- Parameters:
aObject
- the object to find a painter for- Returns:
- a painter that can be used to paint or locate the object; or null if no painter could be found for the given object, or the object could not be set on the retrieved painter.
-
clone
Description copied from interface:ILcdGXYPainterProvider
RedefinesObject.clone
to make it public.- Specified by:
clone
in interfaceILcdCloneable
- Specified by:
clone
in interfaceILcdGXYLabelPainterProvider
- Specified by:
clone
in interfaceILcdGXYPainterProvider
- Overrides:
clone
in classObject
- Returns:
- a clone of this painter provider.
- See Also:
-
getGXYLabelPainter
Description copied from interface:ILcdGXYLabelPainterProvider
Finds anILcdGXYLabelPainter
that can be used to label the object passed.The label painter provider is responsible for setting the object to the label painter before returning the label painter. An implementation should therefore have the following structure:
public ILcdGXYLabelPainter getGXYLabelPainter(Object aObject) { ILcdGXYLabelPainter labelPainter = ... // find the label painter for the object if (labelPainter != null) { labelPainter.setObject(aObject); } return labelPainter; }
- Specified by:
getGXYLabelPainter
in interfaceILcdGXYLabelPainterProvider
- Parameters:
aObject
- the object to find a label painter for- Returns:
- a label painter that can be used to label the object; or null if no label painter could be found for the given object, or the object could not be set on the retrieved label painter.
-