Package com.luciad.format.dwg.gxy
Class TLcdDWGGXYPainterProvider
java.lang.Object
com.luciad.format.dwg.gxy.TLcdDWGGXYPainterProvider
- All Implemented Interfaces:
ILcdCloneable
,ILcdDeepCloneable
,ILcdGXYPainterProvider
,Serializable
,Cloneable
public class TLcdDWGGXYPainterProvider
extends Object
implements ILcdGXYPainterProvider, ILcdDeepCloneable
This class implements an
ILcdGXYPainterProvider
for DWG objects.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Color[]
The default DWG color map used to color elements based on their color index. -
Constructor Summary
ConstructorDescriptionTLcdDWGGXYPainterProvider
(boolean aUsePaintCache) Creates a new TLcdDWGGXYPainterProvider with the given level symbology and color table.TLcdDWGGXYPainterProvider
(boolean aUsePaintCache, ILcdIcon aIcon, ILcdGXYPainterStyle aLineStyle, ILcdGXYPainterStyle aFillStyle, ILcdGXYPainterStyle aFontStyle) Creates a new TLcdDWGGXYPainterProvider with the given level symbology and color table, and a set of painter styles to specify the drawing style of the ILcdDWGShape objects. -
Method Summary
Modifier and TypeMethodDescriptionclone()
RedefinesObject.clone
to make it public.Returns a deep clone of this Object.getGXYPainter
(Object aObject) Finds anILcdGXYPainter
that can be used to paint or locate the object passed.
-
Field Details
-
DEFAULT_COLOR_TABLE
The default DWG color map used to color elements based on their color index.
-
-
Constructor Details
-
TLcdDWGGXYPainterProvider
public TLcdDWGGXYPainterProvider(boolean aUsePaintCache) Creates a new TLcdDWGGXYPainterProvider with the given level symbology and color table. The painter styles that will be used by the painters are suitable for standard drawing of DWG files.- Parameters:
aUsePaintCache
- specifies whether the painters should cache transformed coordinates.
-
TLcdDWGGXYPainterProvider
public TLcdDWGGXYPainterProvider(boolean aUsePaintCache, ILcdIcon aIcon, ILcdGXYPainterStyle aLineStyle, ILcdGXYPainterStyle aFillStyle, ILcdGXYPainterStyle aFontStyle) Creates a new TLcdDWGGXYPainterProvider with the given level symbology and color table, and a set of painter styles to specify the drawing style of the ILcdDWGShape objects.- Parameters:
aUsePaintCache
- specifies whether the painters should cache transformed coordinates.aLineStyle
- the ILcdGXYPainterStyle that the painters will use for painting lines.aFillStyle
- the ILcdGXYPainterStyle that the painters will use for filling areas.aFontStyle
- the ILcdGXYPainterStyle that the painters will use for painting text.
-
-
Method Details
-
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 interfaceILcdGXYPainterProvider
- Overrides:
clone
in classObject
- Returns:
- a clone of this painter provider.
- See Also:
-
clone
Description copied from interface:ILcdDeepCloneable
Returns a deep clone of this Object. An object dictionary is used to keep track of all objects of the original Object graph, for which a clone has already been created. The dictionary should be ajava.util.Map
, using reference-equality instead of object-equality when comparing keys (such as thejava.util.IdentityHashMap
). It contains as keys the objects in the original object graph that have already been cloned, and as values their corresponding clone. The Object returned by this method should fulfill the following conditions, as specified in the generalObject.clone()
contract:this.clone(aObjectDictionary) != this
this.clone(aObjectDictionary).getClass() == this.getClass()
this.clone(aObjectDictionary).equals(this)
- If a clone of this Object already exists in the object dictionary before this
clone
method is called, this method shall return that clone:aObjectDictionary.get(this) == null || aObjectDictionary.get(this) == this.clone(aObjectDictionary)
- The object dictionary shall contain the resulting clone, after this
clone method has completed:
this.clone(aObjectDictionary) == aObjectDictionary.get(this)
- Specified by:
clone
in interfaceILcdDeepCloneable
- Parameters:
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made, and their corresponding clone Object.- Returns:
- a deep clone of this Object that fulfills the conditions described above.
-