public abstract class PrefPackage
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
protected static interface |
PrefPackage.BooleanPref
Indicates that a field declaration is intended to keep value of a boolean option.
|
protected static interface |
PrefPackage.DoublePref
Indicates that a field declaration is intended to keep value of a double option.
|
protected static interface |
PrefPackage.IntegerPref
Indicates that a field declaration is intended to keep value of an integer option.
|
protected static interface |
PrefPackage.LongPref
Indicates that a field declaration is intended to keep value of a long option.
|
protected static interface |
PrefPackage.StringPref
Indicates that a field declaration is intended to keep value of a String option.
|
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
TECH_NODE |
protected static java.lang.String |
USER_NODE |
Modifier | Constructor and Description |
---|---|
protected |
PrefPackage(boolean factory)
Protected constuctor fills annotated option fields of the subclass from Preferences subtree.
|
protected |
PrefPackage(java.util.prefs.Preferences prefRoot)
Protected constuctor fills annotated option fields of the subclass from Preferences subtree.
|
Modifier and Type | Method and Description |
---|---|
static java.util.prefs.Preferences |
getFactoryPrefRoot()
Returns the root of dummy Preferences subtree with factory default Electric options.
|
protected java.lang.String |
getKey(java.lang.String what,
ArcProtoId apId) |
protected java.lang.String |
getKey(java.lang.String what,
LayerId layerId) |
protected java.lang.String |
getKey(java.lang.String what,
PrimitiveNodeId pnId) |
protected java.lang.String |
getKey(java.lang.String what,
TechId techId) |
static java.util.prefs.Preferences |
getPrefRoot()
Returns the root of Preferences subtree with Electric options.
|
void |
putPrefs(java.util.prefs.Preferences prefRoot,
boolean removeDefaults)
Store annotated option fields of the subclass into the speciefied Preferences subtree.
|
protected PrefPackage |
withField(java.lang.String fieldName,
java.lang.Object value) |
protected static final java.lang.String TECH_NODE
protected static final java.lang.String USER_NODE
protected PrefPackage(boolean factory)
Pref.getPrefRoot()
and Pref.getFactoryPrefRoot()
methods.factory
- use the Factory Pref rootprotected PrefPackage(java.util.prefs.Preferences prefRoot)
Pref.getPrefRoot()
and Pref.getFactoryPrefRoot()
methods.prefRoot
- the root of the Preferences subtree.protected PrefPackage withField(java.lang.String fieldName, java.lang.Object value)
public void putPrefs(java.util.prefs.Preferences prefRoot, boolean removeDefaults)
prefRoot
- the root of the Preferences subtree.removeDefaults
- remove from the Preferences subtree options which have factory default value.public static java.util.prefs.Preferences getPrefRoot()
public static java.util.prefs.Preferences getFactoryPrefRoot()
protected java.lang.String getKey(java.lang.String what, TechId techId)
protected java.lang.String getKey(java.lang.String what, LayerId layerId)
protected java.lang.String getKey(java.lang.String what, PrimitiveNodeId pnId)
protected java.lang.String getKey(java.lang.String what, ArcProtoId apId)