public class TLcyG2DLineStyle extends java.lang.Object implements ILcdGXYPainterStyle, ILcdPropertyChangeSource
Line style that offers color, selection color, line width, selection line width, antialiasing, line end and line join properties.
Modifier and Type | Field and Description |
---|---|
static int |
LINE_END_BUTT
End lines like if you were using a square pen and make sure the actual line length
equals the desired line length.
|
static int |
LINE_END_ROUND
End lines like if you were using a pen with a round tip.
|
static int |
LINE_END_SQUARE
End lines like if you were using a pen with a square tip.
|
static int |
LINE_JOIN_BEVEL
Joins lines like this
|
static int |
LINE_JOIN_MITER
Joins lines like this
|
static int |
LINE_JOIN_ROUND
Joins lines like if you were using a pen with a round tip.
|
Constructor and Description |
---|
TLcyG2DLineStyle() |
TLcyG2DLineStyle(TLcyG2DLineStyle aLineStyle) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener aListener)
Registers the given
PropertyChangeListener to be notified when this object's
properties change. |
java.lang.Object |
clone() |
java.awt.Color |
getColor() |
int |
getLineEnd() |
int |
getLineJoin() |
int |
getLineWidth() |
java.awt.Color |
getSelectionColor() |
int |
getSelectionLineWidth() |
boolean |
isAntiAliasing() |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener aListener)
De-registers the given
PropertyChangeListener from receiving property change events
for this object. |
void |
setAntiAliasing(boolean aAntiAliasing) |
void |
setColor(java.awt.Color aColor) |
void |
setLineEnd(int aLineEnd) |
void |
setLineJoin(int aLineJoin) |
void |
setLineWidth(int aLineWidth) |
void |
setSelectionColor(java.awt.Color aSelectionColor) |
void |
setSelectionLineWidth(int aSelectionLineWidth) |
void |
setupGraphics(java.awt.Graphics aGraphics,
java.lang.Object aObject,
int aMode,
ILcdGXYContext aGXYContext)
Set up
aGraphics before painting aObject. |
public static final int LINE_JOIN_MITER
/\
//\\
// \\
public static final int LINE_JOIN_ROUND
public static final int LINE_JOIN_BEVEL
__
//\\
// \\
public static final int LINE_END_BUTT
public static final int LINE_END_ROUND
public static final int LINE_END_SQUARE
public TLcyG2DLineStyle()
public TLcyG2DLineStyle(TLcyG2DLineStyle aLineStyle)
public void addPropertyChangeListener(java.beans.PropertyChangeListener aListener)
ILcdPropertyChangeSource
Registers the given PropertyChangeListener
to be notified when this object's
properties change.
In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source,
you can use a ALcdWeakPropertyChangeListener
instance as property change listener.
addPropertyChangeListener
in interface ILcdPropertyChangeSource
aListener
- The listener to be notifiedALcdWeakPropertyChangeListener
,
ILcdPropertyChangeSource.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener aListener)
ILcdPropertyChangeSource
De-registers the given PropertyChangeListener
from receiving property change events
for this object.
If the listener was added more than once, it will be notified one less time after being
removed.
If the listener is null
, or was never added, no exception is thrown and no action is taken.
removePropertyChangeListener
in interface ILcdPropertyChangeSource
aListener
- the listener that should no longer be notified of changes of
this object's propertiesILcdPropertyChangeSource.addPropertyChangeListener(java.beans.PropertyChangeListener)
public java.awt.Color getColor()
public void setColor(java.awt.Color aColor)
public java.awt.Color getSelectionColor()
public void setSelectionColor(java.awt.Color aSelectionColor)
public int getLineWidth()
public void setLineWidth(int aLineWidth)
public int getSelectionLineWidth()
public void setSelectionLineWidth(int aSelectionLineWidth)
public boolean isAntiAliasing()
public void setAntiAliasing(boolean aAntiAliasing)
public int getLineJoin()
public void setLineJoin(int aLineJoin)
public int getLineEnd()
public void setLineEnd(int aLineEnd)
public void setupGraphics(java.awt.Graphics aGraphics, java.lang.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 java.lang.Object clone()
clone
in class java.lang.Object