com.sun.electric.tool.user.ui
Class InvisibleLayerConfiguration

java.lang.Object
  extended by com.sun.electric.tool.user.ui.InvisibleLayerConfiguration

public class InvisibleLayerConfiguration
extends java.lang.Object

Class to manage saved collections of invisible layers. Each configuration has a name, a list of Layers, and an associated Technology (all Layers must be in the same Technology).


Method Summary
 void addConfiguration(java.lang.String cName, int hardWiredIndex, Technology tech, java.util.List<Layer> layers)
          Method to add a invisible layer configuration.
 void deleteConfiguration(java.lang.String cName)
          Method to delete an invisible layer configuration.
 boolean exists(java.lang.String cName)
          Method to tell whether a invisible layer configuration name exists.
 java.lang.String findHardWiredConfiguration(int index)
          Method to find the configuration that is hard-wired to a given index.
 int getConfigurationHardwiredIndex(java.lang.String cName)
          Method to get the "hard wired" index of this visibility configuration name.
 java.util.List<java.lang.String> getConfigurationNames()
          Method to return the names of all invisible layer configurations.
 Technology getConfigurationTechnology(java.lang.String cName)
          Method to get the Technology associated with a invisible layer configuration.
 java.util.Set<Layer> getConfigurationValue(java.lang.String cName)
          Method to return the invisible layers in an invisible layer configuration.
 java.lang.String getMenuName(int index)
           
static InvisibleLayerConfiguration getOnly()
          Method to return the singleton of this class.
 void renameConfiguration(java.lang.String cName, java.lang.String newName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMenuName

public java.lang.String getMenuName(int index)

getOnly

public static InvisibleLayerConfiguration getOnly()
Method to return the singleton of this class.

Returns:
the only instance of this class.

exists

public boolean exists(java.lang.String cName)
Method to tell whether a invisible layer configuration name exists.

Parameters:
cName - the name of the invisible layer configuration.
Returns:
true if there is a invisible layer configuration with that name.

addConfiguration

public void addConfiguration(java.lang.String cName,
                             int hardWiredIndex,
                             Technology tech,
                             java.util.List<Layer> layers)
Method to add a invisible layer configuration.

Parameters:
cName - the name of the new invisible layer configuration.
hardWiredIndex - the hard-wired value (from 0-9) for pre-bound configurations.
tech - the Technology in which these layers reside.
layers - the list of invisible layers in the configuration.

renameConfiguration

public void renameConfiguration(java.lang.String cName,
                                java.lang.String newName)

deleteConfiguration

public void deleteConfiguration(java.lang.String cName)
Method to delete an invisible layer configuration.

Parameters:
cName - the name of the invisible layer configuration to delete.

getConfigurationNames

public java.util.List<java.lang.String> getConfigurationNames()
Method to return the names of all invisible layer configurations.

Returns:
a List of invisible layer configuration names.

getConfigurationTechnology

public Technology getConfigurationTechnology(java.lang.String cName)
Method to get the Technology associated with a invisible layer configuration.

Parameters:
cName - the name of the invisible layer configuration.
Returns:
the Technology associated with that invisible layer configuration (may be null).

findHardWiredConfiguration

public java.lang.String findHardWiredConfiguration(int index)
Method to find the configuration that is hard-wired to a given index.

Parameters:
index - the index (from 0 to 9).
Returns:
the configuration bound to that index (null if none).

getConfigurationHardwiredIndex

public int getConfigurationHardwiredIndex(java.lang.String cName)
Method to get the "hard wired" index of this visibility configuration name. Some visibility configurations are hard-wired to the SHIFT-0 through SHIFT-9 keys, and these will return a value of 0 through 9.

Parameters:
cName - the name of the invisible layer configuration.
Returns:
the hard-wired index (-1 if none).

getConfigurationValue

public java.util.Set<Layer> getConfigurationValue(java.lang.String cName)
Method to return the invisible layers in an invisible layer configuration.

Parameters:
cName - the name of the invisible layer configuration.
Returns:
a Set of Layers (may be empty).