All Packages Class Hierarchy This Package Previous Next Index
Class fix.MenuBarPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----fix.MenuBarPanel
- public class MenuBarPanel
- extends Panel
This class is a Panel that encapsulates and acts like a MenuBar.
The MenuBar can have multiple menus, and each of
them can contain other menus as menu items. The
MenuBarPanel is a Panel, and so can be added
to any Container, and the user will still be able
to click on it and see it behave like a menubar.
This code is (c) 1998 Leemon Baird
<leemon@cs.cmu.edu>,
http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely.
If the code is modified, please state so in the comments.
- Version:
- 1.0 22 June 98
- Author:
- Leemon Baird
-
popup
- popup menu used to implement each menu
-
MenuBarPanel(MenuBar)
- given a menubar, this returns a panel that acts like an equivalent menubar
-
getMaximumSize()
-
-
getMinimumSize()
-
-
getPreferredSize()
-
-
handleEvent(Event)
-
-
menuBarToChoice(Panel, MenuBar)
- convert a menubar into an equivalent Panel filled with
a Choice corresponding to each menu.
-
paint(Graphics)
-
popup
public PopupMenu popup[]
- popup menu used to implement each menu
MenuBarPanel
public MenuBarPanel(MenuBar mb)
- given a menubar, this returns a panel that acts like an equivalent menubar
getMinimumSize
public Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class Container
getMaximumSize
public Dimension getMaximumSize()
- Overrides:
- getMaximumSize in class Container
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Container
paint
public void paint(Graphics g)
- Overrides:
- paint in class Container
handleEvent
public boolean handleEvent(Event e)
- Overrides:
- handleEvent in class Component
menuBarToChoice
public void menuBarToChoice(Panel p,
MenuBar mb)
- convert a menubar into an equivalent Panel filled with
a Choice corresponding to each menu.
All Packages Class Hierarchy This Package Previous Next Index