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
-
popupMenu
- The popup menu which is the the common OnBase GUI.
-
OnBaseWindow()
-
-
addPopupTriggerListener(PopupTriggerListener)
- Adds the specified popup menu trigger listener to receive
mouse events from this component.
-
buildMenu(Object, Object[], Object)
- Builds a menu from a list of menu items.
-
init()
- Define the popup menu.
-
makePopupMenu(PopupMenu)
- Makes the OnBase GUI popup menu.
-
mouseClicked(MouseEvent)
- One of three mouse events that can be a popup menu trigger.
-
mouseEntered(MouseEvent)
- Empty implementation.
-
mouseExited(MouseEvent)
- Empty implementation.
-
mousePressed(MouseEvent)
- One of three mouse events that can be a popup menu trigger.
-
mouseReleased(MouseEvent)
- One of three mouse events that can be a popup menu trigger.
-
popupMenuTriggered(MouseEvent)
- Invoked when a mouse button action is a popup menu trigger.
-
removePopupTriggerListener(PopupTriggerListener)
- Removes the specified popup menu trigger listener so that it no longer
receives mouse events from this component.
popupMenu
protected PopupMenu popupMenu
- The popup menu which is the the common OnBase GUI.
- See Also:
- PopupTriggerListener, makePopupMenu
OnBaseWindow
public OnBaseWindow()
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
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
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
mouseClicked
public void mouseClicked(MouseEvent e)
- One of three mouse events that can be a popup menu trigger.
- See Also:
- PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
mouseEntered
public void mouseEntered(MouseEvent e)
- Empty implementation.
Required by the popup menu trigger listener interface.
- See Also:
- PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
mouseExited
public void mouseExited(MouseEvent e)
- Empty implementation.
Required by the popup menu trigger listener interface.
- See Also:
- PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
mousePressed
public void mousePressed(MouseEvent e)
- One of three mouse events that can be a popup menu trigger.
- See Also:
- PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
mouseReleased
public void mouseReleased(MouseEvent e)
- One of three mouse events that can be a popup menu trigger.
- See Also:
- PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
popupMenuTriggered
public void popupMenuTriggered(MouseEvent e)
- Invoked when a mouse button action is a popup menu trigger.
- See Also:
- PopupTriggerListener, PopupTriggerAdapter, MouseListener, MouseEvent
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
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.