Package com.luciad.format.mif.gxy
Class TLcdMIFBrushGXYPainterStyle
java.lang.Object
com.luciad.format.mif.gxy.TLcdMIFBrushGXYPainterStyle
- All Implemented Interfaces:
ILcdCloneable,ILcdGXYPainterStyle,Serializable,Cloneable
public class TLcdMIFBrushGXYPainterStyle
extends Object
implements ILcdGXYPainterStyle, ILcdCloneable
This class implements an
ILcdGXYPainterStyle for filling MIF
objects, based on a given MIF brush style.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a style to fill MIF objects.TLcdMIFBrushGXYPainterStyle(Color aSelectionColor) Constructs a style to fill MIF objects. -
Method Summary
Modifier and TypeMethodDescriptionclone()MakesObject.clone()public.Returns the fill style used to fill MIF objects.Returns the color used to fill selected objects.voidsetFillStyle(TLcdFillStyle aFillStyle) Sets the fill style used to fill MIF objects.voidsetSelectionColor(Color aSelectionColor) Sets the color used to fill selected objects.voidsetupGraphics(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) Set upaGraphicsbefore painting aObject.
-
Constructor Details
-
TLcdMIFBrushGXYPainterStyle
public TLcdMIFBrushGXYPainterStyle()Constructs a style to fill MIF objects. For selected objects the default selection color (red) is used. -
TLcdMIFBrushGXYPainterStyle
Constructs a style to fill MIF objects. Selected objects are painted with the color passed.- Parameters:
aSelectionColor- the color to paint selected MIF objects with.
-
-
Method Details
-
setSelectionColor
Sets the color used to fill selected objects.- Parameters:
aSelectionColor- the color for selected objects.- See Also:
-
getSelectionColor
Returns the color used to fill selected objects.- Returns:
- the color used to fill selected objects.
- See Also:
-
setFillStyle
Sets the fill style used to fill MIF objects. This fill style is typically the brush of the MIF object.- Parameters:
aFillStyle- the MIF brush style.- See Also:
-
getFillStyle
Returns the fill style used to fill MIF objects.- Returns:
- the fill style used to fill MIF 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:
-