com.sun.electric.database.hierarchy
Class Cell.CellGroup

java.lang.Object
  extended by com.sun.electric.database.hierarchy.Cell.CellGroup
Enclosing class:
Cell

public static class Cell.CellGroup
extends java.lang.Object

A CellGroup contains a list of cells that are related. This includes different Views of a cell (e.g. the schematic, layout, and icon Views), alternative icons, all the parts of a multi-part icon.


Method Summary
 void addParam(Variable param)
          Method to add a parameter on icons/schematics of this CellGroup.
 boolean containsCell(Cell cell)
          Method to tell whether this CellGroup contains a specified Cell.
 void delParam(Variable.AttrKey key)
          Method to delete a parameter from icons/scheamtics this CellGroup.
 boolean equals(java.lang.Object obj)
          Method to compare two CellGroups.
 java.util.Iterator<Cell> getCells()
          Method to return an Iterator over all the Cells that are in this CellGroup.
 java.util.List<Cell> getCellsSortedByView()
          Method to return a List of all cells in this Group, sorted by View.
 EDatabase getDatabase()
           
 Cell getMainSchematics()
          Method to return main schematics Cell in this CellGroup.
 java.lang.String getName()
          Returns a string representing the name of the cell group
 int getNumCells()
          Method to return the number of Cells that are in this CellGroup.
 Cell getParameterOwner()
          Method to return parameter owner Cell in this CellGroup.
 void renameParam(Variable.AttrKey key, Variable.AttrKey newName)
          Rename a parameter.
 java.lang.String toString()
          Returns a printable version of this CellGroup.
 void updateParam(Variable.AttrKey key, java.lang.Object value)
          Method to update a parameter on icons/schematics of this CellGroup with the specified values.
 void updateParamText(Variable.AttrKey key, java.lang.String text)
          Method to update a text parameter on icons/schematics of this ElectricObject with the specified values.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getCells

public java.util.Iterator<Cell> getCells()
Method to return an Iterator over all the Cells that are in this CellGroup.

Returns:
an Iterator over all the Cells that are in this CellGroup.

getNumCells

public int getNumCells()
Method to return the number of Cells that are in this CellGroup.

Returns:
the number of Cells that are in this CellGroup.

getCellsSortedByView

public java.util.List<Cell> getCellsSortedByView()
Method to return a List of all cells in this Group, sorted by View.

Returns:
a List of all cells in this Group, sorted by View.

getMainSchematics

public Cell getMainSchematics()
Method to return main schematics Cell in this CellGroup. The main schematic is the one that is shown when descending into an icon. Other schematic views may exist in the group, but they are "alternates".

Returns:
main schematics Cell in this CellGroup.

getParameterOwner

public Cell getParameterOwner()
Method to return parameter owner Cell in this CellGroup. The param owner Cell is icon or schematic Cell whose parameters are used as reference when reconcilating parameters of other icon/schematic Cells in the group. Param owner Cell is either main schematic Cell or first icon in alphanumeric order in CellGroups without schematic Cells

Returns:
parameter owner Cell in this CellGroup.

addParam

public void addParam(Variable param)
Method to add a parameter on icons/schematics of this CellGroup. It may add repaired copy of this Variable in some cases.

Parameters:
param - parameter to add.

delParam

public void delParam(Variable.AttrKey key)
Method to delete a parameter from icons/scheamtics this CellGroup.

Parameters:
key - the key of the parameter to delete.

renameParam

public void renameParam(Variable.AttrKey key,
                        Variable.AttrKey newName)
Rename a parameter. Note that this creates a new variable of the new name and copies all values from the old variable, and then deletes the old variable.

Parameters:
key - the name key of the parameter to rename
newName - the new name of the parameter

updateParam

public void updateParam(Variable.AttrKey key,
                        java.lang.Object value)
Method to update a parameter on icons/schematics of this CellGroup with the specified values. If the parameter already exists, only the value is changed; the displayable attributes are preserved.

Parameters:
key - the key of the parameter.
value - the object to store in the parameter.

updateParamText

public void updateParamText(Variable.AttrKey key,
                            java.lang.String text)
Method to update a text parameter on icons/schematics of this ElectricObject with the specified values. If the Parameter already exists, only the value is changed; the displayable attributes and Code are preserved.

Parameters:
key - the key of the parameter.
text - the text to store in the patameter.

containsCell

public boolean containsCell(Cell cell)
Method to tell whether this CellGroup contains a specified Cell.

Parameters:
cell - the Cell in question.
Returns:
true if the Cell is in this CellGroup.

toString

public java.lang.String toString()
Returns a printable version of this CellGroup.

Overrides:
toString in class java.lang.Object
Returns:
a printable version of this CellGroup.

equals

public boolean equals(java.lang.Object obj)
Method to compare two CellGroups. Because CellGroups seem to be ephemeral, and are created dynamically, it is not possible to compare them by equating the object. Therefore, this override compares the group names. Although not accurate, it is better than simple object equality.

Overrides:
equals in class java.lang.Object

getName

public java.lang.String getName()
Returns a string representing the name of the cell group


getDatabase

public EDatabase getDatabase()