Package com.luciad.format.mif.gxy
Class TLcdMIFPenGXYPainterStyle
java.lang.Object
com.luciad.format.mif.gxy.TLcdMIFPenGXYPainterStyle
- All Implemented Interfaces:
ILcdCloneable,ILcdGXYPainterStyle,Serializable,Cloneable
This class implements an
ILcdGXYPainterStyle for painting MIF
objects, based on a given MIF pen style.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a pen painter style with the default selection color (red) for selected objects.TLcdMIFPenGXYPainterStyle(Color aSelectionColor) Constructs a pen painter style with the given selection color for selected objects. -
Method Summary
Modifier and TypeMethodDescriptionclone()MakesObject.clone()public.Returns the line style used to paint objects.Returns the color used to paint selected objects.voidsetLineStyle(TLcdLineStyle aLineStyle) Sets the line style used to paint objects.voidsetSelectionColor(Color aSelectionColor) Sets the color used to paint selected objects.voidsetupGraphics(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) Set upaGraphicsbefore painting aObject.
-
Constructor Details
-
TLcdMIFPenGXYPainterStyle
public TLcdMIFPenGXYPainterStyle()Constructs a pen painter style with the default selection color (red) for selected objects. -
TLcdMIFPenGXYPainterStyle
Constructs a pen painter style with the given selection color for selected objects.- Parameters:
aSelectionColor- the color to use to paint selected objects.
-
-
Method Details
-
setSelectionColor
Sets the color used to paint selected objects.- Parameters:
aSelectionColor- the color for selected objects.- See Also:
-
getSelectionColor
Returns the color used to paint selected objects.- Returns:
- the color used to paint selected objects.
- See Also:
-
setLineStyle
Sets the line style used to paint objects. This line style is typically the pen of the MIF object.- Parameters:
aLineStyle- the MIF pen style.- See Also:
-
getLineStyle
Returns the line style used to paint objects.- Returns:
- the line style used to paint 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:
-