com.sun.electric.tool.user
Class NetworkHighlighter

java.lang.Object
  extended by com.sun.electric.database.hierarchy.HierarchyEnumerator.Visitor
      extended by com.sun.electric.tool.user.NetworkHighlighter

public class NetworkHighlighter
extends HierarchyEnumerator.Visitor

This class is used for hierarchical highlighting of networks


Method Summary
 boolean enterCell(HierarchyEnumerator.CellInfo info)
          The HierarchyEnumerator is about to begin enumerating the contents of a new Cell instance.
 void exitCell(HierarchyEnumerator.CellInfo info)
          The HierarchyEnumerator has finished enumerating the contents of the current Cell instance.
static java.util.List<Highlight2> getHighlights(Cell cell, Netlist netlist, java.util.Set<Network> nets, int startDepth, int endDepth)
          Returns a list of Highlight objects that draw lines and boxes over instances that denote the location of objects in that instance that are connected to net.
 boolean visitNodeInst(Nodable ni, HierarchyEnumerator.CellInfo info)
          The HierarchyEnumerator is visiting Nodable ni.
 
Methods inherited from class com.sun.electric.database.hierarchy.HierarchyEnumerator.Visitor
newCellInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHighlights

public static java.util.List<Highlight2> getHighlights(Cell cell,
                                                       Netlist netlist,
                                                       java.util.Set<Network> nets,
                                                       int startDepth,
                                                       int endDepth)
Returns a list of Highlight objects that draw lines and boxes over instances that denote the location of objects in that instance that are connected to net. The depth of the search is specified by startDepth and endDepth, which start at 0. If both are set to zero, only objects in the cell Cell are highlighted.

Parameters:
cell - the cell in which to highlight objects
netlist - the netlist for the cell
nets - objects connected to these networks will be highlighted
startDepth - to start depth of the hierarchical search
Returns:
endDepth the end depth of the hierarchical search

enterCell

public boolean enterCell(HierarchyEnumerator.CellInfo info)
Description copied from class: HierarchyEnumerator.Visitor
The HierarchyEnumerator is about to begin enumerating the contents of a new Cell instance. That instance has just become the new "current" Cell instance.

Specified by:
enterCell in class HierarchyEnumerator.Visitor
Parameters:
info - information about the Cell instance being enumerated
Returns:
a boolean indicating if the HierarchyEnumerator should enumerate the contents of the current Cell. True means enumerate the current cell

exitCell

public void exitCell(HierarchyEnumerator.CellInfo info)
Description copied from class: HierarchyEnumerator.Visitor
The HierarchyEnumerator has finished enumerating the contents of the current Cell instance. It is about to leave it, never to return. The CellInfo associated with the current Cell instance is about to be abandoned.

Specified by:
exitCell in class HierarchyEnumerator.Visitor
Parameters:
info - information about the Cell instance being enumerated

visitNodeInst

public boolean visitNodeInst(Nodable ni,
                             HierarchyEnumerator.CellInfo info)
Description copied from class: HierarchyEnumerator.Visitor
The HierarchyEnumerator is visiting Nodable ni.

Specified by:
visitNodeInst in class HierarchyEnumerator.Visitor
Parameters:
ni - the Nodable that HierarchyEnumerator is visiting.
Returns:
a boolean indicating whether or not the HierarchyEnumerator should expand the Cell instantiated by ni. True means expand. If ni instantiates a PrimitiveNode then the return value is ignored by the HierarchyEnumerator.