Package com.luciad.view.gxy
Class TLcdGXYPainterColorStyle
java.lang.Object
com.luciad.view.gxy.TLcdGXYPainterColorStyle
- All Implemented Interfaces:
ILcdCloneable
,ILcdGXYPainterStyle
,Serializable
,Cloneable
- Direct Known Subclasses:
TLcdGXYPainterFontStyle
This is an implementation of the
ILcdGXYPainterStyle
interface. It sets a selectionColor before painting an Object
in
ILcdGXYPainter.SELECTED
mode, a defaultColor otherwise.- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdGXYPainterColorStyle
(Color aDefaultColor) TLcdGXYPainterColorStyle
(Color aDefaultColor, Color aSelectionColor) -
Method Summary
Modifier and TypeMethodDescriptionclone()
MakesObject.clone()
public.void
setDefaultColor
(Color newDefaultColor) void
setSelectionColor
(Color newSelectionColor) void
setupGraphics
(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) CallsaGraphics.setColor(getSelectionColor)
if(aMode & <code>ILcdGXYPainter.SELECTED</code>) != 0
and getSelectionColor returns a nonnull
value,aGraphics.setColor(getDefaultColor)
otherwise.
-
Constructor Details
-
TLcdGXYPainterColorStyle
public TLcdGXYPainterColorStyle() -
TLcdGXYPainterColorStyle
-
TLcdGXYPainterColorStyle
-
-
Method Details
-
setupGraphics
public void setupGraphics(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) CallsaGraphics.setColor(getSelectionColor)
if(aMode & <code>ILcdGXYPainter.SELECTED</code>) != 0
and getSelectionColor returns a nonnull
value,aGraphics.setColor(getDefaultColor)
otherwise.- 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:
-
setDefaultColor
-
getDefaultColor
-
setSelectionColor
-
getSelectionColor
-
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:
-