Package com.luciad.format.mif.gxy
Class TLcdMIFTextGXYFillStyle
java.lang.Object
com.luciad.format.mif.gxy.TLcdMIFTextGXYFillStyle
- All Implemented Interfaces:
ILcdCloneable
,ILcdGXYPainterStyle
,Serializable
,Cloneable
This class implements an
ILcdGXYPainterStyle
for the
of MIF text objects.
It sets a selectionColor before painting an Object
in
ILcdGXYPainter.SELECTED
mode, or the color and stroke specified
by the MIF pen otherwise.- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs aTLcdMIFTextGXYFillStyle
with the default selection color (yellow) for selected objects.TLcdMIFTextGXYFillStyle
(Color aSelectionColor) Constructs aTLcdMIFTextGXYFillStyle
with the given selection color for selected objects. -
Method Summary
Modifier and TypeMethodDescriptionclone()
MakesObject.clone()
public.getColor()
Returns the color used to display non selected objects.Returns the color used for selected objects.void
Sets the color to use for non selected objects.void
setSelectionColor
(Color aSelectionColor) Sets the color to use for selected objects.void
setupGraphics
(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) Set upaGraphics
before painting aObject.
-
Constructor Details
-
TLcdMIFTextGXYFillStyle
public TLcdMIFTextGXYFillStyle()Constructs aTLcdMIFTextGXYFillStyle
with the default selection color (yellow) for selected objects. -
TLcdMIFTextGXYFillStyle
Constructs aTLcdMIFTextGXYFillStyle
with the given selection color for selected objects.- Parameters:
aSelectionColor
- the color to use for selected objects.
-
-
Method Details
-
setSelectionColor
Sets the color to use for selected objects.- Parameters:
aSelectionColor
- the color for selected objects.- See Also:
-
getSelectionColor
Returns the color used for selected objects.- Returns:
- the color used to display selected objects.
- See Also:
-
setColor
Sets the color to use for non selected objects. Also used for selected objects when the selection color is set to null.- Parameters:
aColor
- the color to use for non selected objects.- See Also:
-
getColor
Returns the color used to display non selected objects.- Returns:
- the color used to display non selected objects.
- See Also:
-
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:
-