com.sun.electric.database.text
Class Setting.Group

java.lang.Object
  extended by com.sun.electric.database.text.Setting.Group
Direct Known Subclasses:
Setting.RootGroup
Enclosing class:
Setting

public static class Setting.Group
extends java.lang.Object

This class manages a group of Settings.


Field Summary
 java.lang.String xmlPath
           
 
Method Summary
 java.util.Map<Setting,java.lang.Object> getDiskSettings(java.util.Map<Setting,java.lang.Object> settingValues)
          Method to get a list of project preferences from this Group which should be written to disk libraries
 Setting getSetting(java.lang.String xmlPath)
          Returns Setting from this Group or a subgroup by its relative path
 java.util.Collection<Setting> getSettings()
          Returns all Settings from this Group and its subgroups
 java.lang.String getXmlPath()
          Dot-spearated path from the Root of the tree to this Group
 Setting makeBooleanSetting(java.lang.String prefName, java.lang.String prefGroup, java.lang.String xmlName, java.lang.String location, java.lang.String description, boolean factory)
          Factory methods to create a boolean project preferences objects.
 Setting makeDoubleSetting(java.lang.String prefName, java.lang.String prefGroup, java.lang.String xmlName, java.lang.String location, java.lang.String description, double factory)
          Factory methods to create a double project preferences objects.
 Setting makeIntSetting(java.lang.String prefName, java.lang.String prefGroup, java.lang.String xmlName, java.lang.String location, java.lang.String description, int factory, java.lang.String... trueMeaning)
          Factory methods to create an integer project preferences objects.
 Setting makeLongSetting(java.lang.String prefName, java.lang.String prefGroup, java.lang.String xmlName, java.lang.String location, java.lang.String description, long factory)
          Factory methods to create a long project preferences objects.
 Setting makeStringSetting(java.lang.String prefName, java.lang.String prefGroup, java.lang.String xmlName, java.lang.String location, java.lang.String description, java.lang.String factory)
          Factory methods to create a string project preferences objects.
 Setting.Group node(java.lang.String nodeName)
          Returns subnode with specified node name
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xmlPath

public final java.lang.String xmlPath
Method Detail

node

public Setting.Group node(java.lang.String nodeName)
Returns subnode with specified node name

Parameters:
nodeName - simple node name
Returns:
subnode with specified node name
Throws:
java.lang.IllegalStateException - if the Setting

getXmlPath

public java.lang.String getXmlPath()
Dot-spearated path from the Root of the tree to this Group

Returns:
path from the Root of the tree to this Group

makeBooleanSetting

public Setting makeBooleanSetting(java.lang.String prefName,
                                  java.lang.String prefGroup,
                                  java.lang.String xmlName,
                                  java.lang.String location,
                                  java.lang.String description,
                                  boolean factory)
Factory methods to create a boolean project preferences objects.

Parameters:
prefName - preference name of this Setting.
prefGroup - preference Group of this Setting.
xmlName - Xml name of this Setting.
location - the user-command that can affect this meaning option.
description - the description of this meaning option.
factory - the "factory" default value (if nothing is stored).

makeIntSetting

public Setting makeIntSetting(java.lang.String prefName,
                              java.lang.String prefGroup,
                              java.lang.String xmlName,
                              java.lang.String location,
                              java.lang.String description,
                              int factory,
                              java.lang.String... trueMeaning)
Factory methods to create an integer project preferences objects.

Parameters:
prefName - preference name of this Setting.
prefGroup - preference Group of this Setting.
xmlName - Xml name of this Setting.
location - the user-command that can affect this meaning option.
description - the description of this meaning option.
factory - the "factory" default value (if nothing is stored).

makeLongSetting

public Setting makeLongSetting(java.lang.String prefName,
                               java.lang.String prefGroup,
                               java.lang.String xmlName,
                               java.lang.String location,
                               java.lang.String description,
                               long factory)
Factory methods to create a long project preferences objects.

Parameters:
prefName - preference name of this Setting.
prefGroup - preference Group of this Setting.
xmlName - Xml name of this Setting.
location - the user-command that can affect this meaning option.
description - the description of this meaning option.
factory - the "factory" default value (if nothing is stored).

makeDoubleSetting

public Setting makeDoubleSetting(java.lang.String prefName,
                                 java.lang.String prefGroup,
                                 java.lang.String xmlName,
                                 java.lang.String location,
                                 java.lang.String description,
                                 double factory)
Factory methods to create a double project preferences objects.

Parameters:
prefName - preference name of this Setting.
prefGroup - preference Group of this Setting.
xmlName - Xml name of this Setting.
location - the user-command that can affect this meaning option.
description - the description of this meaning option.
factory - the "factory" default value (if nothing is stored).

makeStringSetting

public Setting makeStringSetting(java.lang.String prefName,
                                 java.lang.String prefGroup,
                                 java.lang.String xmlName,
                                 java.lang.String location,
                                 java.lang.String description,
                                 java.lang.String factory)
Factory methods to create a string project preferences objects.

Parameters:
prefName - preference name of this Setting.
prefGroup - preference Group of this Setting.
xmlName - Xml name of this Setting.
location - the user-command that can affect this meaning option.
description - the description of this meaning option.
factory - the "factory" default value (if nothing is stored).

getSetting

public Setting getSetting(java.lang.String xmlPath)
Returns Setting from this Group or a subgroup by its relative path

Parameters:
xmlPath - dot-separated relative path
Returns:
Setting by relative path or null

getSettings

public java.util.Collection<Setting> getSettings()
Returns all Settings from this Group and its subgroups

Returns:
all Settings from this Group and its subgroups

getDiskSettings

public java.util.Map<Setting,java.lang.Object> getDiskSettings(java.util.Map<Setting,java.lang.Object> settingValues)
Method to get a list of project preferences from this Group which should be written to disk libraries

Returns:
a collection of project preferences

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object