com.sun.electric.tool.user.ui
Class ToolBar.EToolBarButton

java.lang.Object
  extended by com.sun.electric.tool.user.menus.EMenuItem
      extended by com.sun.electric.tool.user.ui.ToolBar.EToolBarButton
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Direct Known Subclasses:
ToolBar.EToolBarGeneralMenuButton, ToolBar.SelectModeButton
Enclosing class:
ToolBar

public abstract static class ToolBar.EToolBarButton
extends EMenuItem

Generic tool bar button.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.tool.user.menus.EMenuItem
EMenuItem.CheckBox
 
Field Summary
 
Fields inherited from class com.sun.electric.tool.user.menus.EMenuItem
NULL_ARRAY, SEPARATOR
 
Method Summary
 javax.swing.AbstractButton genToolBarButton()
          Generates tool bar button item by this this generic EToolBarButton
 javax.swing.ImageIcon getIcon()
          Method to return the icon associated with this button.
 java.lang.String getMenuName()
          Method to return the name of the menu entry associated with this button.
protected  void registerItem()
          Register this menu item in EMenuBar.
 void setIcon(javax.swing.ImageIcon i, java.lang.String path)
          Method to set the icon associated with this button.
protected  void updateButtons()
          Updates GUI buttons after change of state of generic button.
 
Methods inherited from class com.sun.electric.tool.user.menus.EMenuItem
actionPerformed, createMenuItem, getDescription, getMnemonicChar, getPath, getText, getToolTipText, isEnabled, isSelected, registerUpdatable, repeatLastCommand, run, shortcut, shortcut, toString, updateMenuItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getMenuName

public java.lang.String getMenuName()
Method to return the name of the menu entry associated with this button.

Returns:
the name of the menu entry associated with this button.

getIcon

public javax.swing.ImageIcon getIcon()
Method to return the icon associated with this button.

Returns:
the icon associated with this button.

setIcon

public void setIcon(javax.swing.ImageIcon i,
                    java.lang.String path)
Method to set the icon associated with this button.

Parameters:
i - the new icon associated with this button.
path - the full path to the icon file.

genToolBarButton

public javax.swing.AbstractButton genToolBarButton()
Generates tool bar button item by this this generic EToolBarButton

Returns:
generated instance.

registerItem

protected void registerItem()
Description copied from class: EMenuItem
Register this menu item in EMenuBar.

Overrides:
registerItem in class EMenuItem

updateButtons

protected void updateButtons()
Description copied from class: EMenuItem
Updates GUI buttons after change of state of generic button. Override in subclasses.

Overrides:
updateButtons in class EMenuItem