public class GraphicsPreferences extends PrefPackage
PrefPackage.BooleanPref, PrefPackage.DoublePref, PrefPackage.IntegerPref, PrefPackage.LongPref, PrefPackage.StringPref
Modifier and Type | Field and Description |
---|---|
java.lang.String |
defaultFont
The default font to use on the display.
|
int |
exportDisplayLevel
How to display exports.
|
static java.lang.String |
FACTORY_DEFAULT_FONT |
int |
portDisplayLevel
How to display ports.
|
static int |
RGB_MASK |
TECH_NODE, USER_NODE
Constructor and Description |
---|
GraphicsPreferences(boolean factory) |
GraphicsPreferences(boolean factory,
TechPool techPool) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.awt.Color |
getColor(User.ColorPrefType t)
Method to get the color of a given special layer type on the display.
|
java.awt.Color[] |
getColorMap(Technology tech)
Returns the color map for transparent layers in specified technology.
|
EGraphics |
getGraphics(Layer layer)
Method to return the graphics description of specified Layer.
|
protected java.lang.String |
getKeyIn(java.lang.String what,
LayerId layerId) |
int |
getNumTransparentLayers(Technology tech)
Returns the number of transparent layers in specified technology.
|
java.awt.Color[] |
getTransparentLayerColors(Technology tech)
Method to return the colors for the transparent layers in specified Technology.
|
int |
hashCode() |
boolean |
isTextVisibilityOn(AbstractTextDescriptor.TextType t)
Method to tell whether to draw text of particular text type.
|
void |
putPrefs(java.util.prefs.Preferences prefRoot,
boolean removeDefaults)
Store annotated option fields of the subclass into the speciefied Preferences subtree.
|
void |
putPrefs(java.util.prefs.Preferences prefRoot,
boolean removeDefaults,
GraphicsPreferences oldGp) |
GraphicsPreferences |
withColor(User.ColorPrefType t,
java.awt.Color color) |
GraphicsPreferences |
withDefaultFont(java.lang.String defaultFont) |
GraphicsPreferences |
withDisplayLevelReset() |
GraphicsPreferences |
withExportDisplayLevel(int exportDisplayLevel) |
GraphicsPreferences |
withFactoryColor(User.ColorPrefType t) |
GraphicsPreferences |
withGraphics(Layer layer,
EGraphics graphics) |
GraphicsPreferences |
withPortDisplayLevel(int portDisplayLevel) |
GraphicsPreferences |
withTextVisibilityOn(AbstractTextDescriptor.TextType t,
boolean b) |
GraphicsPreferences |
withTransparentLayerColor(Technology tech,
int transparentLayer,
java.awt.Color tranparentColor) |
GraphicsPreferences |
withTransparentLayerColors(Technology tech,
java.awt.Color[] tranparentColors) |
getFactoryPrefRoot, getKey, getKey, getKey, getKey, getPrefRoot, withField
public static final int RGB_MASK
public int portDisplayLevel
public int exportDisplayLevel
public java.lang.String defaultFont
public static final java.lang.String FACTORY_DEFAULT_FONT
public GraphicsPreferences(boolean factory)
public GraphicsPreferences(boolean factory, TechPool techPool)
public void putPrefs(java.util.prefs.Preferences prefRoot, boolean removeDefaults)
PrefPackage
putPrefs
in class PrefPackage
prefRoot
- the root of the Preferences subtree.removeDefaults
- remove from the Preferences subtree options which have factory default value.public void putPrefs(java.util.prefs.Preferences prefRoot, boolean removeDefaults, GraphicsPreferences oldGp)
public GraphicsPreferences withTransparentLayerColors(Technology tech, java.awt.Color[] tranparentColors)
public GraphicsPreferences withTransparentLayerColor(Technology tech, int transparentLayer, java.awt.Color tranparentColor)
public GraphicsPreferences withGraphics(Layer layer, EGraphics graphics)
public GraphicsPreferences withColor(User.ColorPrefType t, java.awt.Color color)
public GraphicsPreferences withFactoryColor(User.ColorPrefType t)
public GraphicsPreferences withTextVisibilityOn(AbstractTextDescriptor.TextType t, boolean b)
public GraphicsPreferences withPortDisplayLevel(int portDisplayLevel)
public GraphicsPreferences withExportDisplayLevel(int exportDisplayLevel)
public GraphicsPreferences withDisplayLevelReset()
public GraphicsPreferences withDefaultFont(java.lang.String defaultFont)
public int getNumTransparentLayers(Technology tech)
tech
- specified Technologypublic java.awt.Color[] getTransparentLayerColors(Technology tech)
tech
- specified Technoologypublic java.awt.Color[] getColorMap(Technology tech)
tech
- specified Technologypublic EGraphics getGraphics(Layer layer)
layer
- specified Layerpublic java.awt.Color getColor(User.ColorPrefType t)
t
- layer type in question.public boolean isTextVisibilityOn(AbstractTextDescriptor.TextType t)
t
- specified text type.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected java.lang.String getKeyIn(java.lang.String what, LayerId layerId)