org.gnu.gtk

Class StatusBar

public class StatusBar extends HBox

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.StatusBar. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

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, 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 StatusBar.

The message at the top of the stack can be removed using StatusBar. 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 StatusBar.

Constructor Summary
StatusBar()
Creates a new StatusBar Widget
StatusBar(Handle handle)
Creates a new StatusBar from a handle to native resources.
Method Summary
voidaddListener(StatusBarListener listener)
Register an object to handle StatusBar events.
intgetContextID(String description)
Returns a new context identifier, given a description of the actual context.
ClassgetEventListenerClass(String signal)
EventTypegetEventType(String signal)
booleangetHasResizeGrip()
Returns whether the statusbar has a resize grip.
static StatusBargetStatusBar(Handle handle)
Internal static factory method to be used by Java-Gnome only.
static TypegetType()
Retrieve the runtime type used by the GLib library.
voidpop(int contextID)
Removes the message at the top of the statusbar's stack.
intpush(int contextID, String text)
Pushes a new message onto a statusbar's stack.
voidremove(int contextID, int messageID)
Forces the removal of a message from a statusbar's stack.
voidremoveListener(StatusBarListener listener)
Removes a listener
voidsetHasResizeGrip(boolean setting)
Sets whether the statusbar has a resize grip.

Constructor Detail

StatusBar

public StatusBar()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Creates a new StatusBar Widget

StatusBar

public StatusBar(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Creates a new StatusBar from a handle to native resources. This should only be used internally by the Java-Gnome packages.

Method Detail

addListener

public void addListener(StatusBarListener listener)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Register an object to handle StatusBar events.

See Also: StatusBarListener

getContextID

public int getContextID(String description)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns a new context identifier, given a description of the actual context.

Parameters: description textual description of what context the new message is being used in.

See Also: StatusBar

getEventListenerClass

public Class getEventListenerClass(String signal)

getEventType

public EventType getEventType(String signal)

getHasResizeGrip

public boolean getHasResizeGrip()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns whether the statusbar has a resize grip.

Returns: TRUE if the statusbar has a resize grip.

getStatusBar

public static StatusBar getStatusBar(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Internal static factory method to be used by Java-Gnome only.

getType

public static Type getType()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Retrieve the runtime type used by the GLib library.

pop

public void pop(int contextID)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes the message at the top of the statusbar's stack.

Parameters: contextID a context identifier.

push

public int push(int contextID, String text)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Pushes a new message onto a statusbar's stack.

Parameters: contextID The message's context id, as returned by getContextID text The message to add to the statusbar.

Returns: The message's new message id for use with StatusBar

remove

public void remove(int contextID, int messageID)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Forces the removal of a message from a statusbar's stack. The exact contextID and messageID must be specified.

Parameters: contextID A context identifier. messageID A message identifier, as returned by StatusBar.

removeListener

public void removeListener(StatusBarListener listener)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes a listener

See Also: addListener

setHasResizeGrip

public void setHasResizeGrip(boolean setting)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets whether the statusbar has a resize grip. TRUE by default.

Parameters: setting TRUE to have a resize grip.