com.pepper.guiutils
Interface GuiServicesProvider


public interface GuiServicesProvider

Interface that provides common GUI Services, such as reporting status messages, error messages, and showing the progress bar


Field Summary
static int SEARCH_AMAZON
          Amazon search option
static int SEARCH_GOOGLE
          Google search option
static int SEARCH_LOCAL
          Local Page search option
static int SEARCH_YAHOO
          Yahoo search option
static String SOUND_AOL_BUDDY_OFFLINE
          AIM Buddy Offline sound.
static String SOUND_AOL_BUDDY_ONLINE
          AIM Buddy Online sound.
static String SOUND_AOL_NEW_MESSAGE
          AIM NewMessage sound.
static String SOUND_LOCAL_BUDDY_OFFLINE
          Local IM Buddy Offline sound.
static String SOUND_LOCAL_BUDDY_ONLINE
          Local IM Buddy Online sound.
static String SOUND_LOCAL_NEW_MESSAGE
          Local IM NewMessage sound.
static String SOUND_SHARING_REQUEST
          Sharing Request sound.
 
Method Summary
 void animate(boolean start)
          Start/Stop the Keeper's busy animation
 void animate(boolean start, boolean showWaitMsg)
          Start/Stop the Keeper's busy animation and optionally show the wait message splash screen
 void blinkFlag(String packageId)
          Blink the application flag with the specified packageId in the flag panel of the Keeper
 JFrame getMainFrame()
          Get the main Keeper Frame
 boolean getPowerSaveOff()
          Get the current state of the power save setting
 boolean getPowerSleepOff()
          Get the current state of the power sleep setting
 JTextField getSearchField()
          Get the search field in the Binder
 SystemTray getSystemTray()
          Get the system tray object
 JComboBox getURLField()
          Get the url UI Component in the Keeper
 AbstractPepperProgram getVisibleProgram()
          Get the currently visible AbsgtractPepperProgram in the Keeper
 void hideProgressBar()
          Clears the progress bar value and clears status message
 void playSound(String soundName)
          Play a sound in the Keeper
 void powerSaveOff(boolean state)
           
 void powerSleepOff(boolean state)
           
 void setCurrentProcess(int processId)
          Makes the AbstractPepperProgram with the specified process id the visible program in the Keeper and selects it's flag in the flag panel.
 void setProgressBarIndeterminate(boolean state)
          Change the state of a running progress bar
 void setProgressBarMax(int max)
          Set the maximum value for a determinant progress bar
 void setProgressBarMin(int min)
          Set the minimum value for a determinant progress bar
 void setProgressBarValue(int value)
          Set the current value for a determinant progress bar
 void setSearchScope(int type)
          Set the scope of the search
 modelobjects.framework.threads.CancellableThread showProgressBar(Runnable runnable, String label, boolean indeterminate)
          Show the progress bar, launch the runnable in a thread, and hide the progress bar when the thread has completed
 modelobjects.framework.threads.CancellableThread showProgressBar(Runnable runnable, String label, boolean indeterminate, boolean showProgressDialog)
          Optionally show a progress dialog with a stop button to allow the passed in thread to be stopped.
 modelobjects.framework.threads.CancellableThread showProgressBar(Runnable runnable, String label, boolean indeterminate, boolean showProgressDialog, boolean cancellable)
          Optionally show a progress dialog that can be defined as not cancellable.
 void showProgressBar(String label, boolean indeterminate)
          Show the progress bar, indicating work-in-progress.
 void showWebPage(AbstractPepperProgram program, String urlString, String sectionId)
          Shows a web page in the specified program (if web pages supported by the program, or else will launch the browser package and display the page in it
 void showWebPage(AbstractPepperProgram program, String urlString, String sectionId, int windowOption)
          Shows a web page in the specified program (if web pages supported by the program, or else will launch the browser package and display the page in it.
 void showWebToolBar(boolean state)
          Hide or show the web toolbar
 void toggleFlags()
          hide/show the package flags
 void toggleFullScreen()
          toggle between fullscreen mode
 void toggleMedia()
          hied/show media controls
 void toggleNavbar()
          hide/show nav bar (url field and search field)
 void toggleTabs()
          hide/show the package tabs
 void toggleToolbar()
          hide/show global toolbar
 void updateURL(String text)
          Set the url field's text
 void writeStatus(String message)
          Write a transient status message to the status bar.
 void writeStatus(String message, boolean now, boolean isTransient)
          write a status message to the status bar and optionally make message transient
 

Field Detail

SEARCH_LOCAL

static final int SEARCH_LOCAL
Local Page search option

See Also:
Constant Field Values

SEARCH_GOOGLE

static final int SEARCH_GOOGLE
Google search option

See Also:
Constant Field Values

SEARCH_AMAZON

static final int SEARCH_AMAZON
Amazon search option

See Also:
Constant Field Values

SEARCH_YAHOO

static final int SEARCH_YAHOO
Yahoo search option

See Also:
Constant Field Values

SOUND_AOL_NEW_MESSAGE

static final String SOUND_AOL_NEW_MESSAGE
AIM NewMessage sound.

See Also:
Constant Field Values

SOUND_LOCAL_NEW_MESSAGE

static final String SOUND_LOCAL_NEW_MESSAGE
Local IM NewMessage sound.

See Also:
Constant Field Values

SOUND_AOL_BUDDY_ONLINE

static final String SOUND_AOL_BUDDY_ONLINE
AIM Buddy Online sound.

See Also:
Constant Field Values

SOUND_LOCAL_BUDDY_ONLINE

static final String SOUND_LOCAL_BUDDY_ONLINE
Local IM Buddy Online sound.

See Also:
Constant Field Values

SOUND_AOL_BUDDY_OFFLINE

static final String SOUND_AOL_BUDDY_OFFLINE
AIM Buddy Offline sound.

See Also:
Constant Field Values

SOUND_LOCAL_BUDDY_OFFLINE

static final String SOUND_LOCAL_BUDDY_OFFLINE
Local IM Buddy Offline sound.

See Also:
Constant Field Values

SOUND_SHARING_REQUEST

static final String SOUND_SHARING_REQUEST
Sharing Request sound.

See Also:
Constant Field Values
Method Detail

animate

void animate(boolean start)
Start/Stop the Keeper's busy animation

Parameters:
start - a boolean value

animate

void animate(boolean start,
             boolean showWaitMsg)
Start/Stop the Keeper's busy animation and optionally show the wait message splash screen

Parameters:
start - a boolean value
showWaitMsg - a boolean value

writeStatus

void writeStatus(String message)
Write a transient status message to the status bar. The message will be cleared after 5 seconds

Parameters:
message - the message is expected to have been properly formatted for the current locale.

writeStatus

void writeStatus(String message,
                 boolean now,
                 boolean isTransient)
write a status message to the status bar and optionally make message transient

Parameters:
message - a String value
now - currently not used
isTransient - If true, the message will be cleared after 5 secs, otherwise it will remain until another message is written

showProgressBar

void showProgressBar(String label,
                     boolean indeterminate)
Show the progress bar, indicating work-in-progress.

Parameters:
label - Text to be displayed in the progress bar, or the empty string to display nothing.
indeterminate - true to display the progress bar in indeterminate mode, false to display it in determinate mode.

setProgressBarIndeterminate

void setProgressBarIndeterminate(boolean state)
Change the state of a running progress bar

Parameters:
state - true for indeterminate, false for determinant

showProgressBar

modelobjects.framework.threads.CancellableThread showProgressBar(Runnable runnable,
                                                                 String label,
                                                                 boolean indeterminate)
Show the progress bar, launch the runnable in a thread, and hide the progress bar when the thread has completed

Parameters:
runnable - a Runnable object to run
label - Label to display in the progress bar
indeterminate - true to show the progress bar in indeterminate mode, false to show it in determinate mode.
Returns:
the CancellableThread that gets started

showProgressBar

modelobjects.framework.threads.CancellableThread showProgressBar(Runnable runnable,
                                                                 String label,
                                                                 boolean indeterminate,
                                                                 boolean showProgressDialog)
Optionally show a progress dialog with a stop button to allow the passed in thread to be stopped.

Parameters:
runnable - a Runnable object to run
label - Label to display in the progress bar or title of dialog
indeterminate - true to show the progress bar in indeterminate mode, false to show it in determinate mode.
showProgressDialog - if true a dialog will be displayed that shows the progress and allows the thread to be cancelled
Returns:
the CancellableThread that gets started

showProgressBar

modelobjects.framework.threads.CancellableThread showProgressBar(Runnable runnable,
                                                                 String label,
                                                                 boolean indeterminate,
                                                                 boolean showProgressDialog,
                                                                 boolean cancellable)
Optionally show a progress dialog that can be defined as not cancellable. If the cancellable flag is false, the dialog will not be cancellable, and the stop button in the dialog will be disabled.

Parameters:
runnable - a Runnable object to run
label - Label to display in the progress bar or title of dialog
indeterminate - true to show the progress bar in indeterminate mode, false to show it in determinate mode.
showProgressDialog - if true a dialog will be displayed that shows the progress and allows the thread to be cancelled
cancellable - if true the dialog will be cancellable, if false the stop button will be disabled in the dialog
Returns:
the CancellableThread that gets started

hideProgressBar

void hideProgressBar()
Clears the progress bar value and clears status message


setProgressBarMin

void setProgressBarMin(int min)
Set the minimum value for a determinant progress bar

Parameters:
min - an int value

setProgressBarMax

void setProgressBarMax(int max)
Set the maximum value for a determinant progress bar

Parameters:
max - an int value

setProgressBarValue

void setProgressBarValue(int value)
Set the current value for a determinant progress bar


setCurrentProcess

void setCurrentProcess(int processId)
Makes the AbstractPepperProgram with the specified process id the visible program in the Keeper and selects it's flag in the flag panel.

Parameters:
processId - The process id of the AbstractPepperProgram
See Also:
AbstractPepperProgram.getPID()

getVisibleProgram

AbstractPepperProgram getVisibleProgram()
Get the currently visible AbsgtractPepperProgram in the Keeper

Returns:
an AbstractPepperProgram value

getSystemTray

SystemTray getSystemTray()
Get the system tray object

Returns:
a SystemTray value

getMainFrame

JFrame getMainFrame()
Get the main Keeper Frame

Returns:
a JFrame value

getURLField

JComboBox getURLField()
Get the url UI Component in the Keeper

Returns:
a JComboxBox value

updateURL

void updateURL(String text)
Set the url field's text

Parameters:
text - The string to update

getSearchField

JTextField getSearchField()
Get the search field in the Binder

Returns:
a JTextField value

setSearchScope

void setSearchScope(int type)
Set the scope of the search

Parameters:
type - see SEARCH_XXX constants in this class

blinkFlag

void blinkFlag(String packageId)
Blink the application flag with the specified packageId in the flag panel of the Keeper

Parameters:
packageId - a String value

showWebPage

void showWebPage(AbstractPepperProgram program,
                 String urlString,
                 String sectionId)
Shows a web page in the specified program (if web pages supported by the program, or else will launch the browser package and display the page in it

Parameters:
program - The destination program
urlString - the url to display
sectionId - - The section id of the web tab to display it in. Pass in null to use the default web section for the program

showWebPage

void showWebPage(AbstractPepperProgram program,
                 String urlString,
                 String sectionId,
                 int windowOption)
Shows a web page in the specified program (if web pages supported by the program, or else will launch the browser package and display the page in it. Can optionally show the web page in a new tab or new window.

Parameters:
program - an AbstractPepperProgram value
urlString - a String value
sectionId - a String value
windowOption - one of WebBrowserView.WINDOW_CURRENT, WebBrowserView.WINDOW_NEW, or WebBrowserView.WINDOW_NEW_TAB. If WINDOW_NEW or WINDOW_NEW_TAB are set, any value specified for sectionId will be ignored.

toggleFullScreen

void toggleFullScreen()
toggle between fullscreen mode


toggleTabs

void toggleTabs()
hide/show the package tabs


toggleFlags

void toggleFlags()
hide/show the package flags


toggleToolbar

void toggleToolbar()
hide/show global toolbar


toggleNavbar

void toggleNavbar()
hide/show nav bar (url field and search field)


toggleMedia

void toggleMedia()
hied/show media controls


powerSaveOff

void powerSaveOff(boolean state)

getPowerSaveOff

boolean getPowerSaveOff()
Get the current state of the power save setting


powerSleepOff

void powerSleepOff(boolean state)

getPowerSleepOff

boolean getPowerSleepOff()
Get the current state of the power sleep setting


playSound

void playSound(String soundName)
Play a sound in the Keeper

Parameters:
soundName - a String containing the name of the sound to play. Sound names are defined as SOUND_ public constants in this class.

showWebToolBar

void showWebToolBar(boolean state)
Hide or show the web toolbar



Copyright © 2006-2007 Pepper Computer, Inc. All Rights Reserved.