|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Container
org.gnu.gtk.Box
org.gnu.gtk.HBox
org.gnu.gtk.StatusBar
public class StatusBar
A Statusbar is usually placed along the bottom of an application's main
Window
. It may provide a regular commentary of the application's
status (as is usually the case in a web browser, for example), or may be used
to simply output a message when the status changes, (when an upload is
complete in an FTP client, for example). It may also have a resize grip (a
triangular area in the lower right corner) which can be clicked on to resize
the window containing the statusbar.
Status bars in Gtk+ maintain a stack of messages. The message at the top of the each bar's stack is the one that will currently be displayed.
Any messages added to a statusbar's stack must specify a contextID that is
used to uniquely identify the source of a message. This contextID can be
generated by getContextID(String)
, given a message. Note that
messages are stored in a stack, and when choosing which message to display,
the stack structure is adhered to, regardless of the context identifier of a
message.
Messages are added to the bar's stack with push(int,String)
.
The message at the top of the stack can be removed using pop(int)
.
A message can be removed from anywhere in the stack if it's messageID was
recorded at the time it was added. This is done using remove(int,
int)
.
Constructor Summary | |
---|---|
StatusBar()
Creates a new StatusBar Widget |
|
StatusBar(org.gnu.glib.Handle handle)
Creates a new StatusBar from a handle to native resources. |
Method Summary | |
---|---|
void |
addListener(StatusBarListener listener)
Register an object to handle StatusBar events. |
int |
getContextID(java.lang.String description)
Returns a new context identifier, given a description of the actual context. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
EventType |
getEventType(java.lang.String signal)
|
boolean |
getHasResizeGrip()
Returns whether the statusbar has a resize grip. |
static StatusBar |
getStatusBar(org.gnu.glib.Handle handle)
Internal static factory method to be used by Java-Gnome only. |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
void |
pop(int contextID)
Removes the message at the top of the statusbar's stack. |
int |
push(int contextID,
java.lang.String text)
Pushes a new message onto a statusbar's stack. |
void |
remove(int contextID,
int messageID)
Forces the removal of a message from a statusbar's stack. |
void |
removeListener(StatusBarListener listener)
Removes a listener |
void |
setHasResizeGrip(boolean setting)
Sets whether the statusbar has a resize grip. |
Methods inherited from class org.gnu.gtk.HBox |
---|
getHBox |
Methods inherited from class org.gnu.gtk.Box |
---|
getHomogeneous, getSpacing, packEnd, packEnd, packStart, packStart, reorderChild, setHomogeneous, setSpacing |
Methods inherited from class org.gnu.gtk.Container |
---|
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getIntChildProperty, getResizeMode, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode |
Methods inherited from class org.gnu.gtk.GtkObject |
---|
destroy, sink |
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 |
---|
public StatusBar()
public StatusBar(org.gnu.glib.Handle handle)
Method Detail |
---|
public static StatusBar getStatusBar(org.gnu.glib.Handle handle)
public int getContextID(java.lang.String description)
description
- textual description of what context the new message is being
used in.StatusBar
public int push(int contextID, java.lang.String text)
contextID
- The message's context id, as returned by
getContextID(String)
text
- The message to add to the statusbar.
remove(int,
int)
public void pop(int contextID)
contextID
- a context identifier.public void remove(int contextID, int messageID)
contextID
- A context identifier.messageID
- A message identifier, as returned by push(int,
String)
.public void setHasResizeGrip(boolean setting)
setting
- TRUE to have a resize grip.public boolean getHasResizeGrip()
public static Type getType()
public void addListener(StatusBarListener listener)
StatusBarListener
public void removeListener(StatusBarListener listener)
addListener(StatusBarListener)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Container
public EventType getEventType(java.lang.String signal)
getEventType
in class Container
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |