org.gnu.gnome

Class AppBar


public class AppBar
extends HBox

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

Constructor Summary

AppBar(Handle handle)
Construct an AppBar using a handle to a native resource.
AppBar(boolean hasProgress, boolean hasStatus, PreferencesType type)
Creates new instance of AppBar.

Method Summary

void
addListener(AppBarListener listener)
Register an object to handle AppBar events.
void
clearPrompt()
Clears any prompt.
void
clearStack()
Clears the stack.
protected void
fireAppBarEvent(AppBarEvent event)
Class
getEventListenerClass(String signal)
EventType
getEventType(String signal)
ProgressBar
getProgressBar()
Returns the progress bar used by AppBar.
String
getResponse()
Gets the response to setPrompt
StatusBar
getStatusBar()
Return the StatusBar widget contained in this AppBar.
static Type
getType()
Retrieve the runtime type used by the GLib library.
protected static void
gnome_appbar_clear_prompt(Handle appbar)
protected static void
gnome_appbar_clear_stack(Handle appbar)
protected static Handle
gnome_appbar_get_progress(Handle appbar)
protected static String
gnome_appbar_get_response(Handle appbar)
protected static Handle
gnome_appbar_get_status(Handle appbar)
protected static int
gnome_appbar_get_type()
protected static Handle
gnome_appbar_new(boolean hasProgress, boolean hasStatus, int interactivity)
protected static void
gnome_appbar_pop(Handle appbar)
protected static void
gnome_appbar_push(Handle appbar, String status)
protected static void
gnome_appbar_refresh(Handle appbar)
protected static void
gnome_appbar_set_default(Handle appbar, String defaultStatus)
protected static void
gnome_appbar_set_progress_percentage(Handle appbar, double percentage)
protected static void
gnome_appbar_set_prompt(Handle appbar, String prompt, boolean modal)
protected static void
gnome_appbar_set_status(Handle appbar, String status)
void
popStack()
Pops the top status off the stack.
void
pushStack(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(String prompt, boolean modal)
Sets a prompt in the appbar and waits for a response.
void
setStatusDefault(String status)
What to show when showing nothing else.
void
setStatusText(String status)
Sets the status text without changing the widget state.

Constructor Details

AppBar

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


AppBar

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

Method Details

addListener

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

See Also:
AppBarListener


clearPrompt

public void clearPrompt()
Clears any prompt.

See Also:
setPrompt(String,boolean)


clearStack

public void clearStack()
Clears the stack.


fireAppBarEvent

protected void fireAppBarEvent(AppBarEvent event)


getEventListenerClass

public Class getEventListenerClass(String signal)


getEventType

public EventType getEventType(String signal)


getProgressBar

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

Returns:
The progress bar.


getResponse

public String getResponse()
Gets the response to setPrompt

Returns:
The user's response.

See Also:
setPrompt(String,boolean)


getStatusBar

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


getType

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


gnome_appbar_clear_prompt

protected static final void gnome_appbar_clear_prompt(Handle appbar)


gnome_appbar_clear_stack

protected static final void gnome_appbar_clear_stack(Handle appbar)


gnome_appbar_get_progress

protected static final Handle gnome_appbar_get_progress(Handle appbar)


gnome_appbar_get_response

protected static final String gnome_appbar_get_response(Handle appbar)


gnome_appbar_get_status

protected static final Handle gnome_appbar_get_status(Handle appbar)


gnome_appbar_get_type

protected static final int gnome_appbar_get_type()


gnome_appbar_new

protected static final Handle gnome_appbar_new(boolean hasProgress,
                                               boolean hasStatus,
                                               int interactivity)


gnome_appbar_pop

protected static final void gnome_appbar_pop(Handle appbar)


gnome_appbar_push

protected static final void gnome_appbar_push(Handle appbar,
                                              String status)


gnome_appbar_refresh

protected static final void gnome_appbar_refresh(Handle appbar)


gnome_appbar_set_default

protected static final void gnome_appbar_set_default(Handle appbar,
                                                     String defaultStatus)


gnome_appbar_set_progress_percentage

protected static final void gnome_appbar_set_progress_percentage(Handle appbar,
                                                                 double percentage)


gnome_appbar_set_prompt

protected static final void gnome_appbar_set_prompt(Handle appbar,
                                                    String prompt,
                                                    boolean modal)


gnome_appbar_set_status

protected static final void gnome_appbar_set_status(Handle appbar,
                                                    String status)


popStack

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


pushStack

public void pushStack(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.


removeListener

public void removeListener(AppBarListener listener)
Removes a listener.

See Also:
addListener(AppBarListener)


setProgressPercentage

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


setPrompt

public void setPrompt(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(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(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.