public class TLcdDWGGXYFillStyle extends Object implements ILcdGXYPainterStyle, ILcdCloneable
ILcdGXYPainterStyle
for filling DWG objects.
It sets a selectionColor before painting an Object
in
ILcdGXYPainter.SELECTED
mode, or the color specified by the
DWG object otherwise.Constructor and Description |
---|
TLcdDWGGXYFillStyle(Color[] aColorTable) |
TLcdDWGGXYFillStyle(Color[] aColorTable,
Color aSelectionColor) |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes
Object.clone() public. |
Color[] |
getColorTable() |
Color |
getSelectionColor() |
Color |
retrieveColor(ILcdDWGShape aDWGShape)
Finds the correct DWG color index and returns the corresponding color from
the DWG color table.
|
int |
retrieveColorIndex(ILcdDWGShape aDWGShape) |
void |
setColorTable(Color[] aColorTable) |
void |
setSelectionColor(Color aSelectionColor) |
void |
setupGraphics(Graphics aGraphics,
Object aObject,
int aMode,
ILcdGXYContext aGXYContext)
Set up
aGraphics before painting aObject. |
public TLcdDWGGXYFillStyle(Color[] aColorTable)
public void setColorTable(Color[] aColorTable)
public Color[] getColorTable()
public void setSelectionColor(Color aSelectionColor)
public Color getSelectionColor()
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 Color retrieveColor(ILcdDWGShape aDWGShape)
retrieveColorIndex(ILcdDWGShape)
public int retrieveColorIndex(ILcdDWGShape aDWGShape)
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()