Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.java.awt.peer.gtk
Class GtkMenuBarPeer  view GtkMenuBarPeer download GtkMenuBarPeer.java

java.lang.Object
  extended bygnu.java.awt.peer.gtk.GtkGenericPeer
      extended bygnu.java.awt.peer.gtk.GtkMenuComponentPeer
          extended bygnu.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.
 
Fields inherited from class gnu.java.awt.peer.gtk.GtkGenericPeer
awtWidget, native_state
 
Constructor Summary
GtkMenuBarPeer(java.awt.MenuBar menubar)
          Creates a new GtkMenuBarPeer associated with the given MenuBar.
 
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 gnu.java.awt.peer.gtk.GtkMenuComponentPeer
dispose, setFont
 
Methods inherited from class gnu.java.awt.peer.gtk.GtkGenericPeer
getUniqueInteger, gtkWidgetModifyFont, gtkWidgetModifyFont, postActionEvent, printCurrentThread, q
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.peer.MenuComponentPeer
dispose, setFont
 

Field Detail

hasHelpMenu

private boolean hasHelpMenu
Whether we already have an help menu set on this peer.

Constructor Detail

GtkMenuBarPeer

public GtkMenuBarPeer(java.awt.MenuBar menubar)
Creates a new GtkMenuBarPeer associated with the given MenuBar.

Method Detail

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