org.gnu.gtk
public class StatusBar extends HBox
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 {@link #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 {@link #push(int,String)}.
The message at the top of the stack can be removed using {@link #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 {@link #remove(int, int)}.
Constructor Summary | |
---|---|
StatusBar()
Creates a new StatusBar Widget | |
StatusBar(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(String description)
Returns a new context identifier, given a description of the actual
context.
|
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
boolean | getHasResizeGrip()
Returns whether the statusbar has a resize grip.
|
static StatusBar | getStatusBar(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, 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. |
See Also: StatusBarListener
Parameters: description textual description of what context the new message is being used in.
See Also: StatusBar
Returns: TRUE if the statusbar has a resize grip.
Parameters: contextID a context identifier.
Parameters: contextID The message's context id, as returned by {@link #getContextID(String)} text The message to add to the statusbar.
Returns: The message's new message id for use with {@link #remove(int, int)}
Parameters: contextID A context identifier. messageID A message identifier, as returned by {@link #push(int, String)}.
See Also: addListener
Parameters: setting TRUE to have a resize grip.