com.sun.electric.tool.user
Class CircuitChangeJobs

java.lang.Object
  extended by com.sun.electric.tool.user.CircuitChangeJobs

public class CircuitChangeJobs
extends java.lang.Object

Class for Jobs that make changes to the circuit.


Nested Class Summary
static class CircuitChangeJobs.AlignNodes
           
static class CircuitChangeJobs.AlignObjects
          This class implement the command to align objects to the grid.
static class CircuitChangeJobs.ChangeArcEnum
          ARC MODIFICATION
static class CircuitChangeJobs.ChangeArcProperties
           
static class CircuitChangeJobs.CheckAndRepairJob
          This class implement the command to repair libraries.
static class CircuitChangeJobs.CleanupChanges
          This class implements the changes needed to cleanup pins in a Cell.
static class CircuitChangeJobs.ClearCellLocked
          This class clears a cell lock bit in a Job.
static class CircuitChangeJobs.ClearNodeLocked
          This class clears a node lock bit in a Job.
static class CircuitChangeJobs.DeleteArcs
           
static class CircuitChangeJobs.DeleteSelected
          DELETE SELECTED OBJECTS
static class CircuitChangeJobs.DeleteSelectedGeometry
           
static class CircuitChangeJobs.ManyMove
          MOVE SELECTED OBJECTS
static class CircuitChangeJobs.Reconnect
          This class handles deleting pins that are between two arcs, and reconnecting the arcs without the pin.
static class CircuitChangeJobs.ReloadLibraryJob
          This class implement the command to reload a library
static class CircuitChangeJobs.RenameLibrary
          This class implement the command to rename a library.
static class CircuitChangeJobs.RenameTechnology
          This class implement the command to rename a technology.
static class CircuitChangeJobs.RipTheBus
           
static class CircuitChangeJobs.RotateSelected
          NODE TRANSFORMATION
static class CircuitChangeJobs.ShortenArcs
          This class implements the changes needed to shorten selected arcs.
static class CircuitChangeJobs.ToggleNegationJob
           
 
Method Summary
static int cantEdit(Cell cell, NodeInst item, boolean giveError, boolean allowInstanceChange, boolean insideJob)
          Method to tell whether a NodeInst can be modified in a cell.
static void eraseObjectsInList(Cell cell, java.util.List<Geometric> list, boolean reconstructArcsAndExports, java.util.Set<ElectricObject> stuffToHighlight)
          Method to delete all of the Geometrics in a list.
static java.util.List<CircuitChangeJobs.Reconnect> getPinsToPassThrough(Cell cell)
           
static void inheritAttributes(NodeInst ni)
          Method to inherit all prototype attributes down to instance "ni".
static void inheritCellParameter(Variable var, NodeInst ni)
          Method to add parameter "var" to instance "ni".
static void markAllLibrariesForSavingCommand()
          Method to implement the "Mark All Libraries for Saving" command.
static void markCurrentLibForSavingCommand()
          Method to implement the "Mark All Libraries for Saving" command.
static NodeInst replaceNodeInst(NodeInst oldNi, NodeProto newNp, boolean ignorePortNames, boolean allowMissingPorts)
          Method to replace node "oldNi" with a new one of type "newNp" and return the new node.
static void spreadCircuitry(Cell cell, NodeInst ni, char direction, double amount, double lX, double hX, double lY, double hY)
          Method to spread circuitry.
static void testEditable(Cell cell, NodeInst item, boolean giveError, boolean allowInstanceChange)
          Method to test whether a NodeInst can be modified in a cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

eraseObjectsInList

public static void eraseObjectsInList(Cell cell,
                                      java.util.List<Geometric> list,
                                      boolean reconstructArcsAndExports,
                                      java.util.Set<ElectricObject> stuffToHighlight)
Method to delete all of the Geometrics in a list.

Parameters:
cell - the cell with the objects to be deleted.
list - a List of Geometric or Highlight objects to be deleted.
reconstructArcsAndExports - true to reconstruct arcs to deleted cell instances.
stuffToHighlight - a set of objects to select (arcs and exports) if reconstruction is done.

getPinsToPassThrough

public static java.util.List<CircuitChangeJobs.Reconnect> getPinsToPassThrough(Cell cell)

spreadCircuitry

public static void spreadCircuitry(Cell cell,
                                   NodeInst ni,
                                   char direction,
                                   double amount,
                                   double lX,
                                   double hX,
                                   double lY,
                                   double hY)
Method to spread circuitry.

Parameters:
cell - the cell in which spreading happens.
ni - the NodeInst about which spreading happens (may be null).
direction - the direction to spread: 'u' for up, 'd' for down, 'l' for left, 'r' for right.
amount - the distance to spread (negative values compact).
lX - the low X bound of the node (the edge of spreading).
hX - the high X bound of the node (the edge of spreading).
lY - the low Y bound of the node (the edge of spreading).
hY - the high Y bound of the node (the edge of spreading).

replaceNodeInst

public static NodeInst replaceNodeInst(NodeInst oldNi,
                                       NodeProto newNp,
                                       boolean ignorePortNames,
                                       boolean allowMissingPorts)
Method to replace node "oldNi" with a new one of type "newNp" and return the new node. Also removes any node-specific variables.


inheritAttributes

public static void inheritAttributes(NodeInst ni)
Method to inherit all prototype attributes down to instance "ni".


inheritCellParameter

public static void inheritCellParameter(Variable var,
                                        NodeInst ni)
Method to add parameter "var" to instance "ni".


markAllLibrariesForSavingCommand

public static void markAllLibrariesForSavingCommand()
Method to implement the "Mark All Libraries for Saving" command.


markCurrentLibForSavingCommand

public static void markCurrentLibForSavingCommand()
Method to implement the "Mark All Libraries for Saving" command.


testEditable

public static void testEditable(Cell cell,
                                NodeInst item,
                                boolean giveError,
                                boolean allowInstanceChange)
                         throws CantEditException
Method to test whether a NodeInst can be modified in a cell. Throws an exception if not.

Parameters:
cell - the Cell in which the NodeInst resides.
item - the NodeInst (may be null).
giveError - true to print an error message if the modification is disallowed.
allowInstanceChange - true to allow a change to an instance when instances are locked (this allows exports to be created and deleted).
Throws:
CantEditException

cantEdit

public static int cantEdit(Cell cell,
                           NodeInst item,
                           boolean giveError,
                           boolean allowInstanceChange,
                           boolean insideJob)
Method to tell whether a NodeInst can be modified in a cell. WARNING: method may change the database if the user disables a cell lock, so method must be called inside of a Change job.

Parameters:
cell - the Cell in which the NodeInst resides.
item - the NodeInst (may be null).
giveError - true to print an error message if the modification is disallowed.
allowInstanceChange - true to allow a change to an instance when instances are locked (this allows exports to be created and deleted).
insideJob - true if this is being run inside of a job.
Returns:
positive if the edit CANNOT be done. Return negative if the edit CANNOT be done and the overall operation should be cancelled. Return zero if the operation CAN be done.