public class TLcdDGNLevelSymbology extends Object implements Serializable
Whether or not the table is overriding the element values is specified by the
three respective boolean properties (cfr. hasStyle()
,
hasWeight()
, and hasColor()
).
If the element values are overridden, they can be requested for each level
(cfr. getStyle(int)
, getWeight(int)
,
and getColor(int)
).
Note that each DGN level has in fact two sets of symbologies:
Note: for convenience, you can use the getColor(TLcdDGNDisplayInfo), getStyle(TLcdDGNDisplayInfo) and getWeight(TLcdDGNDisplayInfo) methods to retrieve the styling for an element according to the rules above.
Modifier and Type | Field and Description |
---|---|
static int |
COLOR_MASK |
static int |
COLOR_SHIFT |
static int |
STYLE_MASK |
static int |
WEIGHT_MASK |
static int |
WEIGHT_SHIFT |
Constructor and Description |
---|
TLcdDGNLevelSymbology(boolean aUseColor,
boolean aUseWeight,
boolean aUseStyle,
int[] aSymbologies)
Creates a new TLcdDGNLevelSymbology.
|
TLcdDGNLevelSymbology(boolean aUseColor,
boolean aUseWeight,
boolean aUseStyle,
int[] aSymbologies,
String[] aNames,
String[] aDescriptions)
Creates a new TLcdDGNLevelSymbology.
|
TLcdDGNLevelSymbology(TLcdDGNLevel[] aLevels)
Deprecated.
You should not create a level symbology yourself, the decoder will create it for you.
|
Modifier and Type | Method and Description |
---|---|
int |
getColor(int aLevelIndex)
Returns the symbology override color of elements at the specified level.
|
int |
getColor(TLcdDGNDisplayInfo aDisplayInfo)
Deprecated.
|
Color |
getColor(TLcdDGNDisplayInfo aDisplayInfo,
TLcdDGNColorTable aColorTable)
Deprecated.
|
Color |
getColor(TLcdDGNDisplayInfo aDisplayInfo,
TLcdDGNColorTable aColorTable,
Color aBackgroundColor)
Retrieve the color for a particular element
based on the styling priorities defined by MicroStation.
|
String |
getDescription(int aLevelIndex)
Returns the description of the specified level.
|
int |
getElementColor(int aLevelIndex)
Deprecated.
This call does not take RGB colors into account. Use
getElementColor(int, TLcdDGNColorTable) instead. |
Color |
getElementColor(int aLevelIndex,
TLcdDGNColorTable aColorTable)
Returns the element color of the elements on the given level, which is used to display the
elements that have the 'bylevel' color value.
|
int |
getElementStyle(int aLevelIndex)
This implementation returns the same value as getStyle()
|
int |
getElementWeight(int aLevelIndex)
This implementation returns the same value as getElementWeight()
|
int |
getFillColor(int aLevelIndex)
Returns the symbology fill color of elements at the specified level.
|
int |
getFillColor(TLcdDGNDisplayInfo aDisplayInfo)
Deprecated.
|
Color |
getFillColor(TLcdDGNDisplayInfo aDisplayInfo,
TLcdDGNColorTable aColorTable)
Deprecated.
|
Color |
getFillColor(TLcdDGNDisplayInfo aDisplayInfo,
TLcdDGNColorTable aColorTable,
Color aBackgroundColor)
Retrieve the fill color for a particular element
based on the styling priorities defined by MicroStation.
|
int |
getLevel(int aLevelID)
Deprecated.
Use (@link #getLevelIndex(int)}.
|
int |
getLevelCount()
Returns the number of defined levels.
|
int |
getLevelID(int aLevelIndex)
Returns the level ID, based on the level index.
|
int |
getLevelIndex(int aLevelID)
Returns the level index, based on the level ID, which is stored with
DGN elements.
|
int |
getLevelNumber(int aLevelIndex)
Returns the level number of the specified level.
|
String |
getName(int aLevelIndex)
Returns the name of the specified level.
|
int |
getStyle(int aLevelIndex)
Returns the symbology override style of elements at the specified level.
|
int |
getStyle(TLcdDGNDisplayInfo aDisplayInfo)
Retrieve the style for a particular element
based on the styling priorities defined by MicroStation.
|
String |
getStyleName(int aStyle)
Returns the line style name associated with the given line style ID.
|
String |
getStyleName(TLcdDGNDisplayInfo aDisplayInfo)
Returns the line style name associated with the style for the given element.
|
int |
getWeight(int aLevelIndex)
Returns the symbology override weight of elements at the specified level.
|
int |
getWeight(TLcdDGNDisplayInfo aDisplayInfo)
Retrieve the line weight for a particular element
based on the styling priorities defined by MicroStation.
|
boolean |
hasColor()
Deprecated.
Use
for compatibility with
DGN V8 files. |
boolean |
hasColor(int aLevelIndex)
Returns whether the symbology override color should be used.
|
boolean |
hasFillColor(int aLevelIndex)
Returns whether the symbology override fill color should be used.
|
boolean |
hasStyle()
Deprecated.
Use
for compatibility with
DGN V8 files. |
boolean |
hasStyle(int aLevelIndex)
Returns whether the symbology override style should be used.
|
boolean |
hasWeight()
Deprecated.
Use
for compatibility with
DGN V8 files. |
boolean |
hasWeight(int aLevelIndex)
Returns whether the symbology override weight should be used.
|
boolean |
isUseViewLevelSymbology()
Indicates whether the view level overrides should be used for styling.
|
void |
setUseViewLevelSymbology(boolean aUseLevelSymbology)
Set whether the view level overrides should be used for styling.
|
public static final int STYLE_MASK
public static final int WEIGHT_MASK
public static final int COLOR_MASK
public static final int WEIGHT_SHIFT
public static final int COLOR_SHIFT
public TLcdDGNLevelSymbology(boolean aUseColor, boolean aUseWeight, boolean aUseStyle, int[] aSymbologies)
aUseColor
- specifies whether the symbology colors should be used.aUseWeight
- specifies whether the symbology weights should be used.aUseStyle
- specifies whether the symbology styles should be used.aSymbologies
- the level symbologies.public TLcdDGNLevelSymbology(boolean aUseColor, boolean aUseWeight, boolean aUseStyle, int[] aSymbologies, String[] aNames, String[] aDescriptions)
aUseColor
- specifies whether the symbology colors should be used.aUseWeight
- specifies whether the symbology weights should be used.aUseStyle
- specifies whether the symbology styles should be used.aSymbologies
- the level symbologies.aNames
- the level names.aDescriptions
- the level descriptions.public TLcdDGNLevelSymbology(TLcdDGNLevel[] aLevels)
aLevels
- the level objects that make up the symbology.public boolean hasColor()
hasColor(int)
for compatibility with
DGN V8 files.public boolean hasWeight()
hasWeight(int)
for compatibility with
DGN V8 files.public boolean hasStyle()
hasStyle(int)
for compatibility with
DGN V8 files.public int getLevelCount()
public int getLevelID(int aLevelIndex)
aLevelIndex
- the level index.public int getLevelNumber(int aLevelIndex)
aLevelIndex
- the level index.public int getLevelIndex(int aLevelID)
aLevelID
- the level ID.public int getLevel(int aLevelID)
public String getName(int aLevelIndex)
aLevelIndex
- the level index.public String getDescription(int aLevelIndex)
aLevelIndex
- the level index.public boolean hasColor(int aLevelIndex)
aLevelIndex
- the level index.public boolean hasWeight(int aLevelIndex)
aLevelIndex
- the level index.public boolean hasStyle(int aLevelIndex)
aLevelIndex
- the level index.public boolean hasFillColor(int aLevelIndex)
aLevelIndex
- the level index.public int getColor(int aLevelIndex)
aLevelIndex
- the level index.public int getWeight(int aLevelIndex)
aLevelIndex
- the level index.public int getStyle(int aLevelIndex)
aLevelIndex
- the level index.public int getFillColor(int aLevelIndex)
aLevelIndex
- the level index.public boolean isUseViewLevelSymbology()
By default, this is the ViewLevelSymbology
flag of the model descriptor. You can override
this.
See getColor(TLcdDGNDisplayInfo, TLcdDGNColorTable)
for styling resolution priorities.
public void setUseViewLevelSymbology(boolean aUseLevelSymbology)
aUseLevelSymbology
- the desired settingisUseViewLevelSymbology()
public int getElementColor(int aLevelIndex)
getElementColor(int, TLcdDGNColorTable)
instead.aLevelIndex
- public Color getElementColor(int aLevelIndex, TLcdDGNColorTable aColorTable)
aLevelIndex
- The level indexaColorTable
- The color table to usepublic int getElementWeight(int aLevelIndex)
aLevelIndex
- public int getElementStyle(int aLevelIndex)
aLevelIndex
- public int getColor(TLcdDGNDisplayInfo aDisplayInfo)
getColor(TLcdDGNDisplayInfo, TLcdDGNColorTable, Color)
insteadRetrieve the color index for a particular element based on the styling priorities defined by MicroStation.
This call does not take "extended" RGB colors into account. Use getColor(TLcdDGNDisplayInfo, TLcdDGNColorTable)
instead.
See getColor(TLcdDGNDisplayInfo, TLcdDGNColorTable) for priority rules.
aDisplayInfo
- Display info associated with the elementTLcdDGNColorTable
,
TLcdDGNLevelSymbology
public Color getColor(TLcdDGNDisplayInfo aDisplayInfo, TLcdDGNColorTable aColorTable)
getColor(TLcdDGNDisplayInfo, TLcdDGNColorTable, java.awt.Color)
insteadRetrieve the color for a particular element based on the styling priorities defined by MicroStation.
aDisplayInfo
- Display info associated with the elementTLcdDGNColorTable
,
TLcdDGNLevelSymbology
public Color getColor(TLcdDGNDisplayInfo aDisplayInfo, TLcdDGNColorTable aColorTable, Color aBackgroundColor)
Retrieve the color for a particular element based on the styling priorities defined by MicroStation.
aDisplayInfo
- Display info associated with the elementaColorTable
- The color table to use (see TLcdDGNModelDescriptor.getDGNColorTable()
)aBackgroundColor
- The view's background colorTLcdDGNColorTable
,
TLcdDGNLevelSymbology
public int getStyle(TLcdDGNDisplayInfo aDisplayInfo)
Retrieve the style for a particular element based on the styling priorities defined by MicroStation.
A line style can either be:
getStyleName(com.luciad.format.dgn.TLcdDGNDisplayInfo)
Possible basic line styles:
See getColor(TLcdDGNDisplayInfo, TLcdDGNColorTable) for priority rules.
aDisplayInfo
- Display info associated with the elementpublic String getStyleName(TLcdDGNDisplayInfo aDisplayInfo)
aDisplayInfo
- Display info associated with the elementnull
if unknownpublic String getStyleName(int aStyle)
aStyle
- A line style IDnull
if unknownpublic int getWeight(TLcdDGNDisplayInfo aDisplayInfo)
Retrieve the line weight for a particular element based on the styling priorities defined by MicroStation.
The returned weight is between 0 and 31 and can be interpreted as pixels.
See getColor(TLcdDGNDisplayInfo, TLcdDGNColorTable) for priority rules.
aDisplayInfo
- Display info associated with the elementpublic int getFillColor(TLcdDGNDisplayInfo aDisplayInfo)
getFillColor(TLcdDGNDisplayInfo, TLcdDGNColorTable, Color)
insteadRetrieve the fill color for a particular element based on the styling priorities defined by MicroStation.
Note: this function does not take fill style (hole vs. solid) into account, see TLcdDGNDisplayInfo.isHole() and TLcdDGNDisplayInfo.isFilled().
See getColor(TLcdDGNDisplayInfo, TLcdDGNColorTable, Color) for priority rules.
aDisplayInfo
- Display info associated with the elementTLcdDGNColorTable
,
TLcdDGNLevelSymbology
public Color getFillColor(TLcdDGNDisplayInfo aDisplayInfo, TLcdDGNColorTable aColorTable)
getFillColor(TLcdDGNDisplayInfo, TLcdDGNColorTable, java.awt.Color)
insteadRetrieve the fill color for a particular element based on the styling priorities defined by MicroStation.
Note: this function does not take fill style (hole vs. solid) into account, see TLcdDGNDisplayInfo.isHole() and TLcdDGNDisplayInfo.isFilled().
See getColor(TLcdDGNDisplayInfo) for priority rules
aDisplayInfo
- Display info associated with the elementTLcdDGNColorTable
,
TLcdDGNLevelSymbology
public Color getFillColor(TLcdDGNDisplayInfo aDisplayInfo, TLcdDGNColorTable aColorTable, Color aBackgroundColor)
Retrieve the fill color for a particular element based on the styling priorities defined by MicroStation.
Note: this function does not take fill style (hole vs. solid) into account, see TLcdDGNDisplayInfo.isHole() and TLcdDGNDisplayInfo.isFilled().
See getColor(TLcdDGNDisplayInfo) for priority rules
aDisplayInfo
- Display info associated with the elementaColorTable
- The color table to use (see TLcdDGNModelDescriptor.getDGNColorTable()
)aBackgroundColor
- The view's background colorTLcdDGNColorTable
,
TLcdDGNLevelSymbology