com.isti.util.menu
Class IstiMenuHandler

java.lang.Object
  extended by com.isti.util.menu.IstiMenuHandler
All Implemented Interfaces:
IstiMenuListener, java.awt.event.ActionListener, java.awt.event.ItemListener, java.util.EventListener

public class IstiMenuHandler
extends java.lang.Object
implements IstiMenuListener, java.awt.event.ActionListener, java.awt.event.ItemListener

Class IstiMenuHandler implements a Menu Handler for menu actions.


Constructor Summary
IstiMenuHandler()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This method is called when a MenuItem is activated.
 boolean isMenuItemSelected(java.lang.Object menuItem)
          This method is called when a MenuItem is instantiated.
 boolean isMenuItemSelected(java.lang.String name, java.lang.String displayText)
          This method is called when a MenuItem is instantiated.
 void itemStateChanged(java.awt.event.ItemEvent e)
          This method is called when a MenuItem state is changed.
protected  void processMenuItemEvent(java.awt.AWTEvent e)
          This method is called when a MenuItem event happens.
 void processMenuItemEvent(java.lang.String name, java.lang.String displayText, boolean isSelected, java.awt.AWTEvent e)
          This method is called when a MenuItem event happens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IstiMenuHandler

public IstiMenuHandler()
Method Detail

processMenuItemEvent

public void processMenuItemEvent(java.lang.String name,
                                 java.lang.String displayText,
                                 boolean isSelected,
                                 java.awt.AWTEvent e)
This method is called when a MenuItem event happens.

Specified by:
processMenuItemEvent in interface IstiMenuListener
Parameters:
name - the name of the menu item.
displayText - the display text for the menu item.
isSelected - true if the menu item is selected.
e - the AWTEvent. OVERRIDE this function to process menu item events.

isMenuItemSelected

public boolean isMenuItemSelected(java.lang.String name,
                                  java.lang.String displayText)
This method is called when a MenuItem is instantiated.

Specified by:
isMenuItemSelected in interface IstiMenuListener
Parameters:
name - the name of the menu item.
displayText - the display text for the menu item.
Returns:
true if the menu item should be initially selected. OVERRIDE this function if you want to set the default for a menu item to be selected.

isMenuItemSelected

public boolean isMenuItemSelected(java.lang.Object menuItem)
This method is called when a MenuItem is instantiated.

Specified by:
isMenuItemSelected in interface IstiMenuListener
Parameters:
menuItem - the menu item.
Returns:
true if the menu item should be initially selected.

processMenuItemEvent

protected void processMenuItemEvent(java.awt.AWTEvent e)
This method is called when a MenuItem event happens.

Parameters:
e - the AWTEvent.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
This method is called when a MenuItem is activated.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the ActionEvent.

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
This method is called when a MenuItem state is changed.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - the ItemEvent.