com.sun.electric.tool.user.redisplay
Class VectorCache

java.lang.Object
  extended by com.sun.electric.tool.user.redisplay.VectorCache

public class VectorCache
extends java.lang.Object

Class to hold scalable representation of circuit displays.


Nested Class Summary
static class VectorCache.VectorBase
          Class which defines the common information for all cached displayable objects
 
Field Summary
 EDatabase database
          database to work.
static boolean DEBUG
           
static java.util.Comparator<VectorCache.VectorBase> shapeByLayer
          Comparator class for sorting VectorBase objects by their layer depth.
static VectorCache theCache
           
 
Constructor Summary
VectorCache(EDatabase database)
          Creates a new instance of VectorCache
 
Method Summary
 void addBoxToCell(double lX, double lY, double hX, double hY, Layer layer, CellId cellId)
          Method to insert a manhattan rectangle into the vector cache for a Cell.
 void addInstanceToCell(double lX, double lY, double hX, double hY, CellId cellId)
          Method to insert a manhattan rectangle into the vector cache for a Cell.
 void clearCache()
          Method called when it is necessary to clear cache.
 void clearFadeImages()
          Method called when visible layers have changed.
static VectorCache.VectorBase[] drawNode(NodeInst ni)
           
static VectorCache.VectorBase[] drawPolys(Poly[] polys)
           
 java.util.Set<CellId> forceRedrawAfterChange(java.util.Set<CellId> topCells)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG

theCache

public static final VectorCache theCache

database

public final EDatabase database
database to work.


shapeByLayer

public static java.util.Comparator<VectorCache.VectorBase> shapeByLayer
Comparator class for sorting VectorBase objects by their layer depth.

Constructor Detail

VectorCache

public VectorCache(EDatabase database)
Creates a new instance of VectorCache

Method Detail

drawNode

public static VectorCache.VectorBase[] drawNode(NodeInst ni)

drawPolys

public static VectorCache.VectorBase[] drawPolys(Poly[] polys)

addBoxToCell

public void addBoxToCell(double lX,
                         double lY,
                         double hX,
                         double hY,
                         Layer layer,
                         CellId cellId)
Method to insert a manhattan rectangle into the vector cache for a Cell.

Parameters:
lX - the low X of the manhattan rectangle.
lY - the low Y of the manhattan rectangle.
hX - the high X of the manhattan rectangle.
hY - the high Y of the manhattan rectangle.
layer - the layer on which to draw the rectangle.
cellId - the Cell in which to insert the rectangle.

addInstanceToCell

public void addInstanceToCell(double lX,
                              double lY,
                              double hX,
                              double hY,
                              CellId cellId)
Method to insert a manhattan rectangle into the vector cache for a Cell.

Parameters:
lX - the low X of the manhattan rectangle.
lY - the low Y of the manhattan rectangle.
hX - the high X of the manhattan rectangle.
hY - the high Y of the manhattan rectangle.
cellId - the Cell in which to insert the rectangle.

forceRedrawAfterChange

public java.util.Set<CellId> forceRedrawAfterChange(java.util.Set<CellId> topCells)

clearCache

public void clearCache()
Method called when it is necessary to clear cache.


clearFadeImages

public void clearFadeImages()
Method called when visible layers have changed. Removes all "greeked images" from cached cells.