com.sun.electric.tool.user.menus
Class MenuCommands

java.lang.Object
  extended by com.sun.electric.tool.user.menus.MenuCommands

public final class MenuCommands
extends java.lang.Object

This class has all of the pulldown menu commands in Electric.

For SDI mode Swing requires that each window have it's own menu. This means for consistency across windows that a change of state on a menu item in one window's menu must occur in all other window's menus as well (such as checking a check box).


Method Summary
static java.util.List<ArcInst> getSelectedArcs()
          Get list of ArcInsts of what's currently selected by the user, in the window that has focus.
static java.util.List<NodeInst> getSelectedNodes()
          Get list of NodeInsts of what's currently selected by the user, in the window that has focus.
static java.util.List<Geometric> getSelectedObjects(boolean wantNodes, boolean wantArcs)
          Get list of ElectricObjects of what's currently selected by the user, in the window that has focus.
static EMenuBar menuBar()
          Method to create the pulldown menus.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

menuBar

public static EMenuBar menuBar()
Method to create the pulldown menus.


getSelectedObjects

public static java.util.List<Geometric> getSelectedObjects(boolean wantNodes,
                                                           boolean wantArcs)
Get list of ElectricObjects of what's currently selected by the user, in the window that has focus.

Parameters:
wantNodes - true if the list should include nodes
wantArcs - true if the list should include arcs
Returns:
a list of selected objects

getSelectedNodes

public static java.util.List<NodeInst> getSelectedNodes()
Get list of NodeInsts of what's currently selected by the user, in the window that has focus.

Returns:
a list of selected NodeInsts

getSelectedArcs

public static java.util.List<ArcInst> getSelectedArcs()
Get list of ArcInsts of what's currently selected by the user, in the window that has focus.

Returns:
a list of selected ArcInsts