Package com.luciad.view.map
Class TLcdMapG2DLineStyle
java.lang.Object
com.luciad.view.map.TLcdMapG2DLineStyle
- All Implemented Interfaces:
ILcdCloneable
,ILcdGXYPainterStyle
,Serializable
,Cloneable
An ILcdGXYPainterStyle implementation that paints lines with a given thickness expressed in a given unit.
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdMapG2DLineStyle
(TLcdMapG2DLineStyle aGXYSimpleJ2DPainterStyle) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()
MakesObject.clone()
public.getColor()
Returns the color used to paint a line.double
Returns the width of the line expressed in the unit set.Returns the unit in which the line width is expressed.Returns the color to paint a line in selected mode.double
Returns the width of the line when painted in selected mode, expressed in the unit set.boolean
Returns whether to use anti aliasing when painting the line.void
setAntiAliasing
(boolean aAntiAliasing) Sets whether to use anti aliasing when painting the line.void
Sets the color to paint a line.void
setLineWidth
(double aLineWidth) Sets the width of the line expressed in the unit set.void
setLineWidthUnit
(TLcdDistanceUnit aLineWidthUnit) Sets the unit in which the line width is expressed.void
setSelectionColor
(Color aSelectionColor) Sets the color to paint a line in selected mode.void
setSelectionLineWidth
(double aSelectionLineWidth) Sets the width of the line when painted in selected mode, expressed in the unit set.void
setupGraphics
(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) Set upaGraphics
before painting aObject.
-
Constructor Details
-
TLcdMapG2DLineStyle
public TLcdMapG2DLineStyle() -
TLcdMapG2DLineStyle
Copy constructor.- Parameters:
aGXYSimpleJ2DPainterStyle
- the line style to copy the properties from.- See Also:
-
-
Method Details
-
getColor
Returns the color used to paint a line.- Returns:
- the color used to paint a line.
- See Also:
-
setColor
Sets the color to paint a line.- Parameters:
aColor
- the color to paint a line.- See Also:
-
getSelectionColor
Returns the color to paint a line in selected mode.- Returns:
- the color to paint a line in selected mode.
- See Also:
-
setSelectionColor
Sets the color to paint a line in selected mode.- Parameters:
aSelectionColor
- the color to paint a line in selected mode.- See Also:
-
getLineWidth
public double getLineWidth()Returns the width of the line expressed in the unit set.- Returns:
- the width of the line expressed in the unit set.
- See Also:
-
setLineWidth
public void setLineWidth(double aLineWidth) Sets the width of the line expressed in the unit set.- Parameters:
aLineWidth
- the width of the line expressed in the unit set.- See Also:
-
getSelectionLineWidth
public double getSelectionLineWidth()Returns the width of the line when painted in selected mode, expressed in the unit set.- Returns:
- the width of the line when painted in selected mode, expressed in the unit set.
- See Also:
-
setSelectionLineWidth
public void setSelectionLineWidth(double aSelectionLineWidth) Sets the width of the line when painted in selected mode, expressed in the unit set.- Parameters:
aSelectionLineWidth
- the width of the line when painted in selected mode, expressed in the unit set.- See Also:
-
isAntiAliasing
public boolean isAntiAliasing()Returns whether to use anti aliasing when painting the line.- Returns:
- whether to use anti aliasing when painting the line.
- See Also:
-
setAntiAliasing
public void setAntiAliasing(boolean aAntiAliasing) Sets whether to use anti aliasing when painting the line.- Parameters:
aAntiAliasing
- true to use anti aliasing when painting the line.- See Also:
-
getLineWidthUnit
Returns the unit in which the line width is expressed.- Returns:
- the unit in which the line width is expressed.
- See Also:
-
setLineWidthUnit
Sets the unit in which the line width is expressed.- Parameters:
aLineWidthUnit
- the unit in which the line width is expressed.- 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:
-