|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gnu.glib.GObject | +--org.gnu.gtk.GtkObject | +--org.gnu.gtk.Widget | +--org.gnu.gtk.Container | +--org.gnu.gtk.Bin | +--org.gnu.gtk.Window | +--org.gnu.gnome.App
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(int handle)
|
|
App(java.lang.String appname,
java.lang.String title)
Instinates 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. |
Widget |
error(java.lang.String error)
Display an important error message in an OK dialog or the status bar. |
void |
flash(java.lang.String flash)
Flash a message in the status bar for a few moments. |
Widget |
getDock()
Returns the dock. |
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. |
StatusBar |
getStatusBar()
Gets the status bar of the application windows. |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
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 |
installMenuHints(UIInfo[] uiinfos)
Activate the menu item hings, displaying in the statusbar or appbar. |
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. |
Widget |
message(java.lang.String message)
Display a simple message in an OK dialog or the status bar. |
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(Widget contents)
Sets the content area of the application window. |
void |
setMenuBar(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,
Container container)
Sets the status bar of the application window, but uses the given container widget rather than creating a new one. |
void |
setStatusBar(StatusBar statusBar)
Sets the status bar of the application window. |
void |
setStatusBar(StatusBar statusBar,
Container container)
Sets the status bar of the application window, but uses the given container widget rather than creating a new one. |
void |
setToolBar(ToolBar toolBar)
Sets the tool bar of the window. |
Widget |
warning(java.lang.String warning)
Display a not-so-important error message in an OK dialog or the status bar. |
Methods inherited from class org.gnu.gtk.Window |
addAccelGroup, deiconify, getFocusWidget, getGravity, getPosition, getSize, getTitle, iconify, maximize, move, present, removeAccelGroup, resize, setDecorated, setDefaultSize, setDefaultWidget, setFocusWidget, setGeometryHints, setGravity, setIcon, setModal, setPosition, setResizable, setTitle, stick, unmaximize, unstick |
Methods inherited from class org.gnu.gtk.Bin |
getChild |
Methods inherited from class org.gnu.gtk.Container |
add, addListener, getBorderWidth, getEventListenerClass, getEventType, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode |
Methods inherited from class org.gnu.glib.GObject |
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public App(java.lang.String appname, java.lang.String title)
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.public App(int handle)
Method Detail |
public Widget getDock()
public MenuBar getMenuBar()
public java.lang.String getName()
getName
in class Widget
public java.lang.String getPrefix()
public StatusBar getStatusBar()
public VBox getVBox()
public boolean layoutConfig()
public void layoutConfig(boolean enabled)
public void setContent(Widget contents)
contents
- The widget that contains the content of the window.public void setMenuBar(MenuBar menuBar)
menuBar
- The menu bar to be used for the window.public void createMenus(UIInfo[] uiinfos)
uiinfos
- An array of UIInfo objects that define the menu.public void removeMenus(java.lang.String path, int num)
path
- The path to first item to remove.num
- The number of items to remove.public void insertMenu(java.lang.String path, UIInfo[] uiinfos)
path
- The path to the item that preceeds the insertion.uiinfos
- An array of UIInfo objects that describe the menu
to be inserted.public void setToolBar(ToolBar toolBar)
toolBar
- The tool bar to be used for the window.public void createToolBar(UIInfo[] uiinfos)
uiinfos
- An array of UIInfo objects that define the toolbar.public void setStatusBar(AppBar appBar)
appBar
- The app bar to use for the window.public void setStatusBar(StatusBar statusBar)
statusBar
- The status bar to use for the window.public void setStatusBar(AppBar appBar, Container container)
appBar
- The app bar to use for the window.container
- The container for the status bar.public void setStatusBar(StatusBar statusBar, Container container)
statusBar
- The status bar to use for the window.container
- The container for the status bar.public void installMenuHints(UIInfo[] uiinfos)
uiinfos
- An array of UIInfo objects that contain the menu items
for which the hints will be created.public Widget message(java.lang.String message)
message
- The text to display.
public void flash(java.lang.String flash)
flash
- The message to flash.public Widget warning(java.lang.String warning)
warning
- The text to display.
public Widget error(java.lang.String error)
error
- The text to display.
public static Type getType()
|
Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |