com.sun.electric.database.hierarchy
Class Cell

java.lang.Object
  extended by com.sun.electric.database.variable.ElectricObject
      extended by com.sun.electric.database.hierarchy.Cell
All Implemented Interfaces:
NodeProto, java.io.Serializable, java.lang.Comparable<Cell>

public class Cell
extends ElectricObject
implements NodeProto, java.lang.Comparable<Cell>

A Cell is a non-primitive NodeProto. Besides the information that it inherits from NodeProto, the Cell holds a set of nodes, arcs, and networks. The exported ports on NodeInsts inside of this cell become the Exports of this Cell. A Cell also has a specific view and version number.

It is possible to get all of the versions of the cell. A Cell knows about the most recent version of itself, which may be itself.

Cells also belong to CellGroup objects, which gather related cells together.

A Cell can have different views and versions, each of which is a cell. The library shown here has two cells (?gate? and ?twogate?), each of which has many views (layout, schematics, icon, vhdl) and versions:

See Also:
Serialized Form

Nested Class Summary
static class Cell.CellGroup
          A CellGroup contains a list of cells that are related.
static class Cell.FrameDescription
          Class for creating a description of a frame around a schematic cell.
 
Field Summary
static Variable.Key CELL_TEXT_KEY
          Variable key for text cell contents.
static Variable.Key CHARACTERISTIC_SPACING
          Variable key for characteristic spacing for a cell.
static int INCELLLIBRARY
          set if cell is part of a "cell library"
static Variable.Key MULTIPAGE_COUNT_KEY
          Variable key for number of multipage pages.
static int NPILOCKED
          set if instances in cell are locked
static int NPLOCKED
          set if everything in cell is locked
static int TECEDITCELL
          set if cell is from a technology-library
static Variable.Key TEXT_CELL_FONT_NAME
          Variable key for font of text in textual cells.
static Variable.Key TEXT_CELL_FONT_SIZE
          Variable key for size of text in textual cells.
static int WANTNEXPAND
          set if instances should be expanded
 
Method Summary
 Netlist acquireUserNetlist()
          Returns the Netlist structure for this Cell, using current network options.
 boolean addNode(NodeInst ni)
          Method to add a new NodeInst to the cell.
 void addNodeName(NodeInst ni)
          Method to add a new NodeInst to the name index of this cell.
 void addVar(Variable var)
          Method to add a Variable on this Cell.
 void adjustReferencePoint(double cX, double cY)
          Method adjust this cell when the reference point moves.
 boolean alreadyCellCenter()
          Method to determine whether this Cell has a cell center in it.
 CellBackup backup()
           
 CellBackup backupUnsafe()
           
 boolean busNamesAllowed()
          Method to return true if bus names are allowed in this Cell
protected  void check()
          Method to check invariants in this Cell.
 int checkAndRepair(boolean repair, ErrorLogger errorLogger)
          Method to check and repair data structure errors in this Cell.
 void checkCellDates()
          Method to check the current cell to be sure that no subcells have a more recent date.
 void clearAllLocked()
          Method to set this Cell so that everything inside of it is not locked.
 void clearInstancesLocked()
          Method to set this Cell so that all instances inside of it are not locked.
 void clearInTechnologyLibrary()
          Method to set this Cell so that it is not part of a technology library.
 void clearWantExpanded()
          Method to set this Cell so that instances of it are "not expanded" by when created.
 boolean compare(java.lang.Object obj, java.lang.StringBuffer buffer)
          Use to compare cells in Cross Library Check
 int compareTo(Cell that)
          Compares Cells by their Libraries and CellNames.
 Cell contentsView()
          Method to find the contents Cell associated with this Cell.
static Cell copyNodeProto(Cell fromCell, Library toLib, java.lang.String toName, boolean useExisting)
          Method to copy a Cell to any Library.
static Cell copyNodeProto(Cell fromCell, Library toLib, java.lang.String toName, boolean useExisting, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> cellNamesToUse)
          Method to copy a Cell to any Library.
static Cell copyNodeProtoUsingMapping(Cell fromCell, Library toLib, java.lang.String toName, java.util.Map<NodeInst,NodeProto> nodePrototypes)
          Method to copy a Cell to any Library, using a preset mapping of node prototypes.
 void delVar(Variable.Key key)
          Method to delete a Variable from this Cell.
 java.lang.String describe(boolean withQuotes)
          Method to describe this cell.
 ArcInst findArc(java.lang.String name)
          Method to find a named ArcInst on this Cell.
 java.awt.geom.Rectangle2D findEssentialBounds()
          Method to compute the "essential bounds" of this Cell.
 Export findExport(Name name)
          Method to find a named Export on this Cell.
 Export findExport(java.lang.String name)
          Method to find a named Export on this Cell.
 NodeInst findNode(java.lang.String name)
          Method to find a named NodeInst on this Cell.
static NodeProto findNodeProto(java.lang.String line)
          Method to find the NodeProto with the given name.
 PortProto findPortProto(Name name)
          Method to find the PortProto that has a particular Name.
 PortProto findPortProto(java.lang.String name)
          Method to find the PortProto that has a particular name.
 boolean findReferenceInCell(Library elib, java.util.Set<Cell> set)
          Method to fill a set with any nodes in this Cell that refer to an external library.
 Poly[] getAllText(boolean hardToSelect, EditWindow0 wnd)
          Method to return a list of Polys that describes all text on this Cell.
 ArcInst getArc(int arcIndex)
          Method to return the ArcInst at specified position.
 ArcInst getArcById(int arcId)
          Method to return the ArcInst by its chronological index.
 java.util.Iterator<ArcInst> getArcs()
          Method to return an Iterator over all ArcInst objects in this Cell.
 Name getBasename()
          Method to return the basename for autonaming instances of this Cell.
 ERectangle getBounds()
          Method to return the bounds of this Cell.
 Cell.CellGroup getCellGroup()
          Method to get the CellGroup that this Cell is part of.
 int getCellIndex()
          Method to get the 0-based index of this Cell.
 CellName getCellName()
          Method to return the CellName object describing this Cell.
 java.util.Date getCreationDate()
          Method to get the creation date of this Cell.
 ImmutableCell getD()
          Returns persistent data of this Cell.
 EDatabase getDatabase()
          Returns database to which this Cell belongs.
 double getDefHeight()
          Method to the height of this Cell.
 double getDefWidth()
          Method to get the width of this Cell.
 Cell getEquivalent()
          Finds the Schematic Cell associated with this Icon Cell.
 Export getExportChron(int chronIndex)
          Method to return the Export at specified chronological index.
 java.util.Iterator<Export> getExports()
          Method to return an iterator over all Exports of this NodeProto.
 PrimitiveNode.Function getFunction()
          Method to return the function of this Cell.
 CellId getId()
          Method to return NodeProtoId of this NodeProto.
 java.util.Iterator<NodeInst> getInstancesOf()
          Method to return an iterator over all instances of this NodeProto.
 Library getLibrary()
          Method to get the library to which this Cell belongs.
 CellBackup.Memoization getMemoization()
          Returns data for size computation (connectivity etc).
 java.lang.String getName()
          Method to return the pure name of this Cell, without any view or version information.
 Netlist getNetlist()
          Recompute the Netlist structure for this Cell whithout shortening resistors.
 Netlist getNetlist(Netlist.ShortResistors shortResistors)
          Recompute the Netlist structure for this Cell.
 Cell getNewestVersion()
          Method to return the most recent version of this Cell.
 java.util.Iterator<Nodable> getNodables()
          Method to return an Iterator over all NodeInst objects in this Cell.
 NodeInst getNode(int nodeIndex)
          Method to return the NodeInst at specified position.
 Name getNodeAutoname(Name basename)
          Method to return unique autoname for NodeInst in this cell.
 NodeInst getNodeById(int nodeId)
          Method to return the NodeInst by its chronological index.
 java.util.Iterator<NodeInst> getNodes()
          Method to return an Iterator over all NodeInst objects in this Cell.
 int getNumArcs()
          Method to return the number of ArcInst objects in this Cell.
 int getNumMultiPages()
          Method to return the number of pages in this multi-page Cell.
 int getNumNodes()
          Method to return the number of NodeInst objects in this Cell.
 int getNumParameters()
          Method to return the number of Parameters on this Cell.
 int getNumPorts()
          Method to return the number of PortProtos on this NodeProto.
 int getNumUsagesIn()
          Method to return the number of NodeUsage objects in this Cell.
 int getNumVersions()
          Method to return the number of different versions of this Cell.
 Variable getParameter(int paramIndex)
          Method to return the Parameter by its paramIndex.
 Variable getParameter(Variable.Key key)
          Method to return the Variable on this Cell with the given key that is a parameter.
 Variable getParameterOrVariable(Variable.Key key)
          Method to return the Parameter or Variable on this Cell with a given key.
 java.util.Iterator<Variable> getParameters()
          Method to return an Iterator over all Variables marked as parameters on this Cell.
 java.util.Iterator<Variable> getParametersAndVariables()
          Method to return an Iterator over all Parameters and Variables on this Cell.
 Export getPort(int portIndex)
          Method to return the PortProto at specified position.
 Export getPort(PortProtoId portProtoId)
          Method to return the PortProto by thread-independent PortProtoId.
 PortInst getPortInst(int nodeId, PortProtoId portProtoId)
          Method to return the PortInst by nodeId and PortProtoId.
 java.util.Iterator<PortProto> getPorts()
          Method to return an iterator over all PortProtos of this NodeProto.
 SizeOffset getProtoSizeOffset()
          Method to get the size offset of this Cell.
 java.awt.geom.Rectangle2D getRelativeTextBounds(EditWindow0 wnd)
          Method to return the bounds of all relative text in this Cell.
 java.util.Date getRevisionDate()
          Method to return the revision date of this Cell.
 AbstractShapeBuilder.Shrinkage getShrinkage()
          Returns data for arc shrinkage computation.
 Technology getTechnology()
          Method to return the Technology of this Cell.
 int getTempInt()
          Method to get the temporary integer on this Cell.
 java.lang.String[] getTextViewContents()
          Method to get the strings in this Cell.
 Topology getTopology()
           
 int getUniqueNameIndex(java.lang.String prefix, java.lang.Class cls, int startingIndex)
          Method to determine the index value which, when appended to a given string, will generate a unique name in this Cell.
 java.util.Iterator<CellUsage> getUsagesIn()
          Method to return an Iterator over all CellUsage objects in this Cell.
 java.util.Iterator<CellUsage> getUsagesOf()
          Method to return an iterator over all usages of this NodeProto.
 Netlist getUserNetlist()
          Returns the Netlist structure for this Cell, using current network options.
 int getVersion()
          Method to return the version number of this Cell.
 java.util.Iterator<Cell> getVersions()
          Method to return an Iterator over the different versions of this Cell.
 View getView()
          Method to get this Cell's View.
 void getZValues(double[] array)
          Method to get MinZ and MaxZ of the cell calculated based on nodes.
 boolean hasParameters()
          Tells if this Cell has parameters.
 Cell iconView()
          Method to find the icon Cell associated with this Cell.
static Cell inCurrentThread(CellId cellId)
          Returns a Cell by CellId.
 boolean isAChildOf(Cell parent)
          Method to determine whether this Cell is a child of a given parent Cell.
 boolean isAllLocked()
          Method to tell if the contents of this Cell are locked.
 boolean isDeprecatedVariable(Variable.Key key)
          Method to determine whether a variable key on Cell is deprecated.
 boolean isExpanded(int nodeId)
          Tells expanded status of NodeInst with specified nodeId.
 boolean isIcon()
          Method to determine whether this Cell is an icon Cell.
 boolean isIconOf(Cell cell)
          Method to determine whether this Cell is an icon of another Cell.
 boolean isInstancesLocked()
          Method to tell if the sub-instances in this Cell are locked.
static boolean isInstantiationRecursive(Cell toInstantiate, Cell parent)
          Determines whether an instantiation of cell toInstantiate into parent would be a rescursive operation.
 boolean isInTechnologyLibrary()
          Method to tell if this Cell is part of a Technology Library.
 boolean isInUse(java.lang.String action, boolean quiet, boolean sameCellGroupAlso)
          Method to determine whether this Cell is in use anywhere.
 boolean isLayout()
          Method to return true if this Cell is a layout Cell.
 boolean isLinked()
          Returns true if this Cell is linked into database.
 boolean isModified()
          Method to tell if this Cell has been modified since last save to disk.
 boolean isMultiPage()
          Method to tell if this Cell is a multi-page drawing.
 boolean isParam(Variable.Key varKey)
          Method to return true if the Variable on this ElectricObject with given key is a parameter.
 boolean isSchematic()
          Method to return true if this Cell is a schematic Cell.
 boolean isUniqueName(Name name, java.lang.Class cls, ElectricObject exclude)
          Method to determine whether a name is unique in this Cell.
 boolean isUniqueName(java.lang.String name, java.lang.Class cls, ElectricObject exclude)
          Method to determine whether a name is unique in this Cell.
 boolean isWantExpanded()
          Method to tell if instances of it are "expanded" by when created.
 void joinGroup(Cell otherCell)
          Method to move this Cell together with all its versions and views to the group of another Cell.
 void kill()
          Method to remove this node from all lists.
 void killArcs(java.util.Set<ArcInst> killedArcs)
          Method to unlink a set of these ArcInsts from this Cell.
 void killExports(java.util.Set<Export> killedExports)
          Method to unlink a set of these Export from this Cell.
 void killNodes(java.util.Set<NodeInst> killedNodes)
          Method to unlink a set of these NodeInsts from this Cell.
 java.lang.String libDescribe()
          Method to describe this cell.
 void loadExpandStatus()
          Method to load isExpanded status of subcell instances from Preferences.
 int lowLevelGetUserbits()
          Low-level method to get the user bits.
 void lowLevelMadeRevision(long revisionDate, java.lang.String userName, CellRevision oldRevision)
          Method to set this Cell's revision date and user name.
 void lowLevelSetCreationDate(java.util.Date creationDate)
          Method to set this Cell's creation date.
 void lowLevelSetRevisionDate(java.util.Date revisionDate)
          Method to set this Cell's last revision date.
 void lowLevelSetUserbits(int userBits)
          Low-level method to set the user bits.
static Cell makeInstance(Library lib, java.lang.String name)
          Factory method to create a new Cell.
 Cell makeNewVersion()
          Method to create a new version of this Cell.
static Cell newInstance(Library lib, java.lang.String name)
          Factory method to create a new Cell.
 java.awt.geom.Point2D newVarOffset()
          Method to compute the location of a new Variable on this Cell.
 java.lang.String noLibDescribe()
          Method to describe this cell.
 boolean objInCell(ElectricObject eObj)
          Method to tell whether an ElectricObject exists in this Cell.
 Cell otherView(View view)
          Method to find the Cell of a given View that is in the same group as this Cell.
 void removeNodeName(NodeInst ni)
          Method to remove an NodeInst from the name index of this cell.
 IdMapper rename(java.lang.String newName, java.lang.String newGroupName)
          Method to rename this Cell.
 void replaceSubcellsByExisting()
          Method to replace subcells of a Cell by cells with similar name in Cell's
 java.util.Iterator<RTBounds> searchIterator(java.awt.geom.Rectangle2D bounds)
          Method to return an interator over all RTBounds objects in a given area of this Cell.
 java.util.Iterator<RTBounds> searchIterator(java.awt.geom.Rectangle2D bounds, boolean includeEdges)
          Method to return an interator over all RTBounds objects in a given area of this Cell that allows to ignore elements touching the area.
 void setAllLocked()
          Method to set this Cell so that everything inside of it is locked.
static void setAllowCircularLibraryDependences(boolean val)
          Method to allow temporarily circular library dependences (for example to read legacy libraries).
 void setCellGroup(Cell.CellGroup cellGroup)
          Method to put this Cell together with all its versions and views into the given CellGroup.
 void setContentsModified()
          Method to set if cell has been modified in the batch job.
 void setDirty()
          Method to indicate that the bounds of this Cell are incorrect because a node or arc has been created, deleted, or modified.
 void setExpanded(int nodeId, boolean value)
          Method to set expanded status of specified NodeInst.
 void setGeomDirty()
          Method to indicate that the bounds of this Cell are incorrect because a node or arc may have been modified.
 void setInCellLibrary()
          Method to set this Cell so that it is part of a cell library.
 void setInstancesLocked()
          Method to set this Cell so that all instances inside of it are locked.
 void setInTechnologyLibrary()
          Method to set this Cell so that it is part of a technology library.
 void setMultiPage(boolean multi)
          Method to set the multi-page capability of this Cell.
 void setTechnology(Technology tech)
          Method to set the Technology to which this NodeProto belongs It can only be called for Cells because PrimitiveNodes have fixed Technology membership.
 void setTempInt(int tempInt)
          Method to set an arbitrary integer in a temporary location on this Cell.
 void setTextDescriptor(Variable.Key varKey, TextDescriptor td)
          Updates the TextDescriptor on this Cell selected by varKey.
 void setTextViewContents(java.lang.String[] strings)
          Method to set the strings in this Cell.
 void setTopologyModified()
           
 IdMapper setView(View newView)
          Method to change the view of this Cell.
 void setWantExpanded()
          Method to set this Cell so that instances of it are "expanded" by when created.
 java.lang.String toString()
          Returns a printable version of this Cell.
 void updatePortInsts(int[] pattern)
          Update PortInsts of all instances of this Cell accoding to pattern.
 Cell whichCell()
          Method to determine the appropriate Cell associated with this ElectricObject.
 
Methods inherited from class com.sun.electric.database.variable.ElectricObject
addDisplayableVariables, checkChanging, checkExamine, checkUndoing, computeTextPoly, copyTextDescriptorFrom, copyVarsFrom, getArtwork, getCode, getDisplayableVariables, getGeneric, getInfo, getMutableTextDescriptor, getNumVariables, getParameterOrVariable, getPolyList, getSchematics, getTech, getTechPool, getTextBounds, getTextDescriptor, getVar, getVar, getVariables, getVarValue, getVarValue, isDatabaseObject, newDisplayVar, newVar, newVar, newVar, newVar, numDisplayableVariables, renameVar, renameVar, setOff, uniqueObjectName, uniqueObjectName, updateVar, updateVarCode, updateVarText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CHARACTERISTIC_SPACING

public static final Variable.Key CHARACTERISTIC_SPACING
Variable key for characteristic spacing for a cell.


CELL_TEXT_KEY

public static final Variable.Key CELL_TEXT_KEY
Variable key for text cell contents.


MULTIPAGE_COUNT_KEY

public static final Variable.Key MULTIPAGE_COUNT_KEY
Variable key for number of multipage pages.


TEXT_CELL_FONT_NAME

public static final Variable.Key TEXT_CELL_FONT_NAME
Variable key for font of text in textual cells.


TEXT_CELL_FONT_SIZE

public static final Variable.Key TEXT_CELL_FONT_SIZE
Variable key for size of text in textual cells.


WANTNEXPAND

public static final int WANTNEXPAND
set if instances should be expanded

See Also:
Constant Field Values

NPLOCKED

public static final int NPLOCKED
set if everything in cell is locked

See Also:
Constant Field Values

NPILOCKED

public static final int NPILOCKED
set if instances in cell are locked

See Also:
Constant Field Values

INCELLLIBRARY

public static final int INCELLLIBRARY
set if cell is part of a "cell library"

See Also:
Constant Field Values

TECEDITCELL

public static final int TECEDITCELL
set if cell is from a technology-library

See Also:
Constant Field Values
Method Detail

makeInstance

public static Cell makeInstance(Library lib,
                                java.lang.String name)
Factory method to create a new Cell. Also does auxiliary things to create the Cell, such as placing a cell-center if requested.

Parameters:
lib - the Library in which to place this cell.
name - the name of this cell. Cell names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}). However, the name can be fully qualified with version and view information. For example, "foo;2{sch}".
Returns:
the newly created cell (null on error).

newInstance

public static Cell newInstance(Library lib,
                               java.lang.String name)
Factory method to create a new Cell.

Parameters:
lib - the Library in which to place this cell.
name - the name of this cell. Cell names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}). However, the name can be fully qualified with version and view information. For example, "foo;2{sch}".
Returns:
the newly created cell (null on error).

kill

public void kill()
Method to remove this node from all lists.


copyNodeProto

public static Cell copyNodeProto(Cell fromCell,
                                 Library toLib,
                                 java.lang.String toName,
                                 boolean useExisting)
Method to copy a Cell to any Library.

Parameters:
fromCell - the Cell to copy.
toLib - the Library to copy it to.
toName - the name of the Cell in the destination Library. If the destination library is the same as the original Cell's library and the new name is the same as the old name, a new version is made.
useExisting - true to use existing subcell instances if they exist in the destination Library.
Returns:
the new Cell in the destination Library.

copyNodeProto

public static Cell copyNodeProto(Cell fromCell,
                                 Library toLib,
                                 java.lang.String toName,
                                 boolean useExisting,
                                 java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> cellNamesToUse)
Method to copy a Cell to any Library.

Parameters:
fromCell - the Cell to copy.
toLib - the Library to copy it to.
toName - the name of the Cell in the destination Library. If the destination library is the same as the original Cell's library and the new name is the same as the old name, a new version is made.
useExisting - true to use existing subcell instances if they exist in the destination Library.
cellNamesToUse - a map that disambiguates cell names when they clash in different original libraries. The main key is an old cell name, and the value for that key is a map of library names to new cell names. So, for example, if libraries "A" and "B" both have a cell called "X", then existing.get("X").get("A") is "X" but existing.get(X").get("B") is "X_1" which disambiguates the cell names in the destination library. The map may be null.
Returns:
the new Cell in the destination Library.

copyNodeProtoUsingMapping

public static Cell copyNodeProtoUsingMapping(Cell fromCell,
                                             Library toLib,
                                             java.lang.String toName,
                                             java.util.Map<NodeInst,NodeProto> nodePrototypes)
Method to copy a Cell to any Library, using a preset mapping of node prototypes.

Parameters:
fromCell - the Cell to copy.
toLib - the Library to copy it to. If the destination library is the same as the original Cell's library, a new version is made.
toName - the name of the Cell in the destination Library.
nodePrototypes - a HashMap from NodeInsts in the source Cell to proper NodeProtos to use in the new Cell.
Returns:
the new Cell in the destination Library.

replaceSubcellsByExisting

public void replaceSubcellsByExisting()
Method to replace subcells of a Cell by cells with similar name in Cell's


rename

public IdMapper rename(java.lang.String newName,
                       java.lang.String newGroupName)
Method to rename this Cell.

Parameters:
newName - the new name of this cell.
newGroupName - the name of cell in a group to put the rename cell to.

lowLevelGetUserbits

public int lowLevelGetUserbits()
Low-level method to get the user bits. The "user bits" are a collection of flags that are more sensibly accessed through special methods. This general access to the bits is required because the ELIB file format stores it as a full integer. This should not normally be called by any other part of the system.

Returns:
the "user bits".

lowLevelSetUserbits

public void lowLevelSetUserbits(int userBits)
Low-level method to set the user bits. The "user bits" are a collection of flags that are more sensibly accessed through special methods. This general access to the bits is required because the ELIB file format stores it as a full integer. This should not normally be called by any other part of the system.

Parameters:
userBits - the new "user bits".

backup

public CellBackup backup()

backupUnsafe

public CellBackup backupUnsafe()

getMemoization

public CellBackup.Memoization getMemoization()
Returns data for size computation (connectivity etc).

Returns:
data for size computation.

getShrinkage

public AbstractShapeBuilder.Shrinkage getShrinkage()
Returns data for arc shrinkage computation.

Returns:
data for arc shrinkage computation.

getTopology

public Topology getTopology()

getDefWidth

public double getDefWidth()
Method to get the width of this Cell.

Specified by:
getDefWidth in interface NodeProto
Returns:
the width of this Cell.

getDefHeight

public double getDefHeight()
Method to the height of this Cell.

Specified by:
getDefHeight in interface NodeProto
Returns:
the height of this Cell.

getProtoSizeOffset

public SizeOffset getProtoSizeOffset()
Method to get the size offset of this Cell.

Specified by:
getProtoSizeOffset in interface NodeProto
Returns:
the size offset of this Cell. It is always zero for cells.

setDirty

public void setDirty()
Method to indicate that the bounds of this Cell are incorrect because a node or arc has been created, deleted, or modified.


setGeomDirty

public void setGeomDirty()
Method to indicate that the bounds of this Cell are incorrect because a node or arc may have been modified.


searchIterator

public java.util.Iterator<RTBounds> searchIterator(java.awt.geom.Rectangle2D bounds)
Method to return an interator over all RTBounds objects in a given area of this Cell.

Parameters:
bounds - the specified area to search.
Returns:
an iterator over all of the RTBounds objects in that area.

searchIterator

public java.util.Iterator<RTBounds> searchIterator(java.awt.geom.Rectangle2D bounds,
                                                   boolean includeEdges)
Method to return an interator over all RTBounds objects in a given area of this Cell that allows to ignore elements touching the area.

Parameters:
bounds - the specified area to search.
includeEdges - true if RTBounds objects along edges are considered in.
Returns:
an iterator over all of the RTBounds objects in that area.

getBounds

public ERectangle getBounds()
Method to return the bounds of this Cell.

Returns:
an ERectangle with the bounds of this cell's contents

findEssentialBounds

public java.awt.geom.Rectangle2D findEssentialBounds()
Method to compute the "essential bounds" of this Cell. It looks for NodeInst objects in the cell that are of the type "generic:Essential-Bounds" and builds a rectangle from their locations.

Returns:
the bounding area of the essential bounds. Returns null if an essential bounds cannot be determined.

alreadyCellCenter

public boolean alreadyCellCenter()
Method to determine whether this Cell has a cell center in it.

Returns:
true if this Cell has a Cell-center node in it.

adjustReferencePoint

public void adjustReferencePoint(double cX,
                                 double cY)
Method adjust this cell when the reference point moves. This requires renumbering all coordinate values in the Cell.

Parameters:
cX - coordinate X of new center.
cY - coordinate Y of new center.

getNodes

public java.util.Iterator<NodeInst> getNodes()
Method to return an Iterator over all NodeInst objects in this Cell.

Returns:
an Iterator over all NodeInst objects in this Cell.

getNodables

public java.util.Iterator<Nodable> getNodables()
Method to return an Iterator over all NodeInst objects in this Cell.

Returns:
an Iterator over all NodeInst objects in this Cell.

getNumNodes

public int getNumNodes()
Method to return the number of NodeInst objects in this Cell.

Returns:
the number of NodeInst objects in this Cell.

getNode

public final NodeInst getNode(int nodeIndex)
Method to return the NodeInst at specified position.

Parameters:
nodeIndex - specified position of NodeInst.
Returns:
the NodeInst at specified position.

getNodeById

public NodeInst getNodeById(int nodeId)
Method to return the NodeInst by its chronological index.

Parameters:
nodeId - chronological index of NodeInst.
Returns:
the NodeInst with specified chronological index.

isExpanded

public boolean isExpanded(int nodeId)
Tells expanded status of NodeInst with specified nodeId.

Returns:
true if NodeInst with specified nodeId is expanded.

setExpanded

public void setExpanded(int nodeId,
                        boolean value)
Method to set expanded status of specified NodeInst. Expanded NodeInsts are instances of Cells that show their contents. Unexpanded Cell instances are shown as boxes with the node prototype names in them. The state has no meaning for instances of primitive node prototypes.

Parameters:
nodeId - specified nodeId
value - true if NodeInst is expanded.

getPortInst

public PortInst getPortInst(int nodeId,
                            PortProtoId portProtoId)
Method to return the PortInst by nodeId and PortProtoId.

Parameters:
nodeId - specified NodeId.
portProtoId -
Returns:
the PortInst at specified position..

getUsagesIn

public java.util.Iterator<CellUsage> getUsagesIn()
Method to return an Iterator over all CellUsage objects in this Cell.

Returns:
an Iterator over all CellUsage objects in this Cell.

getNumUsagesIn

public int getNumUsagesIn()
Method to return the number of NodeUsage objects in this Cell.

Returns:
the number of NodeUsage objects in this Cell.

findNode

public NodeInst findNode(java.lang.String name)
Method to find a named NodeInst on this Cell.

Parameters:
name - the name of the NodeInst.
Returns:
the NodeInst. Returns null if none with that name are found.

killNodes

public void killNodes(java.util.Set<NodeInst> killedNodes)
Method to unlink a set of these NodeInsts from this Cell.

Parameters:
killedNodes - a set of NodeInsts to kill.

setAllowCircularLibraryDependences

public static void setAllowCircularLibraryDependences(boolean val)
Method to allow temporarily circular library dependences (for example to read legacy libraries). It is called only from synchronyzed method Input.readLibrary.

Parameters:
val - true allows circular dependencies.

addNode

public boolean addNode(NodeInst ni)
Method to add a new NodeInst to the cell.

Parameters:
ni - the NodeInst to be included in the cell.
Returns:
true on failure

addNodeName

public void addNodeName(NodeInst ni)
Method to add a new NodeInst to the name index of this cell.

Parameters:
ni - the NodeInst to be included tp the name index in the cell.

getNodeAutoname

public Name getNodeAutoname(Name basename)
Method to return unique autoname for NodeInst in this cell.

Parameters:
basename - base name of autoname
Returns:
autoname

removeNodeName

public void removeNodeName(NodeInst ni)
Method to remove an NodeInst from the name index of this cell.

Parameters:
ni - the NodeInst to be removed from the cell.

getArcs

public java.util.Iterator<ArcInst> getArcs()
Method to return an Iterator over all ArcInst objects in this Cell.

Returns:
an Iterator over all ArcInst objects in this Cell.

getNumArcs

public int getNumArcs()
Method to return the number of ArcInst objects in this Cell.

Returns:
the number of ArcInst objects in this Cell.

getArc

public final ArcInst getArc(int arcIndex)
Method to return the ArcInst at specified position.

Parameters:
arcIndex - specified position of ArcInst.
Returns:
the ArcInst at specified position..

getArcById

public ArcInst getArcById(int arcId)
Method to return the ArcInst by its chronological index.

Parameters:
arcId - chronological index of ArcInst.
Returns:
the ArcInst with specified chronological index.

findArc

public ArcInst findArc(java.lang.String name)
Method to find a named ArcInst on this Cell.

Parameters:
name - the name of the ArcInst.
Returns:
the ArcInst. Returns null if none with that name are found.

killArcs

public void killArcs(java.util.Set<ArcInst> killedArcs)
Method to unlink a set of these ArcInsts from this Cell.

Parameters:
killedArcs - a set of ArcInsts to kill.

updatePortInsts

public void updatePortInsts(int[] pattern)
Update PortInsts of all instances of this Cell accoding to pattern. Pattern contains an element for each Export. If Export was just created, the element contains -1. For old Exports the element contains old index of the Export.

Parameters:
pattern - array with elements describing new PortInsts.

killExports

public void killExports(java.util.Set<Export> killedExports)
Method to unlink a set of these Export from this Cell.

Parameters:
killedExports - a set of Exports to kill.

findPortProto

public PortProto findPortProto(java.lang.String name)
Method to find the PortProto that has a particular name.

Specified by:
findPortProto in interface NodeProto
Returns:
the PortProto, or null if there is no PortProto with that name.

findPortProto

public PortProto findPortProto(Name name)
Method to find the PortProto that has a particular Name.

Specified by:
findPortProto in interface NodeProto
Returns:
the PortProto, or null if there is no PortProto with that name.

getPorts

public java.util.Iterator<PortProto> getPorts()
Method to return an iterator over all PortProtos of this NodeProto.

Specified by:
getPorts in interface NodeProto
Returns:
an iterator over all PortProtos of this NodeProto.

getExports

public java.util.Iterator<Export> getExports()
Method to return an iterator over all Exports of this NodeProto.

Returns:
an iterator over all Exports of this NodeProto.

getNumPorts

public int getNumPorts()
Method to return the number of PortProtos on this NodeProto.

Specified by:
getNumPorts in interface NodeProto
Returns:
the number of PortProtos on this NodeProto.

getPort

public Export getPort(int portIndex)
Method to return the PortProto at specified position.

Specified by:
getPort in interface NodeProto
Parameters:
portIndex - specified position of PortProto.
Returns:
the PortProto at specified position..

getPort

public Export getPort(PortProtoId portProtoId)
Method to return the PortProto by thread-independent PortProtoId.

Specified by:
getPort in interface NodeProto
Parameters:
portProtoId - thread-independent PortProtoId.
Returns:
the PortProto.

getExportChron

public Export getExportChron(int chronIndex)
Method to return the Export at specified chronological index.

Parameters:
chronIndex - specified chronological index of Export.
Returns:
the Export at specified chronological index or null.

findExport

public Export findExport(java.lang.String name)
Method to find a named Export on this Cell.

Parameters:
name - the name of the export.
Returns:
the export. Returns null if that name was not found.

findExport

public Export findExport(Name name)
Method to find a named Export on this Cell.

Parameters:
name - the Name of the export.
Returns:
the export. Returns null if that name was not found.

getCellName

public CellName getCellName()
Method to return the CellName object describing this Cell.

Returns:
the CellName object describing this Cell.

getName

public java.lang.String getName()
Method to return the pure name of this Cell, without any view or version information.

Specified by:
getName in interface NodeProto
Returns:
the pure name of this Cell.

describe

public java.lang.String describe(boolean withQuotes)
Method to describe this cell. The description has the form: cell;version{view} If the cell is not from the current library, prepend the library name.

Specified by:
describe in interface NodeProto
Parameters:
withQuotes - to wrap description between quotes
Returns:
a String that describes this cell.

libDescribe

public java.lang.String libDescribe()
Method to describe this cell. The description has the form: Library:cell;version{view}

Returns:
a String that describes this cell.

noLibDescribe

public java.lang.String noLibDescribe()
Method to describe this cell. The description has the form: cell;version{view} Unlike "describe()", this method never prepends the library name.

Returns:
a String that describes this cell.

findNodeProto

public static NodeProto findNodeProto(java.lang.String line)
Method to find the NodeProto with the given name. This can be a PrimitiveNode (and can be prefixed by a Technology name), or it can be a Cell (and be prefixed by a Library name).

Parameters:
line - the name of the NodeProto.
Returns:
the specified NodeProto, or null if none can be found.

getTextViewContents

public java.lang.String[] getTextViewContents()
Method to get the strings in this Cell. It is only valid for cells with "text" views (documentation, vhdl, netlist, etc.)

Returns:
the strings in this Cell. Returns null if there are no strings.

setTextViewContents

public void setTextViewContents(java.lang.String[] strings)
Method to set the strings in this Cell. It is only valid for cells with "text" views (documentation, vhdl, netlist, etc.) The call needs to be wrapped inside of a Job.

Parameters:
strings - an array of Strings that define this Cell.

getParameter

public Variable getParameter(Variable.Key key)
Method to return the Variable on this Cell with the given key that is a parameter. Returns null if not found.

Parameters:
key - the key of the variable
Returns:
the Variable with that key, that is parameter. Returns null if none found.

getParameters

public java.util.Iterator<Variable> getParameters()
Method to return an Iterator over all Variables marked as parameters on this Cell.

Returns:
an Iterator over all Variables on this Cell.

hasParameters

public boolean hasParameters()
Tells if this Cell has parameters.

Returns:
true if this Cell has parameters.

getNumParameters

public int getNumParameters()
Method to return the number of Parameters on this Cell.

Returns:
the number of Parametes on this ImmutableCell.

getParameter

public Variable getParameter(int paramIndex)
Method to return the Parameter by its paramIndex.

Parameters:
paramIndex - index of Parameter.
Returns:
the Parameter with given paramIndex.
Throws:
ArrayIndexOutOfBoundesException - if paramIndex out of bounds.

isParam

public boolean isParam(Variable.Key varKey)
Method to return true if the Variable on this ElectricObject with given key is a parameter. Parameters are those Variables that have values on instances which are passed down the hierarchy into the contents. Parameters can only exist on NodeInst objects.

Overrides:
isParam in class ElectricObject
Parameters:
varKey - key to test
Returns:
true if the Variable with given key is a parameter.

getAllText

public Poly[] getAllText(boolean hardToSelect,
                         EditWindow0 wnd)
Method to return a list of Polys that describes all text on this Cell.

Parameters:
hardToSelect - is true if considering hard-to-select text.
wnd - the window in which the text will be drawn.
Returns:
an array of Polys that describes the text.

getRelativeTextBounds

public java.awt.geom.Rectangle2D getRelativeTextBounds(EditWindow0 wnd)
Method to return the bounds of all relative text in this Cell. This is used when displaying "full screen" because the text may grow to be larger than the actual cell contents. Only relative (scalable) text is considered, since it is not possible to change the size of absolute text.

Parameters:
wnd - the EditWindow0 in which this Cell is being displayed.
Returns:
the bounds of the relative (scalable) text.

getBasename

public Name getBasename()
Method to return the basename for autonaming instances of this Cell.

Returns:
the basename for autonaming instances of this Cell.

getUniqueNameIndex

public int getUniqueNameIndex(java.lang.String prefix,
                              java.lang.Class cls,
                              int startingIndex)
Method to determine the index value which, when appended to a given string, will generate a unique name in this Cell.

Parameters:
prefix - the start of the string.
cls - the type of object being examined.
startingIndex - the starting value to append to the string.
Returns:
a value that, when appended to the prefix, forms a unique name in the cell.

isUniqueName

public boolean isUniqueName(java.lang.String name,
                            java.lang.Class cls,
                            ElectricObject exclude)
Method to determine whether a name is unique in this Cell.

Parameters:
name - the Name being tested to see if it is unique.
cls - the type of object being examined. The only classes that can be examined are PortProto, NodeInst, and ArcInst.
exclude - an object that should not be considered in this test (null to ignore the exclusion).
Returns:
true if the name is unique in the Cell. False if it already exists.

isUniqueName

public boolean isUniqueName(Name name,
                            java.lang.Class cls,
                            ElectricObject exclude)
Method to determine whether a name is unique in this Cell.

Parameters:
name - the Name being tested to see if it is unique.
cls - the type of object being examined. The only classes that can be examined are PortProto, NodeInst, and ArcInst.
exclude - an object that should not be considered in this test (null to ignore the exclusion).
Returns:
true if the name is unique in the Cell. False if it already exists.

isDeprecatedVariable

public boolean isDeprecatedVariable(Variable.Key key)
Method to determine whether a variable key on Cell is deprecated. Deprecated variable keys are those that were used in old versions of Electric, but are no longer valid.

Overrides:
isDeprecatedVariable in class ElectricObject
Parameters:
key - the key of the variable.
Returns:
true if the variable key is deprecated.

newVarOffset

public java.awt.geom.Point2D newVarOffset()
Method to compute the location of a new Variable on this Cell.

Returns:
the offset of the new Variable.

toString

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

Overrides:
toString in class ElectricObject
Returns:
a printable version of this Cell.

getD

public ImmutableCell getD()
Returns persistent data of this Cell.

Specified by:
getD in class ElectricObject
Returns:
persistent data of this Cell.

addVar

public void addVar(Variable var)
Method to add a Variable on this Cell. It may add repaired copy of this Variable in some cases.

Specified by:
addVar in class ElectricObject
Parameters:
var - Variable to add.

delVar

public void delVar(Variable.Key key)
Method to delete a Variable from this Cell.

Specified by:
delVar in class ElectricObject
Parameters:
key - the key of the Variable to delete.

getParameterOrVariable

public Variable getParameterOrVariable(Variable.Key key)
Method to return the Parameter or Variable on this Cell with a given key.

Overrides:
getParameterOrVariable in class ElectricObject
Parameters:
key - the key of the Parameter or Variable.
Returns:
the Parameter or Variable with that key, or null if there is no such Parameter or Variable Variable.
Throws:
java.lang.NullPointerException - if key is null

getParametersAndVariables

public java.util.Iterator<Variable> getParametersAndVariables()
Method to return an Iterator over all Parameters and Variables on this Cell.

Overrides:
getParametersAndVariables in class ElectricObject
Returns:
an Iterator over all Parameters and Variables on this Cell.

setTextDescriptor

public void setTextDescriptor(Variable.Key varKey,
                              TextDescriptor td)
Updates the TextDescriptor on this Cell selected by varKey. The varKey may be a key of parameter or variable on this Cell. If varKey doesn't select any text descriptor, no action is performed. The TextDescriptor gives information for displaying the Variable.

Overrides:
setTextDescriptor in class ElectricObject
Parameters:
varKey - key of variable or special key.
td - new value TextDescriptor

getId

public CellId getId()
Method to return NodeProtoId of this NodeProto. NodeProtoId identifies NodeProto independently of threads.

Specified by:
getId in interface NodeProto
Returns:
NodeProtoId of this NodeProto.

inCurrentThread

public static Cell inCurrentThread(CellId cellId)
Returns a Cell by CellId. Returns null if the Cell is not linked to the database.

Parameters:
cellId - CellId to find.
Returns:
Cell or null.

getUsagesOf

public java.util.Iterator<CellUsage> getUsagesOf()
Method to return an iterator over all usages of this NodeProto.

Returns:
an iterator over all usages of this NodeProto.

getInstancesOf

public java.util.Iterator<NodeInst> getInstancesOf()
Method to return an iterator over all instances of this NodeProto.

Returns:
an iterator over all instances of this NodeProto.

isInstantiationRecursive

public static boolean isInstantiationRecursive(Cell toInstantiate,
                                               Cell parent)
Determines whether an instantiation of cell toInstantiate into parent would be a rescursive operation.

Parameters:
toInstantiate - the cell to instantiate
parent - the cell in which to create the instance
Returns:
true if the operation would be recursive, false otherwise

isAChildOf

public boolean isAChildOf(Cell parent)
Method to determine whether this Cell is a child of a given parent Cell. DO NOT use this method to determine whether an instantiation should be allowed (i.e. it is not a recursive instantation). Use isInstantiationRecursive instead. This method *only* does what is it says it does: it checks if this cell is currently instantiated as a child of 'parent' cell.

Parameters:
parent - the parent cell being examined.
Returns:
true if, somewhere above the hierarchy of this Cell is the parent Cell.

isInUse

public boolean isInUse(java.lang.String action,
                       boolean quiet,
                       boolean sameCellGroupAlso)
Method to determine whether this Cell is in use anywhere. If it is, an error dialog is displayed.

Parameters:
action - a description of the intended action (i.e. "delete").
quiet - true not to warn the user of the cell being used.
sameCellGroupAlso -
Returns:
true if this Cell is in use anywhere.

makeNewVersion

public Cell makeNewVersion()
Method to create a new version of this Cell.

Returns:
a new Cell that is a new version of this Cell.

getVersion

public int getVersion()
Method to return the version number of this Cell.

Returns:
the version number of this Cell.

getNumVersions

public int getNumVersions()
Method to return the number of different versions of this Cell.

Returns:
the number of different versions of this Cell.

getVersions

public java.util.Iterator<Cell> getVersions()
Method to return an Iterator over the different versions of this Cell.

Returns:
an Iterator over the different versions of this Cell.

getNewestVersion

public Cell getNewestVersion()
Method to return the most recent version of this Cell.

Returns:
he most recent version of this Cell.

getCellGroup

public Cell.CellGroup getCellGroup()
Method to get the CellGroup that this Cell is part of.

Returns:
the CellGroup that this Cell is part of.

joinGroup

public void joinGroup(Cell otherCell)
Method to move this Cell together with all its versions and views to the group of another Cell.

Parameters:
otherCell - the other cell whose group this Cell should join.

setCellGroup

public void setCellGroup(Cell.CellGroup cellGroup)
Method to put this Cell together with all its versions and views into the given CellGroup.

Parameters:
cellGroup - the CellGroup that this cell belongs to or null to put int own cell group

getView

public View getView()
Method to get this Cell's View. Views include "layout", "schematics", "icon", "netlist", etc.

Returns:
to get this Cell's View.

setView

public IdMapper setView(View newView)
Method to change the view of this Cell.

Parameters:
newView - the new View.

isIcon

public boolean isIcon()
Method to determine whether this Cell is an icon Cell.

Returns:
true if this Cell is an icon Cell.

isIconOf

public boolean isIconOf(Cell cell)
Method to determine whether this Cell is an icon of another Cell.

Parameters:
cell - the other cell which this may be an icon of.
Returns:
true if this Cell is an icon of that other Cell.

isSchematic

public boolean isSchematic()
Method to return true if this Cell is a schematic Cell.

Returns:
true if this Cell is a schematic Cell.

busNamesAllowed

public boolean busNamesAllowed()
Method to return true if bus names are allowed in this Cell

Returns:
true if bus names are allowed in this Cell

isLayout

public boolean isLayout()
Method to return true if this Cell is a layout Cell.

Returns:
true if this Cell is a layout Cell

getNumMultiPages

public int getNumMultiPages()
Method to return the number of pages in this multi-page Cell.

Returns:
the number of different pages.

contentsView

public Cell contentsView()
Method to find the contents Cell associated with this Cell. This only makes sense if the current Cell is an icon or skeleton Cell.

Returns:
the contents Cell associated with this Cell. Returns null if no such Cell can be found.

iconView

public Cell iconView()
Method to find the icon Cell associated with this Cell.

Returns:
the icon Cell associated with this Cell. Returns null if no such Cell can be found.

otherView

public Cell otherView(View view)
Method to find the Cell of a given View that is in the same group as this Cell. If there is more than one cell matching the View, it will do a name match.

Parameters:
view - the View of the other Cell.
Returns:
the Cell from this group with the specified View. Returns null if no such Cell can be found.

getNetlist

public Netlist getNetlist()
Recompute the Netlist structure for this Cell whithout shortening resistors.

Returns:
the Netlist structure for this cell.
Throws:
NetworkTool.NetlistNotReady - if called from GUI thread and change Job hasn't prepared Netlist yet

getNetlist

public Netlist getNetlist(Netlist.ShortResistors shortResistors)
Recompute the Netlist structure for this Cell.

Parameters:
shortResistors - short resistors mode of Netlist.
Returns:
the Netlist structure for this cell.
Throws:
NetworkTool.NetlistNotReady - if called from GUI thread and change Job hasn't prepared Netlist yet

getUserNetlist

public Netlist getUserNetlist()
Returns the Netlist structure for this Cell, using current network options. Waits for completion of change Job when called from GUI thread

Returns:
the Netlist structure for this cell.

acquireUserNetlist

public Netlist acquireUserNetlist()
Returns the Netlist structure for this Cell, using current network options. Returns null if change Job hasn't prepared GUI Netlist

Returns:
the Netlist structure for this cell.

getCreationDate

public java.util.Date getCreationDate()
Method to get the creation date of this Cell.

Returns:
the creation date of this Cell.

lowLevelSetCreationDate

public void lowLevelSetCreationDate(java.util.Date creationDate)
Method to set this Cell's creation date. This is a low-level method and should not be called unless you know what you are doing.

Parameters:
creationDate - the date of this Cell's creation.

getRevisionDate

public java.util.Date getRevisionDate()
Method to return the revision date of this Cell.

Returns:
the revision date of this Cell.

lowLevelSetRevisionDate

public void lowLevelSetRevisionDate(java.util.Date revisionDate)
Method to set this Cell's last revision date. This is a low-level method and should not be called unless you know what you are doing.

Parameters:
revisionDate - the date of this Cell's last revision.

lowLevelMadeRevision

public void lowLevelMadeRevision(long revisionDate,
                                 java.lang.String userName,
                                 CellRevision oldRevision)
Method to set this Cell's revision date and user name. Change system is not informed about this. This is a low-level method and should not be called unless you know what you are doing.


checkCellDates

public void checkCellDates()
Method to check the current cell to be sure that no subcells have a more recent date. This is invoked when the "Check cell dates" feature is enabled in the New Nodes tab of the Edit Options dialog.


setWantExpanded

public void setWantExpanded()
Method to set this Cell so that instances of it are "expanded" by when created. Expanded NodeInsts are instances of Cells that show their contents.


clearWantExpanded

public void clearWantExpanded()
Method to set this Cell so that instances of it are "not expanded" by when created. Expanded NodeInsts are instances of Cells that show their contents.


isWantExpanded

public boolean isWantExpanded()
Method to tell if instances of it are "expanded" by when created. Expanded NodeInsts are instances of Cells that show their contents.

Returns:
true if instances of it are "expanded" by when created.

getFunction

public PrimitiveNode.Function getFunction()
Method to return the function of this Cell. The Function of CELL is alway UNKNOWN.

Specified by:
getFunction in interface NodeProto
Returns:
the function of this Cell.

setAllLocked

public void setAllLocked()
Method to set this Cell so that everything inside of it is locked. Locked instances cannot be moved or deleted.


clearAllLocked

public void clearAllLocked()
Method to set this Cell so that everything inside of it is not locked. Locked instances cannot be moved or deleted.


isAllLocked

public boolean isAllLocked()
Method to tell if the contents of this Cell are locked. Locked instances cannot be moved or deleted.

Returns:
true if the contents of this Cell are locked.

setInstancesLocked

public void setInstancesLocked()
Method to set this Cell so that all instances inside of it are locked. Locked instances cannot be moved or deleted.


clearInstancesLocked

public void clearInstancesLocked()
Method to set this Cell so that all instances inside of it are not locked. Locked instances cannot be moved or deleted.


isInstancesLocked

public boolean isInstancesLocked()
Method to tell if the sub-instances in this Cell are locked. Locked instances cannot be moved or deleted.

Returns:
true if the sub-instances in this Cell are locked.

setInCellLibrary

public void setInCellLibrary()
Method to set this Cell so that it is part of a cell library. Cell libraries are simply libraries that contain standard cells but no hierarchy (as opposed to libraries that define a complete circuit). Certain commands exclude facets from cell libraries, so that the actual circuit hierarchy can be more clearly seen.


setInTechnologyLibrary

public void setInTechnologyLibrary()
Method to set this Cell so that it is part of a technology library. Technology libraries are those libraries that contain Cells with graphical descriptions of the nodes, arcs, and layers of a technology.


clearInTechnologyLibrary

public void clearInTechnologyLibrary()
Method to set this Cell so that it is not part of a technology library. Technology libraries are those libraries that contain Cells with graphical descriptions of the nodes, arcs, and layers of a technology.


isInTechnologyLibrary

public boolean isInTechnologyLibrary()
Method to tell if this Cell is part of a Technology Library. Technology libraries are those libraries that contain Cells with graphical descriptions of the nodes, arcs, and layers of a technology.

Returns:
true if this Cell is part of a Technology Library.

isModified

public boolean isModified()
Method to tell if this Cell has been modified since last save to disk.

Returns:
true if cell has been modified.

setTopologyModified

public void setTopologyModified()

setContentsModified

public void setContentsModified()
Method to set if cell has been modified in the batch job.


loadExpandStatus

public void loadExpandStatus()
Method to load isExpanded status of subcell instances from Preferences.


setMultiPage

public void setMultiPage(boolean multi)
Method to set the multi-page capability of this Cell. Multipage cells (usually schematics) must have cell frames to isolate the different areas of the cell that are different pages.

Parameters:
multi - true to make this cell multi-page.

isMultiPage

public boolean isMultiPage()
Method to tell if this Cell is a multi-page drawing. Multipage cells (usually schematics) must have cell frames to isolate the different areas of the cell that are different pages.

Returns:
true if this Cell is a multi-page drawing.

isLinked

public boolean isLinked()
Returns true if this Cell is linked into database.

Specified by:
isLinked in class ElectricObject
Returns:
true if this Cell is linked into database.

getDatabase

public EDatabase getDatabase()
Returns database to which this Cell belongs.

Specified by:
getDatabase in class ElectricObject
Returns:
database to which this ElectricObject belongs.

checkAndRepair

public int checkAndRepair(boolean repair,
                          ErrorLogger errorLogger)
Method to check and repair data structure errors in this Cell.


check

protected void check()
Method to check invariants in this Cell.

Overrides:
check in class ElectricObject
Throws:
java.lang.AssertionError - if invariants are not valid

objInCell

public boolean objInCell(ElectricObject eObj)
Method to tell whether an ElectricObject exists in this Cell. Used when saving and restoring highlighting to ensure that the object still exists.

Parameters:
eObj - the ElectricObject in question
Returns:
true if that ElectricObject is in this Cell.

getCellIndex

public final int getCellIndex()
Method to get the 0-based index of this Cell.

Returns:
the index of this Cell.

setTempInt

public void setTempInt(int tempInt)
Method to set an arbitrary integer in a temporary location on this Cell.

Parameters:
tempInt - the integer to be set on this Cell.

getTempInt

public int getTempInt()
Method to get the temporary integer on this Cell.

Returns:
the temporary integer on this Cell.

whichCell

public Cell whichCell()
Method to determine the appropriate Cell associated with this ElectricObject.

Overrides:
whichCell in class ElectricObject
Returns:
the appropriate Cell associated with this ElectricObject.. Returns null if no Cell can be found.

getLibrary

public Library getLibrary()
Method to get the library to which this Cell belongs.

Returns:
to get the library to which this Cell belongs.

getTechnology

public Technology getTechnology()
Method to return the Technology of this Cell. It can be quite complex to determine which Technology a Cell belongs to. The system examines all of the nodes and arcs in it, and also considers the Cell's view.

Specified by:
getTechnology in interface NodeProto
Returns:
return the Technology of this Cell.

setTechnology

public void setTechnology(Technology tech)
Method to set the Technology to which this NodeProto belongs It can only be called for Cells because PrimitiveNodes have fixed Technology membership.

Parameters:
tech - the new technology for this NodeProto (Cell).

getEquivalent

public Cell getEquivalent()
Finds the Schematic Cell associated with this Icon Cell. If this Cell is an Icon View then find the schematic Cell in its CellGroup.

Returns:
the Schematic Cell. Returns null if there is no equivalent. If there are multiple versions of the Schematic View then return the latest version.

compare

public boolean compare(java.lang.Object obj,
                       java.lang.StringBuffer buffer)
Use to compare cells in Cross Library Check

Parameters:
obj - Object to compare to
buffer - To store comparison messages in case of failure
Returns:
True if objects represent same NodeInst

compareTo

public int compareTo(Cell that)
Compares Cells by their Libraries and CellNames.

Specified by:
compareTo in interface java.lang.Comparable<Cell>
Parameters:
that - the other Cell.
Returns:
a comparison between the Cells.

getZValues

public void getZValues(double[] array)
Method to get MinZ and MaxZ of the cell calculated based on nodes. You must guarantee minZ = Double.MaxValue() and maxZ = Double.MinValue() for initial call.

Parameters:
array - array[0] is minZ and array[1] is max

findReferenceInCell

public boolean findReferenceInCell(Library elib,
                                   java.util.Set<Cell> set)
Method to fill a set with any nodes in this Cell that refer to an external library.

Parameters:
elib - the external library being considered.
set - the set being filled.
Returns:
true if anything was added to the set.