public class TLcdMapG2DLineStyle extends Object implements ILcdGXYPainterStyle, ILcdCloneable
Constructor and Description |
---|
TLcdMapG2DLineStyle() |
TLcdMapG2DLineStyle(TLcdMapG2DLineStyle aGXYSimpleJ2DPainterStyle)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes
Object.clone() public. |
Color |
getColor()
Returns the color used to paint a line.
|
double |
getLineWidth()
Returns the width of the line expressed in the unit set.
|
TLcdDistanceUnit |
getLineWidthUnit()
Returns the unit in which the line width is expressed.
|
Color |
getSelectionColor()
Returns the color to paint a line in selected mode.
|
double |
getSelectionLineWidth()
Returns the width of the line when painted in selected mode, expressed in the unit set.
|
boolean |
isAntiAliasing()
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 |
setColor(Color aColor)
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 up
aGraphics before painting aObject. |
public TLcdMapG2DLineStyle()
public TLcdMapG2DLineStyle(TLcdMapG2DLineStyle aGXYSimpleJ2DPainterStyle)
aGXYSimpleJ2DPainterStyle
- the line style to copy the properties from.setColor(java.awt.Color)
,
setSelectionColor(java.awt.Color)
,
setAntiAliasing(boolean)
,
setLineWidth(double)
,
setLineWidthUnit(com.luciad.util.TLcdDistanceUnit)
,
setSelectionLineWidth(double)
public Color getColor()
setColor(java.awt.Color)
public void setColor(Color aColor)
aColor
- the color to paint a line.getColor()
public Color getSelectionColor()
setSelectionColor(java.awt.Color)
public void setSelectionColor(Color aSelectionColor)
aSelectionColor
- the color to paint a line in selected mode.getSelectionColor()
public double getLineWidth()
getLineWidthUnit()
,
setLineWidth(double)
public void setLineWidth(double aLineWidth)
aLineWidth
- the width of the line expressed in the unit set.setLineWidthUnit(com.luciad.util.TLcdDistanceUnit)
,
getLineWidth()
public double getSelectionLineWidth()
setSelectionLineWidth(double)
,
getLineWidthUnit()
public void setSelectionLineWidth(double aSelectionLineWidth)
aSelectionLineWidth
- the width of the line when painted in selected mode, expressed in the unit set.getSelectionLineWidth()
,
setLineWidthUnit(com.luciad.util.TLcdDistanceUnit)
public boolean isAntiAliasing()
setAntiAliasing(boolean)
public void setAntiAliasing(boolean aAntiAliasing)
aAntiAliasing
- true to use anti aliasing when painting the line.isAntiAliasing()
public TLcdDistanceUnit getLineWidthUnit()
setLineWidthUnit(com.luciad.util.TLcdDistanceUnit)
public void setLineWidthUnit(TLcdDistanceUnit aLineWidthUnit)
aLineWidthUnit
- the unit in which the line width is expressed.getLineWidthUnit()
public void setupGraphics(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext)
ILcdGXYPainterStyle
aGraphics
before painting aObject.
For example, if (aMode & ILcdGXYPainter.SELECTED) != 0
, you may want to
call aGraphics.setColor(Color.red)
for instance, to see the selected
representation of a aObject in red.setupGraphics
in interface ILcdGXYPainterStyle
aGraphics
- the Graphics
to set up.aObject
- the Object
to paint.aMode
- the painting mode to consider (defined in
ILcdGXYPainter
).aGXYContext
- the ILcdGXYContext
to consider.ILcdGXYPainter
public Object clone()
ILcdCloneable
Makes Object.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 );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()