Package com.luciad.format.dgn.gxy
Class TLcdDGNGXYFillStyle
java.lang.Object
com.luciad.format.dgn.gxy.TLcdDGNGXYFillStyle
- All Implemented Interfaces:
ILcdCloneable,ILcdGXYPainterStyle,Serializable,Cloneable
This class implements an
ILcdGXYPainterStyle for filling DGN objects.
It sets a selectionColor before painting an Object in
ILcdGXYPainter.SELECTED mode, or the color specified by the
DGN object otherwise.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTLcdDGNGXYFillStyle(TLcdDGNColorTable aDGNColorTable) TLcdDGNGXYFillStyle(TLcdDGNColorTable aDGNColorTable, TLcdDGNLevelSymbology aDGNLevelSymbology) TLcdDGNGXYFillStyle(TLcdDGNColorTable aDGNColorTable, TLcdDGNLevelSymbology aDGNLevelSymbology, Color aSelectionColor) -
Method Summary
Modifier and TypeMethodDescriptionclone()MakesObject.clone()public.retrieveColor(ILcdDGNShape aDGNShape) Finds the correct DGN color index and returns the corresponding color from the DGN color table.intretrieveColorIndex(ILcdDGNShape aDGNShape) Deprecated.retrievePaint(ILcdDGNShape aDGNShape) Finds the correct pattern or color for filling the given DGN shape.voidsetDGNColorTable(TLcdDGNColorTable aDGNColorTable) voidsetDGNLevelSymbology(TLcdDGNLevelSymbology aDGNLevelSymbology) voidsetSelectionColor(Color aSelectionColor) voidsetupGraphics(Graphics aGraphics, Object aObject, int aMode, ILcdGXYContext aGXYContext) Set upaGraphicsbefore painting aObject.
-
Constructor Details
-
TLcdDGNGXYFillStyle
public TLcdDGNGXYFillStyle() -
TLcdDGNGXYFillStyle
-
TLcdDGNGXYFillStyle
public TLcdDGNGXYFillStyle(TLcdDGNColorTable aDGNColorTable, TLcdDGNLevelSymbology aDGNLevelSymbology) -
TLcdDGNGXYFillStyle
public TLcdDGNGXYFillStyle(TLcdDGNColorTable aDGNColorTable, TLcdDGNLevelSymbology aDGNLevelSymbology, Color aSelectionColor)
-
-
Method Details
-
setDGNColorTable
-
getDGNColorTable
-
setDGNLevelSymbology
-
getDGNLevelSymbology
-
setSelectionColor
-
getSelectionColor
-
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:
-
retrievePaint
Finds the correct pattern or color for filling the given DGN shape.- Returns:
- the Paint to be used for filling the given DGN element.
- See Also:
-
retrieveColor
Finds the correct DGN color index and returns the corresponding color from the DGN color table. Implementations may override this method to get a different behavior.- Returns:
- the Color to be used for filling the given DGN element.
- See Also:
-
retrieveColorIndex
Deprecated.this method does not take extended colors into account, useretrieveColor(com.luciad.format.dgn.ILcdDGNShape)instead- Returns:
- the DGN color index to be used for filling the given DGN element.
-
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:
-
retrieveColor(com.luciad.format.dgn.ILcdDGNShape)instead