ix.iface.ui
Class IXToolItem

java.lang.Object
  extended by ix.iface.ui.IXToolItem

public class IXToolItem
extends java.lang.Object

A toolbar button that is not necessarily shown


Constructor Summary
IXToolItem(javax.swing.JMenu parentMenu, java.awt.event.ActionListener al, java.lang.String command, java.lang.String label, char mnemo, java.lang.String toolTip)
          As above with mnemo.
IXToolItem(javax.swing.JMenu parentMenu, java.awt.event.ActionListener al, java.lang.String command, java.lang.String label, java.lang.String toolTip)
          Creates an object that holds information for a menu item only.
IXToolItem(javax.swing.JMenu parentMenu, javax.swing.JToolBar bar, java.awt.event.ActionListener al, java.lang.String command, java.lang.String label, javax.swing.Icon icon, char mnemo, java.lang.String toolTip)
          As above with mnemo.
IXToolItem(javax.swing.JMenu parentMenu, javax.swing.JToolBar bar, java.awt.event.ActionListener al, java.lang.String command, java.lang.String label, javax.swing.Icon icon, java.lang.String toolTip)
          Creates an object that holds information for a menu item and a toolbar button.
IXToolItem(javax.swing.JMenu parentMenu, javax.swing.JToolBar bar, java.awt.event.ActionListener al, java.lang.String command, java.lang.String label, java.lang.String buttonLabel, javax.swing.Icon icon, char mnemo, java.lang.String toolTip)
          As above with mnemo.
IXToolItem(javax.swing.JMenu parentMenu, javax.swing.JToolBar bar, java.awt.event.ActionListener al, java.lang.String command, java.lang.String label, java.lang.String buttonLabel, javax.swing.Icon icon, java.lang.String toolTip)
          Creates an object that holds information for a menu item and a toolbar button with a seperate button label.
IXToolItem(javax.swing.JToolBar bar, java.awt.event.ActionListener al, java.lang.String command, java.lang.String label, javax.swing.Icon icon, java.lang.String toolTip)
          Creates an object that holds information for a toolbar button only.
 
Method Summary
 javax.swing.JCheckBoxMenuItem ensureCheckItem()
           
 void hide()
           
 void hideButton()
          hides the button from its toolbar.
 void hideItem()
          hides the button from its toolbar.
 javax.swing.JCheckBoxMenuItem makeCheckItem()
           
 javax.swing.JMenuItem makeItem()
           
 javax.swing.JRadioButtonMenuItem makeRadioItem()
           
 javax.swing.JToggleButton makeRadioTool()
           
 void setActionListener(java.awt.event.ActionListener al)
           
 void setButtonLabel(java.lang.String label)
           
 void setEnabled(boolean enabled)
           
 void setIcon(javax.swing.Icon icon)
           
 void setItemLabel(java.lang.String label)
           
 void setLabel(java.lang.String label)
           
 void setMenu(javax.swing.JMenu menu)
          Sets the item's menu ONLY if the current menu is null.
 void setToolTip(java.lang.String text)
           
 javax.swing.JMenuItem show()
          Creates a button (if necessary) and shows it on its toolbar.
 javax.swing.AbstractButton showButton()
          Creates a button (if necessary) and shows it on its toolbar.
 void showButtonText(boolean show)
           
 javax.swing.JMenuItem showItem()
          Creates a button (if necessary) and shows it on its toolbar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IXToolItem

public IXToolItem(javax.swing.JMenu parentMenu,
                  java.awt.event.ActionListener al,
                  java.lang.String command,
                  java.lang.String label,
                  java.lang.String toolTip)
Creates an object that holds information for a menu item only. The information held is parentMenu, command, listener, label, toolTip. Does not create the menu item.


IXToolItem

public IXToolItem(javax.swing.JMenu parentMenu,
                  java.awt.event.ActionListener al,
                  java.lang.String command,
                  java.lang.String label,
                  char mnemo,
                  java.lang.String toolTip)
As above with mnemo.


IXToolItem

public IXToolItem(javax.swing.JMenu parentMenu,
                  javax.swing.JToolBar bar,
                  java.awt.event.ActionListener al,
                  java.lang.String command,
                  java.lang.String label,
                  javax.swing.Icon icon,
                  java.lang.String toolTip)
Creates an object that holds information for a menu item and a toolbar button. The information held is as above and toolbar, icon. Does not create menu item or button.


IXToolItem

public IXToolItem(javax.swing.JMenu parentMenu,
                  javax.swing.JToolBar bar,
                  java.awt.event.ActionListener al,
                  java.lang.String command,
                  java.lang.String label,
                  javax.swing.Icon icon,
                  char mnemo,
                  java.lang.String toolTip)
As above with mnemo.


IXToolItem

public IXToolItem(javax.swing.JMenu parentMenu,
                  javax.swing.JToolBar bar,
                  java.awt.event.ActionListener al,
                  java.lang.String command,
                  java.lang.String label,
                  java.lang.String buttonLabel,
                  javax.swing.Icon icon,
                  java.lang.String toolTip)
Creates an object that holds information for a menu item and a toolbar button with a seperate button label. The information held is as above and button label. Does not create menu item or button.


IXToolItem

public IXToolItem(javax.swing.JMenu parentMenu,
                  javax.swing.JToolBar bar,
                  java.awt.event.ActionListener al,
                  java.lang.String command,
                  java.lang.String label,
                  java.lang.String buttonLabel,
                  javax.swing.Icon icon,
                  char mnemo,
                  java.lang.String toolTip)
As above with mnemo.


IXToolItem

public IXToolItem(javax.swing.JToolBar bar,
                  java.awt.event.ActionListener al,
                  java.lang.String command,
                  java.lang.String label,
                  javax.swing.Icon icon,
                  java.lang.String toolTip)
Creates an object that holds information for a toolbar button only. Does not create the button.

Method Detail

setActionListener

public void setActionListener(java.awt.event.ActionListener al)

makeItem

public javax.swing.JMenuItem makeItem()

makeRadioItem

public javax.swing.JRadioButtonMenuItem makeRadioItem()

makeCheckItem

public javax.swing.JCheckBoxMenuItem makeCheckItem()

makeRadioTool

public javax.swing.JToggleButton makeRadioTool()

ensureCheckItem

public javax.swing.JCheckBoxMenuItem ensureCheckItem()

show

public javax.swing.JMenuItem show()
Creates a button (if necessary) and shows it on its toolbar.


showItem

public javax.swing.JMenuItem showItem()
Creates a button (if necessary) and shows it on its toolbar.


showButton

public javax.swing.AbstractButton showButton()
Creates a button (if necessary) and shows it on its toolbar.


hide

public void hide()

hideButton

public void hideButton()
hides the button from its toolbar.


hideItem

public void hideItem()
hides the button from its toolbar.


showButtonText

public void showButtonText(boolean show)

setIcon

public void setIcon(javax.swing.Icon icon)

setLabel

public void setLabel(java.lang.String label)

setItemLabel

public void setItemLabel(java.lang.String label)

setButtonLabel

public void setButtonLabel(java.lang.String label)

setToolTip

public void setToolTip(java.lang.String text)

setEnabled

public void setEnabled(boolean enabled)

setMenu

public void setMenu(javax.swing.JMenu menu)
Sets the item's menu ONLY if the current menu is null.