com.sun.electric.tool.user
Class CircuitChanges

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

public class CircuitChanges
extends java.lang.Object

Class for user-level changes to the circuit.


Method Summary
static void alignNodes(boolean horizontal, int direction)
          Method to align the selected nodes.
static void alignToGrid()
          Method to align the selected objects to the grid.
static void arcDirectionalCommand()
          This method toggles the directionality of highlighted arcs.
static void arcFixedAngleCommand()
          This method sets the highlighted arcs to Fixed-Angle
static void arcHeadExtendCommand()
          This method sets the highlighted arcs to have their head end extended.
static void arcNotFixedAngleCommand()
          This method sets the highlighted arcs to Not-Fixed-Angle
static void arcNotRigidCommand()
          This method sets the highlighted arcs to Non-Rigid
static void arcRigidCommand()
          This method sets the highlighted arcs to Rigid
static void arcTailExtendCommand()
          This method sets the highlighted arcs to have their tail end extended.
static void checkAndRepairCommand(boolean repair)
          Method to implement the "Repair Libraries" command.
static void cleanCellRef(Cell cell)
          Method to delete cell "cell".
static void cleanupPinsCommand(boolean everywhere)
          CLEAN-UP
static void deleteArcsOnSelected(boolean both)
          Method to delete arcs connected to selected nodes.
static boolean deleteCell(Cell cell, boolean confirm, boolean quiet)
          Method to delete a cell.
static void deleteSelected()
          Method to delete all selected objects.
static void DoExpandCommands(boolean unExpand, int amount)
          Method to change the expansion of the selected instances.
static void extractCells(int depth)
          Method to yank the contents of complex node instance "topno" into its parent cell.
static void findUnusedLibraryFiles()
          Method to implement the "Find unused library files" command.
static java.util.List<Highlight2> getHighlighted()
          Get list of Highlights in current highlighter
static void graphCellsFromCell()
          Method to graph the cells, starting from the current cell.
static void graphCellsInLibrary()
          Method to graph all cells in the current Library.
static boolean isBox(java.awt.geom.Point2D[] points)
          Method to return a Rectangle that describes the orthogonal box in this Poly.
static void listLibrariesCommand()
          Method to implement the "List Libraries" command.
static void manyMove(double dX, double dY)
          Method to move the selected geometry by (dX, dY).
static void mirrorObjects(boolean horizontally)
          Method to handle the command to mirror the selected objects.
static void newVersionOfCell(Cell cell)
          MAKE A NEW VERSION OF A CELL
static void packageIntoCell()
          Method to package the selected objects into a new cell.
static void removeUnusedLayers(Library lib)
          Method to remove nodes containing metal layers that have been disabled.
static void renameCellGroupInJob(Cell.CellGroup cellGroup, java.lang.String newName)
           
static void renameCellInJob(Cell cell, java.lang.String newName)
          RENAME CELLS
static void renameCurrentTechnology()
          Method to implement the "Rename Current Technology" command.
static void renameLibrary(Library lib)
          Method to implement the "Rename Library" command.
static void ripBus()
          Method to rip the currently selected bus arc out into individual wires.
static void rotateObjects(int amount)
          Method to handle the command to rotate the selected objects by an amount.
static void shortenArcsCommand()
          Method to shorten all selected arcs.
static void showNonmanhattanCommand()
          Method to analyze the current cell and show all nonmanhattan geometry.
static void showPureLayerCommand()
          Method to highlight all pure layer nodes in the current cell.
static void showRedundantPureLayerNodes()
          Method to show all redundant pure-layer nodes in the Cell.
static void toggleNegatedCommand()
          This method sets the highlighted ports to be negated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

rotateObjects

public static void rotateObjects(int amount)
Method to handle the command to rotate the selected objects by an amount.

Parameters:
amount - the amount to rotate. If the amount is zero, prompt for an amount.

mirrorObjects

public static void mirrorObjects(boolean horizontally)
Method to handle the command to mirror the selected objects.

Parameters:
horizontally - true to mirror horizontally (about the horizontal, flipping the Y value). False to mirror vertically (about the vertical, flipping the X value).

alignToGrid

public static void alignToGrid()
Method to align the selected objects to the grid.


alignNodes

public static void alignNodes(boolean horizontal,
                              int direction)
Method to align the selected nodes.

Parameters:
horizontal - true to align them horizontally; false for vertically.
direction - if horizontal is true, meaning is 0 for left, 1 for right, 2 for center. If horizontal is false, meaning is 0 for top, 1 for bottom, 2 for center.

arcRigidCommand

public static void arcRigidCommand()
This method sets the highlighted arcs to Rigid


arcNotRigidCommand

public static void arcNotRigidCommand()
This method sets the highlighted arcs to Non-Rigid


arcFixedAngleCommand

public static void arcFixedAngleCommand()
This method sets the highlighted arcs to Fixed-Angle


arcNotFixedAngleCommand

public static void arcNotFixedAngleCommand()
This method sets the highlighted arcs to Not-Fixed-Angle


arcDirectionalCommand

public static void arcDirectionalCommand()
This method toggles the directionality of highlighted arcs.


arcHeadExtendCommand

public static void arcHeadExtendCommand()
This method sets the highlighted arcs to have their head end extended.


arcTailExtendCommand

public static void arcTailExtendCommand()
This method sets the highlighted arcs to have their tail end extended.


toggleNegatedCommand

public static void toggleNegatedCommand()
This method sets the highlighted ports to be negated.


getHighlighted

public static java.util.List<Highlight2> getHighlighted()
Get list of Highlights in current highlighter

Returns:
list of Highlights

ripBus

public static void ripBus()
Method to rip the currently selected bus arc out into individual wires.


deleteSelected

public static void deleteSelected()
Method to delete all selected objects.


deleteArcsOnSelected

public static void deleteArcsOnSelected(boolean both)
Method to delete arcs connected to selected nodes.

Parameters:
both - true if both ends of the arc must be selected.

deleteCell

public static boolean deleteCell(Cell cell,
                                 boolean confirm,
                                 boolean quiet)
Method to delete a cell.

Parameters:
cell - the cell to delete.
confirm - true to prompt the user to confirm the deletion.
quiet - true not to warn the user of the cell being used.
Returns:
true if the cell will be deleted (in a separate Job).

cleanCellRef

public static void cleanCellRef(Cell cell)
Method to delete cell "cell". Validity checks are assumed to be made (i.e. the cell is not used and is not locked).


renameCellInJob

public static void renameCellInJob(Cell cell,
                                   java.lang.String newName)
RENAME CELLS


renameCellGroupInJob

public static void renameCellGroupInJob(Cell.CellGroup cellGroup,
                                        java.lang.String newName)

graphCellsFromCell

public static void graphCellsFromCell()
Method to graph the cells, starting from the current cell.


graphCellsInLibrary

public static void graphCellsInLibrary()
Method to graph all cells in the current Library.


packageIntoCell

public static void packageIntoCell()
Method to package the selected objects into a new cell.


extractCells

public static void extractCells(int depth)
Method to yank the contents of complex node instance "topno" into its parent cell.


cleanupPinsCommand

public static void cleanupPinsCommand(boolean everywhere)
CLEAN-UP


showNonmanhattanCommand

public static void showNonmanhattanCommand()
Method to analyze the current cell and show all nonmanhattan geometry.


showPureLayerCommand

public static void showPureLayerCommand()
Method to highlight all pure layer nodes in the current cell.


shortenArcsCommand

public static void shortenArcsCommand()
Method to shorten all selected arcs. Since arcs may connect anywhere inside of the ports on nodes, a port with nonzero area will allow an arc to move freely. This command shortens selected arcs so that their endpoints arrive at the part of the node that allows the shortest arc.


showRedundantPureLayerNodes

public static void showRedundantPureLayerNodes()
Method to show all redundant pure-layer nodes in the Cell. It works only for rectangular pure-layer nodes that are inside of other (possibly nonrectangular) nodes. It works on visible layers only.


isBox

public static boolean isBox(java.awt.geom.Point2D[] points)
Method to return a Rectangle that describes the orthogonal box in this Poly.

Returns:
the Rectangle that describes this Poly. If the Poly is not an orthogonal box, returns null. IT IS NOT PERMITTED TO MODIFY THE RETURNED RECTANGLE (because it is taken from the internal bounds of the Poly).

newVersionOfCell

public static void newVersionOfCell(Cell cell)
MAKE A NEW VERSION OF A CELL


manyMove

public static void manyMove(double dX,
                            double dY)
Method to move the selected geometry by (dX, dY).


DoExpandCommands

public static void DoExpandCommands(boolean unExpand,
                                    int amount)
Method to change the expansion of the selected instances.

Parameters:
unExpand - true to unexpand the instances (draw them as black boxes), false to expand them (draw their contents).
amount - the number of levels of hierarchy to expand/unexpand. If negative, prompt for an amount.

listLibrariesCommand

public static void listLibrariesCommand()
Method to implement the "List Libraries" command.


renameCurrentTechnology

public static void renameCurrentTechnology()
Method to implement the "Rename Current Technology" command.


renameLibrary

public static void renameLibrary(Library lib)
Method to implement the "Rename Library" command.


checkAndRepairCommand

public static void checkAndRepairCommand(boolean repair)
Method to implement the "Repair Libraries" command.


findUnusedLibraryFiles

public static void findUnusedLibraryFiles()
Method to implement the "Find unused library files" command.


removeUnusedLayers

public static void removeUnusedLayers(Library lib)
Method to remove nodes containing metal layers that have been disabled. If library is null, then check all existing libraries