org.gnu.gnome
Class App

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gtk.GtkObject
              extended by org.gnu.gtk.Widget
                  extended by org.gnu.gtk.Container
                      extended by org.gnu.gtk.Bin
                          extended by org.gnu.gtk.Window
                              extended by org.gnu.gnome.App

public class App
extends org.gnu.gtk.Window

The App widget is the main window of a GNOME application. It is a container widget that can hold a single child widget. It also includes facilities for attaching menus, toolbars, a status bar, and widgets that can be docked.


Constructor Summary
App(org.gnu.glib.Handle handle)
           
App(java.lang.String appname, java.lang.String title)
          Instantiates a new Application window with the indicated name and title.
 
Method Summary
 void createMenus(UIInfo[] uiinfos)
          Construct a menu bar and attach it to the specified application window.
 void createToolBar(UIInfo[] uiinfos)
          Construct a toolbar and attach it to the specified application window.
 org.gnu.gtk.Widget error(java.lang.String error)
          Deprecated.  
 void fillMenu(org.gnu.gtk.MenuShell menuShell, UIInfo[] uiinfos, org.gnu.gtk.AccelGroup accelGroup, boolean underline, int position)
          Fills the specified MenuShell with items created from the UIInfo array, inserting them from the item number position on.
 void fillToolbar(org.gnu.gtk.ToolBar toolbar, UIInfo[] uiinfos, org.gnu.gtk.AccelGroup accelGroup)
          Fills a ToolBar with the specified UIInfos.
 void flash(java.lang.String flash)
          Deprecated.  
 org.gnu.gtk.AccelGroup getAccelGroup()
          Main accelerator group for this window (hotkeys live here).
static App getApp(org.gnu.glib.Handle handle)
          Internal static factory method to be used by Java-Gnome only.
 org.gnu.gtk.Widget getContents()
          Returns the contents of the App.
 org.gnu.gtk.Widget getDock()
          Returns the dock.
 org.gnu.gtk.MenuBar getMenuBar()
          Returns the menu bar.
 java.lang.String getName()
          Gets the name of the application.
 java.lang.String getPrefix()
          Gets the prefix for gnome-config, which is used to save the layout.
 org.gnu.gtk.StatusBar getStatusBar()
          Gets the status bar of the application windows.
static org.gnu.glib.Type getType()
          Retrieve the runtime type used by the GLib library.
 org.gnu.gtk.VBox getVBox()
          From gnome-app.hThe vbox widget that ties them.
 void insertMenu(java.lang.String path, UIInfo[] uiinfos)
          Inserts a menu in the existing app's menu structure right after the item described by path.
 void installAppBarMenuHints(AppBar appBar, UIInfo[] uiinfos)
          Activate the menu item hints, displaying in an appbar.
 void installMenuHints(UIInfo[] uiinfos)
          Activate the menu item hings, displaying in the statusbar or appbar.
 void installStatusBarMenuHints(org.gnu.gtk.StatusBar statusBar, UIInfo[] uiinfos)
          Activate the menu item hints, displaying in a statusbar.
 boolean layoutConfig()
          If true, the application uses gnome-config to retrieve and save the docking configuration automatically.
 void layoutConfig(boolean enabled)
          If true, the application uses gnome-config to retrieve and save the docking configuration automatically.
 org.gnu.gtk.Widget message(java.lang.String message)
          Deprecated.  
 void removeMenuRange(java.lang.String path, int start, int numItems)
          Removes items from the Menu.
 void removeMenus(java.lang.String path, int num)
          Removes num items from the existing app's menu structure beginning with the item described by path.
 void setContent(org.gnu.gtk.Widget contents)
          Sets the content area of the application window.
 void setMenuBar(org.gnu.gtk.MenuBar menuBar)
          Sets the menu bar of the window.
 void setStatusBar(AppBar appBar)
          Sets the status bar of the application window.
 void setStatusBar(AppBar appBar, org.gnu.gtk.Container container)
          Sets the status bar of the application window, but uses the given container widget rather than creating a new one.
 void setStatusBar(org.gnu.gtk.StatusBar statusBar)
          Sets the status bar of the application window.
 void setStatusBar(org.gnu.gtk.StatusBar statusBar, org.gnu.gtk.Container container)
          Sets the status bar of the application window, but uses the given container widget rather than creating a new one.
 void setToolBar(org.gnu.gtk.ToolBar toolBar)
          Sets the tool bar of the window.
 org.gnu.gtk.Widget warning(java.lang.String warning)
          Deprecated.  
 
Methods inherited from class org.gnu.gtk.Window
addAccelGroup, deiconify, destroy, fullscreen, getAcceptFocus, getDefaultIconList, getFocusOnMap, getFocusWidget, getGravity, getIcon, getIconList, getIconName, getPosition, getScreen, getSize, getSkipPagerHint, getSkipTaskbarHint, getTitle, getTransientParent, getWindow, hasToplevelFocus, iconify, isActive, isDestroyed, listToplevelWindows, maximize, move, present, removeAccelGroup, resize, setAcceptFocus, setAutoStartupNotification, setDecorated, setDefaultIcon, setDefaultIconFromFile, setDefaultIconList, setDefaultIconName, setDefaultSize, setDefaultWidget, setFocusOnMap, setFocusWidget, setGeometryHints, setGravity, setIcon, setIconFromFile, setIconList, setIconName, setKeepAbove, setKeepBelow, setModal, setPosition, setResizable, setScreen, setSkipPagerHint, setSkipTaskbarHint, setTitle, setTransientParent, stick, unfullscreen, unmaximize, unstick
 
Methods inherited from class org.gnu.gtk.Bin
getChild
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBorderWidth, getChildren, getEventListenerClass, getEventType, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getAllocation, getCanFocus, getColormap, getContext, getData, getDisplay, getDragData, getExtensionEvents, getModifierStyle, getParent, getParentWindow, getPointer, getRootWindow, getSensitive, getStyle, getToplevel, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setCanFocus, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight
 
Methods inherited from class org.gnu.gtk.GtkObject
sink
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

App

public App(java.lang.String appname,
           java.lang.String title)
Instantiates a new Application window with the indicated name and title.

Parameters:
appname - The name of the application.
title - The title of the application window. The title can be null, in which case the window's title will not be set.

App

public App(org.gnu.glib.Handle handle)
Method Detail

getApp

public static App getApp(org.gnu.glib.Handle handle)
Internal static factory method to be used by Java-Gnome only.


getDock

public org.gnu.gtk.Widget getDock()
Returns the dock.

Returns:
The dock.

getAccelGroup

public org.gnu.gtk.AccelGroup getAccelGroup()
Main accelerator group for this window (hotkeys live here).

Returns:
The accelorator group.

getMenuBar

public org.gnu.gtk.MenuBar getMenuBar()
Returns the menu bar.

Returns:
The MenuBar.

getContents

public org.gnu.gtk.Widget getContents()
Returns the contents of the App.


getName

public java.lang.String getName()
Gets the name of the application.

Overrides:
getName in class org.gnu.gtk.Widget
Returns:
The name of the application.

getPrefix

public java.lang.String getPrefix()
Gets the prefix for gnome-config, which is used to save the layout.

Returns:
The prefix for gnome-config.

getStatusBar

public org.gnu.gtk.StatusBar getStatusBar()
Gets the status bar of the application windows.

Returns:
The status bar.

getVBox

public org.gnu.gtk.VBox getVBox()
From gnome-app.hThe vbox widget that ties them.

Returns:
The VBox.

layoutConfig

public boolean layoutConfig()
If true, the application uses gnome-config to retrieve and save the docking configuration automatically.

Returns:
True if the docking configuration is to be handled & automatically, else false.

layoutConfig

public void layoutConfig(boolean enabled)
If true, the application uses gnome-config to retrieve and save the docking configuration automatically.

Parameters:
enabled - True if the docking configuration is to be handled automatically, else false.

setContent

public void setContent(org.gnu.gtk.Widget contents)
Sets the content area of the application window.

Parameters:
contents - The widget that contains the content of the window.

setMenuBar

public void setMenuBar(org.gnu.gtk.MenuBar menuBar)
Sets the menu bar of the window.

Parameters:
menuBar - The menu bar to be used for the window.

createMenus

public void createMenus(UIInfo[] uiinfos)
Construct a menu bar and attach it to the specified application window.

Parameters:
uiinfos - An array of UIInfo objects that define the menu.

removeMenus

public void removeMenus(java.lang.String path,
                        int num)
Removes num items from the existing app's menu structure beginning with the item described by path.

Parameters:
path - The path to first item to remove.
num - The number of items to remove.

insertMenu

public void insertMenu(java.lang.String path,
                       UIInfo[] uiinfos)
Inserts a menu in the existing app's menu structure right after the item described by path.

Parameters:
path - The path to the item that preceeds the insertion.
uiinfos - An array of UIInfo objects that describe the menu to be inserted.

setToolBar

public void setToolBar(org.gnu.gtk.ToolBar toolBar)
Sets the tool bar of the window.

Parameters:
toolBar - The tool bar to be used for the window.

createToolBar

public void createToolBar(UIInfo[] uiinfos)
Construct a toolbar and attach it to the specified application window.

Parameters:
uiinfos - An array of UIInfo objects that define the toolbar.

setStatusBar

public void setStatusBar(AppBar appBar)
Sets the status bar of the application window.

Parameters:
appBar - The app bar to use for the window.

setStatusBar

public void setStatusBar(org.gnu.gtk.StatusBar statusBar)
Sets the status bar of the application window.

Parameters:
statusBar - The status bar to use for the window.

setStatusBar

public void setStatusBar(AppBar appBar,
                         org.gnu.gtk.Container container)
Sets the status bar of the application window, but uses the given container widget rather than creating a new one.

Parameters:
appBar - The app bar to use for the window.
container - The container for the status bar.

setStatusBar

public void setStatusBar(org.gnu.gtk.StatusBar statusBar,
                         org.gnu.gtk.Container container)
Sets the status bar of the application window, but uses the given container widget rather than creating a new one.

Parameters:
statusBar - The status bar to use for the window.
container - The container for the status bar.

installAppBarMenuHints

public void installAppBarMenuHints(AppBar appBar,
                                   UIInfo[] uiinfos)
Activate the menu item hints, displaying in an appbar.

Parameters:
appBar - The AppBar to install the hints.
uiinfos - An array of UIInfo objects that contain the menu items for which the hints will be created.

installStatusBarMenuHints

public void installStatusBarMenuHints(org.gnu.gtk.StatusBar statusBar,
                                      UIInfo[] uiinfos)
Activate the menu item hints, displaying in a statusbar.

Parameters:
statusBar - The StatusBar to install the hints.
uiinfos - An array of UIInfo objects that contain the menu items for which the hints will be created.

installMenuHints

public void installMenuHints(UIInfo[] uiinfos)
Activate the menu item hings, displaying in the statusbar or appbar.

Parameters:
uiinfos - An array of UIInfo objects that contain the menu items for which the hints will be created.

fillMenu

public void fillMenu(org.gnu.gtk.MenuShell menuShell,
                     UIInfo[] uiinfos,
                     org.gnu.gtk.AccelGroup accelGroup,
                     boolean underline,
                     int position)
Fills the specified MenuShell with items created from the UIInfo array, inserting them from the item number position on. The AccelGroup will be used for all newly created sub menus and servers as the global AccelGroup for all menu item hotkeys.

Parameters:
menuShell -
uiinfos -
accelGroup -
underline -
position -

fillToolbar

public void fillToolbar(org.gnu.gtk.ToolBar toolbar,
                        UIInfo[] uiinfos,
                        org.gnu.gtk.AccelGroup accelGroup)
Fills a ToolBar with the specified UIInfos.

Parameters:
toolbar -
uiinfos -
accelGroup -

removeMenuRange

public void removeMenuRange(java.lang.String path,
                            int start,
                            int numItems)
Removes items from the Menu.

Parameters:
path -
start -
numItems -

message

public org.gnu.gtk.Widget message(java.lang.String message)
Deprecated. 

Display a simple message in an OK dialog or the status bar. Requires confirmation from the user before it goes away.

Parameters:
message - The text to display.
Returns:
The dialog created or null.
See Also:
MessageDialog

flash

public void flash(java.lang.String flash)
Deprecated. 

Flash a message in the status bar for a few moments. If this app doesn't have a status bar this method will do nothing.

Parameters:
flash - The message to flash.

warning

public org.gnu.gtk.Widget warning(java.lang.String warning)
Deprecated. 

Display a not-so-important error message in an OK dialog or the status bar.

Parameters:
warning - The text to display.
Returns:
The dialog created or null.
See Also:
MessageDialog

error

public org.gnu.gtk.Widget error(java.lang.String error)
Deprecated. 

Display an important error message in an OK dialog or the status bar.

Parameters:
error - The text to display.
Returns:
The dialog created or null.
See Also:
MessageDialog

getType

public static org.gnu.glib.Type getType()
Retrieve the runtime type used by the GLib library.