java.lang.Object
gnu.java.awt.peer.gtk.GtkGenericPeer
gnu.java.awt.peer.gtk.GtkMenuComponentPeer
gnu.java.awt.peer.gtk.GtkMenuBarPeer
- All Implemented Interfaces:
- java.awt.peer.MenuBarPeer, java.awt.peer.MenuComponentPeer
- public class GtkMenuBarPeer
- extends GtkMenuComponentPeer
- implements java.awt.peer.MenuBarPeer
|
Field Summary |
private boolean |
hasHelpMenu
Whether we already have an help menu set on this peer. |
|
Method Summary |
void |
addHelpMenu(java.awt.Menu menu)
Adds a help menu to this MenuBar. |
private void |
addMenu(GtkMenuPeer menu)
Adds a new GtkMenuPeer to the end of the GtkMenuBarPeer. |
void |
addMenu(java.awt.Menu m)
Adds the GtkMenuPeer associated with the Menu to this
GtkMenuBarPeer. |
protected void |
create()
Creates the gtk+ widget for this peer and puts it in the nsa
table. |
void |
delMenu(int index)
Deletes the menu at (zero-based) index from this GtkMenuBar. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hasHelpMenu
private boolean hasHelpMenu
- Whether we already have an help menu set on this peer.
GtkMenuBarPeer
public GtkMenuBarPeer(java.awt.MenuBar menubar)
- Creates a new GtkMenuBarPeer associated with the given MenuBar.
create
protected void create()
- Creates the gtk+ widget for this peer and puts it in the nsa
table. Called from the (super class) constructor.
- Specified by:
create in class GtkMenuComponentPeer
addMenu
private void addMenu(GtkMenuPeer menu)
- Adds a new GtkMenuPeer to the end of the GtkMenuBarPeer.
addHelpMenu
public void addHelpMenu(java.awt.Menu menu)
- Adds a help menu to this MenuBar. Gnome styleguides say the help
menu is just the last item in the menubar (they are NOT right
justified).
- Specified by:
addHelpMenu in interface java.awt.peer.MenuBarPeer
delMenu
public void delMenu(int index)
- Deletes the menu at (zero-based) index from this GtkMenuBar.
- Specified by:
delMenu in interface java.awt.peer.MenuBarPeer
addMenu
public void addMenu(java.awt.Menu m)
- Adds the GtkMenuPeer associated with the Menu to this
GtkMenuBarPeer. Makes sure that any help menus keep the last menu
on the bar.
- Specified by:
addMenu in interface java.awt.peer.MenuBarPeer