|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.database.text.PrefPackage
public abstract class PrefPackage
Abstract class to define a package of appearence options. Subclass can define Java annotations on its fields, describing their persistence representation in Java Preferences.
Nested Class Summary | |
---|---|
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. |
Field Summary | |
---|---|
protected static java.lang.String |
TECH_NODE
|
protected static java.lang.String |
USER_NODE
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String TECH_NODE
protected static final java.lang.String USER_NODE
Constructor Detail |
---|
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.Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |