Class OnBaseWindow

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----OnBaseWindow

public abstract class OnBaseWindow
extends Applet
implements PopupTriggerListener
OnBase GUI parent applet window. This class is the parent of all OnBase applet windows. It defines the common OnBase GUI, namely, a popup menu. The items of this popup menu are specified by implementing the abstract method makePopupMenu. As usual for an applet subclass, this class implements the init method and has no user defined constructor. The other concrete public methods of this class implement the PopupTriggerListener interface. Java 1.1 Implementation

See Also:
makePopupMenu, PopupTriggerListener, PopupTriggerAdapter, Applet

Variable Index

 o popupMenu
The popup menu which is the the common OnBase GUI.

Constructor Index

 o OnBaseWindow()

Method Index

 o addPopupTriggerListener(PopupTriggerListener)
Adds the specified popup menu trigger listener to receive mouse events from this component.
 o buildMenu(Object, Object[], Object)
Builds a menu from a list of menu items.
 o init()
Define the popup menu.
 o makePopupMenu(PopupMenu)
Makes the OnBase GUI popup menu.
 o mouseClicked(MouseEvent)
One of three mouse events that can be a popup menu trigger.
 o mouseEntered(MouseEvent)
Empty implementation.
 o mouseExited(MouseEvent)
Empty implementation.
 o mousePressed(MouseEvent)
One of three mouse events that can be a popup menu trigger.
 o mouseReleased(MouseEvent)
One of three mouse events that can be a popup menu trigger.
 o popupMenuTriggered(MouseEvent)
Invoked when a mouse button action is a popup menu trigger.
 o removePopupTriggerListener(PopupTriggerListener)
Removes the specified popup menu trigger listener so that it no longer receives mouse events from this component.

Variables

 o popupMenu
 protected PopupMenu popupMenu
The popup menu which is the the common OnBase GUI.

See Also:
PopupTriggerListener, makePopupMenu

Constructors

 o OnBaseWindow
 public OnBaseWindow()

Methods

 o makePopupMenu
 protected abstract void makePopupMenu(PopupMenu popup)
Makes the OnBase GUI popup menu. This method is overridden in subclasses. The implementation should instantiate MenuItems, add them to the OnBaseWindow applet, and optionally add appropriate Listeners to the MenuItems. The static method buildMenu can assist in the implementation.

Parameters:
popup - the PopupMenu to make.
See Also:
buildMenu
 o addPopupTriggerListener
 public void addPopupTriggerListener(PopupTriggerListener l)
Adds the specified popup menu trigger listener to receive mouse events from this component.

Parameters:
l - the popup menu trigger listener.
See Also:
PopupTriggerListener, MouseEvent, MouseListener, removePopupTriggerListener
 o init
 public void init()
Define the popup menu. In lieu of a user defined constructor.

Overrides:
init in class Applet
See Also:
Applet, PopupTriggerListener, makePopupMenu
 o mouseClicked
 public void mouseClicked(MouseEvent e)
One of three mouse events that can be a popup menu trigger.

See Also:
PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
 o mouseEntered
 public void mouseEntered(MouseEvent e)
Empty implementation. Required by the popup menu trigger listener interface.

See Also:
PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
 o mouseExited
 public void mouseExited(MouseEvent e)
Empty implementation. Required by the popup menu trigger listener interface.

See Also:
PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
 o mousePressed
 public void mousePressed(MouseEvent e)
One of three mouse events that can be a popup menu trigger.

See Also:
PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
 o mouseReleased
 public void mouseReleased(MouseEvent e)
One of three mouse events that can be a popup menu trigger.

See Also:
PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
 o popupMenuTriggered
 public void popupMenuTriggered(MouseEvent e)
Invoked when a mouse button action is a popup menu trigger.

See Also:
PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
 o removePopupTriggerListener
 public void removePopupTriggerListener(PopupTriggerListener l)
Removes the specified popup menu trigger listener so that it no longer receives mouse events from this component.

Parameters:
l - the popup menu trigger listener.
See Also:
PopupTriggerListener, MouseEvent, MouseListener, addPopupTriggerListener
 o buildMenu
 protected static Menu buildMenu(Object parent,
                                 Object items[],
                                 Object target)
Builds a menu from a list of menu items. Optional listeners are added to mandatory menu items that are added to a menu. Presently only one listener is allowed; this should be updated. Based on the book Core Java 1.1 pages 329-331.

Parameters:
parent - a Menu or a String that will be the label of an instantiated Menu to which items are added.
items - an array of CheckboxMenuItems, MenuItems, Strings that will be the label of instantiated MenuItems, or nulls that will become menu Separators; all of which will be added to the parent menu. //@param targets an array of ActionListeners or ItemListeners that
targets - an ActionListener or an ItemListener that will be added to the corresponding items.
Returns:
the constructed menu.
Throws: IllegalArgumentException
if parent or items is not valid.