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
ConstructorsConstructorDescriptionConstructs a newTLcdVPFPainterProvider, initialized with the default style provider. -
Method Summary
Modifier and TypeMethodDescriptionclone()RedefinesObject.cloneto make it public.Returns theTLcdVPFGeoSymProviderthat is used.getGXYLabelPainter(Object aObject) Finds anILcdGXYLabelPainterthat can be used to label the object passed.getGXYPainter(Object aObject) Finds anILcdGXYPainterthat can be used to paint or locate the object passed.Returns theILcdVPFLayerFactoryModelthat is used when GeoSym is not active.booleanReturns whether caching is used when painting this painter's object.voidsetGeoSymProvider(TLcdVPFGeoSymProvider aGeoSymProvider) Sets theTLcdVPFGeoSymProviderto be used.voidsetUsePaintCache(boolean aPaintCache) Turns caching of the representation of the object on or off.voidsetVPFLayerFactoryModel(ILcdVPFLayerFactoryModel aVPFLayerFactoryModel) Sets theILcdVPFLayerFactoryModelto 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 theILcdVPFLayerFactoryModelto be used when GeoSym is not active.- Parameters:
aVPFLayerFactoryModel- theILcdVPFLayerFactoryModelto be used- See Also:
-
getVPFLayerFactoryModel
Returns theILcdVPFLayerFactoryModelthat is used when GeoSym is not active.- Returns:
- the
ILcdVPFLayerFactoryModelthat is used - See Also:
-
setGeoSymProvider
Sets theTLcdVPFGeoSymProviderto be used.- Parameters:
aGeoSymProvider- the GeoSym provider to be used.- See Also:
-
getGeoSymProvider
Returns theTLcdVPFGeoSymProviderthat 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:
trueif caching is used to paint this painter's object,falseotherwise.- See Also:
-
getGXYPainter
Description copied from interface:ILcdGXYPainterProviderFinds anILcdGXYPainterthat 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:
getGXYPainterin 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:ILcdGXYPainterProviderRedefinesObject.cloneto make it public.- Specified by:
clonein interfaceILcdCloneable- Specified by:
clonein interfaceILcdGXYLabelPainterProvider- Specified by:
clonein interfaceILcdGXYPainterProvider- Overrides:
clonein classObject- Returns:
- a clone of this painter provider.
- See Also:
-
getGXYLabelPainter
Description copied from interface:ILcdGXYLabelPainterProviderFinds anILcdGXYLabelPainterthat 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:
getGXYLabelPainterin 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.
-