Package com.luciad.format.cgm.gxy
Class TLcdCGMFillGXYPainterStyle
java.lang.Object
com.luciad.format.cgm.gxy.TLcdCGMFillGXYPainterStyle
- All Implemented Interfaces:
ILcdCloneable
,ILcdGXYPainterStyle
,Serializable
,Cloneable
public class TLcdCGMFillGXYPainterStyle
extends Object
implements ILcdGXYPainterStyle, ILcdCloneable
This class implements an
ILcdGXYPainterStyle
for filling CGM objects.
It sets a selectionColor before painting an Object
in
ILcdGXYPainter.SELECTED
mode, or the color specified by the
CGM fill style otherwise.- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a style to fill objects.TLcdCGMFillGXYPainterStyle
(Color aSelectionColor) Constructs a style to fill objects. -
Method Summary
Modifier and TypeMethodDescriptionclone()
MakesObject.clone()
public.Returns the fill style objects are filled with.Returns the color selected objects are painted with.void
setSelectionColor
(Color aSelectionColor) Sets the color to paint selected objects with.void
setupGraphics
(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) Set upaGraphics
before painting aObject.
-
Constructor Details
-
TLcdCGMFillGXYPainterStyle
public TLcdCGMFillGXYPainterStyle()Constructs a style to fill objects. For selected objects the default selection color (red) is used. -
TLcdCGMFillGXYPainterStyle
Constructs a style to fill objects. Selected objects are painted with the color passed.- Parameters:
aSelectionColor
- the color to paint selected objects with.
-
-
Method Details
-
setSelectionColor
Sets the color to paint selected objects with.- Parameters:
aSelectionColor
- the color to paint selected objects with.- See Also:
-
getSelectionColor
Returns the color selected objects are painted with.- Returns:
- the color selected objects are painted with.
- See Also:
-
getFillStyle
Returns the fill style objects are filled with.- Returns:
- the fill style used to fill objects.
-
setupGraphics
public void setupGraphics(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) Description copied from interface:ILcdGXYPainterStyle
Set upaGraphics
before painting aObject. For example, if(aMode & ILcdGXYPainter.SELECTED) != 0
, you may want to callaGraphics.setColor(Color.red)
for instance, to see the selected representation of a aObject in red.- Specified by:
setupGraphics
in interfaceILcdGXYPainterStyle
- Parameters:
aGraphics
- theGraphics
to set up.aObject
- theObject
to paint.aMode
- the painting mode to consider (defined inILcdGXYPainter
).aGXYContext
- theILcdGXYContext
to consider.- See Also:
-
clone
Description copied from interface:ILcdCloneable
Makes
When for example extending fromObject.clone()
public.java.lang.Object
, it can be implemented like this:public Object clone() { try { return super.clone(); } catch ( CloneNotSupportedException e ) { // Cannot happen: extends from Object and implements Cloneable (see also Object.clone) throw new RuntimeException( e ); } }
- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classObject
- See Also:
-