Package com.luciad.format.mif.gxy
Class TLcdMIFTextGXYFontStyle
java.lang.Object
com.luciad.format.mif.gxy.TLcdMIFTextGXYFontStyle
- All Implemented Interfaces:
ILcdCloneable,ILcdGXYPainterStyle,Serializable,Cloneable
This class implements an
ILcdGXYPainterStyle for 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
ConstructorsConstructorDescriptionConstructs aTLcdMIFTextGXYFontStylewith the default selection color (red).TLcdMIFTextGXYFontStyle(Color aSelectionColor) Constructs aTLcdMIFTextGXYFontStylewith the given selection color. -
Method Summary
Modifier and TypeMethodDescriptionclone()MakesObject.clone()public.getColor()Returns the color used to display non selected objects.getFont()Returns the font used to display the text objects.Returns the color in which selected objects are displayed.voidSets the color to display non selected objects.voidSets the font to use to display the text objects.voidsetSelectionColor(Color aSelectionColor) Sets the color in which selected objects are displayed.voidsetupGraphics(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) Set upaGraphicsbefore painting aObject.
-
Constructor Details
-
TLcdMIFTextGXYFontStyle
public TLcdMIFTextGXYFontStyle()Constructs aTLcdMIFTextGXYFontStylewith the default selection color (red). -
TLcdMIFTextGXYFontStyle
Constructs aTLcdMIFTextGXYFontStylewith the given selection color.- Parameters:
aSelectionColor- the color to paint selected text in.
-
-
Method Details
-
setSelectionColor
Sets the color in which selected objects are displayed.- Parameters:
aSelectionColor- the color in which selected objects are displayed.- See Also:
-
getSelectionColor
Returns the color in which selected objects are displayed.- Returns:
- the color in which selected objects are displayed.
- See Also:
-
setFont
Sets the font to use to display the text objects.- Parameters:
aFont- the font to use to display the text objects.- See Also:
-
getFont
Returns the font used to display the text objects.- Returns:
- the font used to display the text objects.
- See Also:
-
setColor
Sets the color to display non selected objects.- Parameters:
aColor- the color to display 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:ILcdGXYPainterStyleSet upaGraphicsbefore 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:
setupGraphicsin interfaceILcdGXYPainterStyle- Parameters:
aGraphics- theGraphicsto set up.aObject- theObjectto paint.aMode- the painting mode to consider (defined inILcdGXYPainter).aGXYContext- theILcdGXYContextto consider.- See Also:
-
clone
Description copied from interface:ILcdCloneableMakes
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:
clonein interfaceILcdCloneable- Overrides:
clonein classObject- See Also:
-