org.gnu.gnome
Class AppBar

java.lang.Object
  extended byorg.gnu.glib.GObject
      extended byorg.gnu.gtk.GtkObject
          extended byorg.gnu.gtk.Widget
              extended byorg.gnu.gtk.Container
                  extended byorg.gnu.gtk.Box
                      extended byorg.gnu.gtk.HBox
                          extended byorg.gnu.gnome.AppBar

public class AppBar
extends org.gnu.gtk.HBox

The AppBar widget is a progress bar with a textual annotation.


Constructor Summary
AppBar(boolean hasProgress, boolean hasStatus, PreferencesType type)
          Creates new instance of AppBar.
AppBar(org.gnu.glib.Handle handle)
          Construct an AppBar using a handle to a native resource.
 
Method Summary
 void addListener(AppBarListener listener)
          Register an object to handle AppBar events.
 void clearPrompt()
          Clears any prompt.
 void clearStack()
          Clears the stack.
 java.lang.Class getEventListenerClass(java.lang.String signal)
           
 org.gnu.glib.EventType getEventType(java.lang.String signal)
           
 org.gnu.gtk.ProgressBar getProgressBar()
          Returns the progress bar used by AppBar.
 java.lang.String getResponse()
          Gets the response to setPrompt
 org.gnu.gtk.StatusBar getStatusBar()
          Return the StatusBar widget contained in this AppBar.
static org.gnu.glib.Type getType()
          Retrieve the runtime type used by the GLib library.
 void popStack()
          Pops the top status off the stack.
 void pushStack(java.lang.String status)
          Pushes the status onto the stack.
 void refresh()
          Refreshes to the current state of stack/default.
 void removeListener(AppBarListener listener)
          Removes a listener.
 void setProgressPercentage(double percentage)
          Sets the percetage to show for progress.
 void setPrompt(java.lang.String prompt, boolean modal)
          Sets a prompt in the appbar and waits for a response.
 void setStatusDefault(java.lang.String status)
          What to show when showing nothing else.
 void setStatusText(java.lang.String status)
          Sets the status text without changing the widget state.
 
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, getBorderWidth, getChildren, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, destroy, draw, drawArea, drawArea, finish, getAccessible, getColormap, getContext, getData, getDisplay, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight
 
Methods inherited from class org.gnu.gtk.GtkObject
sink
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, equals, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getNullHandle, getPixbufProperty, getProperty, getStringProperty, hashCode, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppBar

public AppBar(boolean hasProgress,
              boolean hasStatus,
              PreferencesType type)
Creates new instance of AppBar.


AppBar

public AppBar(org.gnu.glib.Handle handle)
Construct an AppBar using a handle to a native resource.

Method Detail

clearPrompt

public void clearPrompt()
Clears any prompt.

See Also:
setPrompt(String, boolean)

clearStack

public void clearStack()
Clears the stack.


getProgressBar

public org.gnu.gtk.ProgressBar getProgressBar()
Returns the progress bar used by AppBar.

Returns:
The progress bar.

getResponse

public java.lang.String getResponse()
Gets the response to setPrompt

Returns:
The user's response.
See Also:
setPrompt(String, boolean)

popStack

public void popStack()
Pops the top status off the stack. Calling this on an empty stack causes no problems.


pushStack

public void pushStack(java.lang.String status)
Pushes the status onto the stack.

Parameters:
status - The status text. Not null.

refresh

public void refresh()
Refreshes to the current state of stack/default. Useful for forcing the text set by a call to setStatusText to disappear.


setProgressPercentage

public void setProgressPercentage(double percentage)
Sets the percetage to show for progress.


setPrompt

public void setPrompt(java.lang.String prompt,
                      boolean modal)
Sets a prompt in the appbar and waits for a response. When the user responds or cancels, a user_response signal is emitted.

Parameters:
prompt - The message used to prompt the user.
modal - True if all user input to the application should be blocked until the user responds to the prompt or cancels.

setStatusDefault

public void setStatusDefault(java.lang.String status)
What to show when showing nothing else. Defaults to nothing.

Parameters:
status - The text to use as default. Not null.

setStatusText

public void setStatusText(java.lang.String status)
Sets the status text without changing the widget state. The next set or push will destroy this permanently.

Parameters:
status - The text to set. Not null.

getStatusBar

public org.gnu.gtk.StatusBar getStatusBar()
Return the StatusBar widget contained in this AppBar.


getType

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


addListener

public void addListener(AppBarListener listener)
Register an object to handle AppBar events.

See Also:
AppBarListener

removeListener

public void removeListener(AppBarListener listener)
Removes a listener.

See Also:
addListener(AppBarListener)

getEventListenerClass

public java.lang.Class getEventListenerClass(java.lang.String signal)

getEventType

public org.gnu.glib.EventType getEventType(java.lang.String signal)