|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.database.text.Pref
public class Pref
This class manages options. There are two types of options: appearance and meaning. Appearance options affect the way that the design is presented to the user. Examples are grid dot spacing, layer stipple patterns, etc. Meaning options affect the way that a design is produced (for fabrication, simulation, and other outputs). Examples are CIF layer names, technology options, etc.)
All options are saved in a machine-specific way by the Java Preferences class. In addition, "meaning" options are stored in libraries. When the libraries are read back into Electric, the stored meaning options are checked against the current meaning options, the two are reconciled.
Where are these options stored? It varies with each operating system.
Nested Class Summary | |
---|---|
static class |
Pref.Group
|
static class |
Pref.PrefChangeBatch
|
static class |
Pref.PrefType
|
Constructor Summary | |
---|---|
protected |
Pref(Pref.Group group,
java.lang.String name)
The constructor for the Pref. |
protected |
Pref(java.util.prefs.Preferences prefs,
java.lang.String name)
The constructor for the Pref. |
Method Summary | |
---|---|
static void |
delayPrefFlushing()
Method to delay the saving of preferences to disk. |
static void |
exportPrefs(java.lang.String fileName)
Method to export the preferences to an XML file. |
static void |
gatherPrefChanges()
Method to start accumulation of Pref changes. |
boolean |
getBoolean()
Method to get the boolean value on this Pref object. |
boolean |
getBooleanFactoryValue()
Method to get the factory-default boolean value of this Pref object. |
double |
getDouble()
Method to get the double value on this Pref object. |
double |
getDoubleFactoryValue()
Method to get the factory-default double value of this Pref object. |
java.lang.Object |
getFactoryValue()
Method to get the factory-default value of this Pref object. |
int |
getInt()
Method to get the integer value on this Pref object. |
int |
getIntFactoryValue()
Method to get the factory-default integer value of this Pref object. |
long |
getLong()
Method to get the long value on this Pref object. |
long |
getLongFactoryValue()
Method to get the factory-default long value of this Pref object. |
static Pref.PrefChangeBatch |
getPrefChanges()
Method to get the accumulated Pref changes. |
java.lang.String |
getPrefName()
Method to get the name of this Pref object. |
java.lang.String |
getString()
Method to get the string value on this Pref object. |
java.lang.String |
getStringFactoryValue()
Method to get the factory-default String value of this Pref object. |
Pref.PrefType |
getType()
Method to get the type of this Pref object. |
java.lang.Object |
getValue()
Method to get the value of this Pref object as an Object. |
static Pref.Group |
groupForPackage(java.lang.Class classFromPackage)
|
static void |
implementPrefChanges(Pref.PrefChangeBatch obj)
Method to make a collection of preference changes. |
static void |
importPrefs(java.lang.String fileName)
Method used in regressions so it has to be public. |
static void |
importPrefs(java.net.URL fileURL)
|
protected void |
initBoolean(boolean factory)
Factory methods to create a boolean Pref objects. |
protected void |
initDouble(double factory)
Factory methods to create a double Pref objects. |
protected void |
initInt(int factory)
Factory methods to create an integer Pref objects. |
protected void |
initLong(long factory)
Factory methods to create a long Pref objects. |
protected void |
initString(java.lang.String factory)
Factory methods to create a string Pref objects. |
static Pref |
makeBooleanPref(java.lang.String name,
Pref.Group group,
boolean factory)
Factory methods to create a boolean Pref objects. |
static Pref |
makeDoublePref(java.lang.String name,
Pref.Group group,
double factory)
Factory methods to create a double Pref objects. |
static Pref |
makeIntPref(java.lang.String name,
Pref.Group group,
int factory)
Factory methods to create an integer Pref objects. |
static Pref |
makeLongPref(java.lang.String name,
Pref.Group group,
long factory)
Factory methods to create a long Pref objects. |
static Pref |
makeStringPref(java.lang.String name,
Pref.Group group,
java.lang.String factory)
Factory methods to create a string Pref objects. |
static Pref |
makeStringPref(java.lang.String name,
java.util.prefs.Preferences prefs,
java.lang.String factory)
|
static void |
printAllPrefs(java.io.PrintStream out)
|
static void |
resumePrefFlushing()
Method to resume the saving of preferences to disk. |
void |
setBoolean(boolean v)
Method to set a new boolean value on this Pref object. |
boolean |
setDouble(double v)
Method to set a new double value on this Pref object. |
void |
setInt(int v)
Method to set a new integer value on this Pref object. |
void |
setLong(long v)
Method to set a new long value on this Pref object. |
void |
setString(java.lang.String str)
Method to set a new string value on this Pref object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Pref(java.util.prefs.Preferences prefs, java.lang.String name)
name
- the name of this Pref.protected Pref(Pref.Group group, java.lang.String name)
name
- the name of this Pref.Method Detail |
---|
public static Pref.Group groupForPackage(java.lang.Class classFromPackage)
public static void importPrefs(java.lang.String fileName)
fileName
- public static void importPrefs(java.net.URL fileURL)
public static void exportPrefs(java.lang.String fileName)
fileName
- the file to write.protected void initBoolean(boolean factory)
factory
- the "factory" default value (if nothing is stored).public static Pref makeBooleanPref(java.lang.String name, Pref.Group group, boolean factory)
name
- the name of this Pref.group
- group of preferences to which a new Pref belongsfactory
- the "factory" default value (if nothing is stored).protected void initInt(int factory)
factory
- the "factory" default value (if nothing is stored).public static Pref makeIntPref(java.lang.String name, Pref.Group group, int factory)
name
- the name of this Pref.group
- group of preferences to which a new Pref belongsfactory
- the "factory" default value (if nothing is stored).protected void initLong(long factory)
factory
- the "factory" default value (if nothing is stored).public static Pref makeLongPref(java.lang.String name, Pref.Group group, long factory)
name
- the name of this Pref.group
- group of preferences to which a new Pref belongsfactory
- the "factory" default value (if nothing is stored).protected void initDouble(double factory)
factory
- the "factory" default value (if nothing is stored).public static Pref makeDoublePref(java.lang.String name, Pref.Group group, double factory)
name
- the name of this Pref.group
- group of preferences to which a new Pref belongsfactory
- the "factory" default value (if nothing is stored).protected void initString(java.lang.String factory)
factory
- the "factory" default value (if nothing is stored).public static Pref makeStringPref(java.lang.String name, Pref.Group group, java.lang.String factory)
name
- the name of this Pref.group
- group of preferences to which a new Pref belongsfactory
- the "factory" default value (if nothing is stored).public static Pref makeStringPref(java.lang.String name, java.util.prefs.Preferences prefs, java.lang.String factory)
public boolean getBoolean()
public int getInt()
public long getLong()
public double getDouble()
public java.lang.String getString()
public java.lang.Object getFactoryValue()
public boolean getBooleanFactoryValue()
public int getIntFactoryValue()
public long getLongFactoryValue()
public double getDoubleFactoryValue()
public java.lang.String getStringFactoryValue()
public java.lang.String getPrefName()
public java.lang.Object getValue()
public Pref.PrefType getType()
public static void gatherPrefChanges()
public static Pref.PrefChangeBatch getPrefChanges()
public static void implementPrefChanges(Pref.PrefChangeBatch obj)
obj
- the collection of preference changes.public static void delayPrefFlushing()
public static void resumePrefFlushing()
public void setBoolean(boolean v)
v
- the new boolean value of this Pref object.public void setInt(int v)
v
- the new integer value of this Pref object.public void setLong(long v)
v
- the new long value of this Pref object.public boolean setDouble(double v)
v
- the new double value of this Pref object.
public void setString(java.lang.String str)
str
- the new string value of this Pref object.public static void printAllPrefs(java.io.PrintStream out)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |