All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sgi.sysadm.ui.UIContext

java.lang.Object
   |
   +----com.sgi.sysadm.ui.UIContext

public class UIContext
extends Object
UIContext provides dialog posting and busy handling services.

Call UIContext.setDialogParent() to set the Component over which posted dialogs should be centered and for which the busy cursor will be set. If the dialog parent has not been set or is set to null, posted dialogs will be centered on the screen and the busy() methods will have no effect on the cursor.

The methods in this class are Swing thread safe. In other words, if they are called from a thread other than the event dispatch thread, SwingUtilities.invokeLater() will be used to perform the operations on the event dispatch thread.


Variable Index

 o BOTTOM_INSET
The property UIContext.Dialog.bottomInset is an integer that defines the height, in points, of the inset between the bottom of a dialog and the contents of a dialog.
 o BUSY_ICON
The property UIContext.Dialog.busyIcon is the CLASSPATH relative name of the icon image file of the icon to use in the busy dialog.
 o CANCEL_LABEL
The property UIContext.Dialog.cancelLabel is a string displayed on the cancel button of the busy dialog.
 o ERROR_ICON
The property UIContext.Dialog.errorIcon is the CLASSPATH Relative name of the icon image file of the icon to use in the error dialog posted via UIContext.postError().
 o FONT
The property UIContext.Dialog.font is the name of the font to use for dialogs posted via UIContext.
 o HGAP
The property UIContext.Dialog.hgap is an integer that defines the width, in points, of the space between the icon and message in a dialog.
 o INFO_ICON
The property UIContext.Dialog.infoIcon is the CLASSPATH Relative name of the icon image file of the icon to use in the information dialog posted using UIContext.postInfo().
 o LEFT_INSET
The property UIContext.Dialog.leftInset is an integer that defines the width, in points, of the inset between the left edge of a dialog and the contents of a dialog.
 o MAX_LINE_LEN
The property UIContext.Dialog.maxLineLen is the length, in characters, of the longest line in any error, warning, or info dialog.
 o NO_LABEL
The property UIContext.Dialog.noLabel is a string displayed on the no button of the question dialog.
 o OK_LABEL
The property UIContext.Dialog.okLabel is a string that is displayed on the confirmation button of dialogs (e.g.
 o QUESTION_ICON
The property UIContext.Dialog.questionIcon is the CLASSPATH Relative name of the icon image file of the icon to use in the question dialog posted using UIContext.postQuestion().
 o RIGHT_INSET
The property UIContext.Dialog.rightInset is an integer that defines the width, in points, of the inset between the right edge of a dialog and the contents of a dialog.
 o TOP_INSET
The property UIContext.Dialog.topInset is an integer that defines the height, in points, of the inset between the top of a dialog and the contents of a dialog.
 o VGAP
The property UIContext.Dialog.vgap is an integer that defines the height, in points, of the space between the message and buttons in a dialog.
 o WARNING_ICON
The property UIContext.Dialog.warningIcon is the CLASSPATH Relative name of the icon image file of the icon to use in the warning dialog posted using UIContext.postWarning().
 o YES_LABEL
The property UIContext.Dialog.yesLabel is a string displayed on the yes button of the question dialog.

Constructor Index

 o UIContext()
Default constructor.
 o UIContext(JComponent)
Construct a UIContext with the specified dialogParent.
 o UIContext(ResourceStack)
Protected constructor for creating a UIContext with an existing ResourceStack.
 o UIContext(ResourceStack, JComponent)
Protected constructor for creating a UIContext with an existing ResourceStack and a dialogParent.

Method Index

 o addKeyCodeShortCut(JButton, int)
Add an accelerator to a button using the specified keyCode.
 o addKeyCodeShortCut(JButton, String)
Add an accelerator to a button using the specified resource.
 o blockInput(boolean)
Prevent (or allow) input to the dialogParent by raising (or lowering) the glassPane.
 o blockInput(boolean, ResultListener)
Prevent (or allow) input to the dialogParent by raising (or lowering) the glassPane, notifying listener when input has been blocked (or unblocked).
 o busy()
Set the cursor to a busy cursor and do not allow user input.
 o busy(ResultListener)
Set the cursor to a busy cursor and do not allow user input; notify the caller when the cursor has changed to busy.
 o busy(String)
Post a modal busy dialog with a localized busy message and do not allow user input to the dialog parent.
 o busy(String, ActionListener)
Post a modal busy dialog with a localized busy message and a cancel button; do not allow user input to the dialog parent.
 o findFocusTraversable(Container)
Find a Component in parent's Component hierarchy that is showing, enabled, and focus traversable.
 o getDialogParent()
Get the JComponent which will be used for posting dialogs.
 o getHostContext()
Get the HostContext associated with this UIContext.
 o getPrivs(String[], ResultListener)
Check to see if we have a set of privileges.
 o getResourceStack()
Get the ResourceStack associated with this context.
 o notBusy()
Clear the busy cursor or busy dialog.
 o notBusy(ResultListener)
Clear the busy cursor or busy dialog.
 o postDialog(JPanel, String, ResultListener)
Post a custom dialog.
 o postError(String)
Post a modal error dialog and display a localized error message.
 o postError(String, ActionListener)
Post a modal error dialog and display a localized error message.
 o postGlobalError(String)
Post a localized error message in a modal dialog that prevents input to all clients registered with the current HostContext.
 o postGlobalError(String, ActionListener)
Post a localized error message in a modal dialog that prevents input to all clients registered with the current HostContext.
 o postGlobalInfo(String)
Post a localized information message in a modal dialog that prevents input to all clients registered with the current HostContext.
 o postGlobalInfo(String, ActionListener)
Post a localized information message in a modal dialog that prevents input to all clients registered with the current HostContext.
 o postGlobalQuestion(String, ActionListener, ActionListener)
Post a localized question in a modal question dialog that prevents input to all clients registered with the current HostContext.
 o postGlobalQuestion(String, ActionListener, ActionListener, String, String)
Post a localized question in a modal question dialog that prevents input to all clients registered with the current HostContext.
 o postGlobalWarning(String)
Post a localized warning message in a modal dialog that prevents input to all clients registered with the current HostContext.
 o postGlobalWarning(String, ActionListener)
Post a localized warning message in a modal dialog that prevents input to all clients registered with the current HostContext.
 o postInfo(String)
Post a modal information dialog and display a localized information message.
 o postInfo(String, ActionListener)
Post a modal information dialog and display a localized information message.
 o postQuestion(String, ActionListener, ActionListener)
Post a localized question in a modal question dialog.
 o postQuestion(String, ActionListener, ActionListener, String, String)
Post a localized question in a modal question dialog with localized button labels.
 o postQuestion(String, ActionListener, ActionListener, String, String, String)
Post a localized question in a modal question dialog with localized button labels.
 o postWarning(String)
Post a modal warning dialog and display a localized warning message.
 o postWarning(String, ActionListener)
Post a modal warning dialog and display a localized warning message.
 o setCursor(Component, Cursor)
Workaround for Component.setCursor that actually changes the cursor without requiring the user to move the mouse.
 o setDialogParent(JComponent)
Set the dialog parent associated with this context.
 o setDialogParent(JComponent, ResultListener)
Set the dialog parent associated with this context and notify listener when the dialog parent has been set in the Swing UI thread.
 o setDialogTitle(String)
Set the title of subsequent dialogs posted via this context.
 o setHostContext(HostContext)
Set the HostContext associated with this UIContext.
 o setResourceStack(ResourceStack)
Sets the resource stack used by this context.

Variables

 o OK_LABEL
 public static final String OK_LABEL
The property UIContext.Dialog.okLabel is a string that is displayed on the confirmation button of dialogs (e.g. "OK"). It is used for dialogs posted by UIContext.postError(), UIContext.postWarning(), and UIContext.postInfo().

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o TOP_INSET
 public static final String TOP_INSET
The property UIContext.Dialog.topInset is an integer that defines the height, in points, of the inset between the top of a dialog and the contents of a dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o LEFT_INSET
 public static final String LEFT_INSET
The property UIContext.Dialog.leftInset is an integer that defines the width, in points, of the inset between the left edge of a dialog and the contents of a dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o BOTTOM_INSET
 public static final String BOTTOM_INSET
The property UIContext.Dialog.bottomInset is an integer that defines the height, in points, of the inset between the bottom of a dialog and the contents of a dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o RIGHT_INSET
 public static final String RIGHT_INSET
The property UIContext.Dialog.rightInset is an integer that defines the width, in points, of the inset between the right edge of a dialog and the contents of a dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o HGAP
 public static final String HGAP
The property UIContext.Dialog.hgap is an integer that defines the width, in points, of the space between the icon and message in a dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o VGAP
 public static final String VGAP
The property UIContext.Dialog.vgap is an integer that defines the height, in points, of the space between the message and buttons in a dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o BUSY_ICON
 public static final String BUSY_ICON
The property UIContext.Dialog.busyIcon is the CLASSPATH relative name of the icon image file of the icon to use in the busy dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o ERROR_ICON
 public static final String ERROR_ICON
The property UIContext.Dialog.errorIcon is the CLASSPATH Relative name of the icon image file of the icon to use in the error dialog posted via UIContext.postError().

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o WARNING_ICON
 public static final String WARNING_ICON
The property UIContext.Dialog.warningIcon is the CLASSPATH Relative name of the icon image file of the icon to use in the warning dialog posted using UIContext.postWarning().

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o INFO_ICON
 public static final String INFO_ICON
The property UIContext.Dialog.infoIcon is the CLASSPATH Relative name of the icon image file of the icon to use in the information dialog posted using UIContext.postInfo().

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o QUESTION_ICON
 public static final String QUESTION_ICON
The property UIContext.Dialog.questionIcon is the CLASSPATH Relative name of the icon image file of the icon to use in the question dialog posted using UIContext.postQuestion().

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o FONT
 public static final String FONT
The property UIContext.Dialog.font is the name of the font to use for dialogs posted via UIContext.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o CANCEL_LABEL
 public static final String CANCEL_LABEL
The property UIContext.Dialog.cancelLabel is a string displayed on the cancel button of the busy dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o YES_LABEL
 public static final String YES_LABEL
The property UIContext.Dialog.yesLabel is a string displayed on the yes button of the question dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o NO_LABEL
 public static final String NO_LABEL
The property UIContext.Dialog.noLabel is a string displayed on the no button of the question dialog.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

 o MAX_LINE_LEN
 public static final String MAX_LINE_LEN
The property UIContext.Dialog.maxLineLen is the length, in characters, of the longest line in any error, warning, or info dialog. Any line which exceeds this length will be broken into shorter lines by the addition of newline characters.

The default value for this property is defined in com.sgi.sysadm.ui.SysadmUIP.properties and may be overridden in any properties file on the ResourceStack.

Constructors

 o UIContext
 public UIContext()
Default constructor.

 o UIContext
 public UIContext(JComponent dialogParent)
Construct a UIContext with the specified dialogParent. Convenience for combining the constructor with a call to UIContext.setDialogParent().

Parameters:
dialogParent - JComponent for posting dialogs.
 o UIContext
 protected UIContext(ResourceStack rs)
Protected constructor for creating a UIContext with an existing ResourceStack.

Parameters:
rs - A ResourceStack to use for this UIContext.
 o UIContext
 protected UIContext(ResourceStack rs,
                     JComponent dialogParent)
Protected constructor for creating a UIContext with an existing ResourceStack and a dialogParent.

Parameters:
rs - A ResourceStack to use for this UIContext.
dialogParent - JComponent for posting dialogs.

Methods

 o setCursor
 public static void setCursor(Component comp,
                              Cursor cursor)
Workaround for Component.setCursor that actually changes the cursor without requiring the user to move the mouse. Works on both IRIX and NT.

Parameters:
comp - Component to set cursor of.
cursor - new Cursor.
 o findFocusTraversable
 public static Component findFocusTraversable(Container parent)
Find a Component in parent's Component hierarchy that is showing, enabled, and focus traversable.

Parameters:
parent - Parent whose hierarchy is to be searched.
Returns:
traversable, showing, enabled Component, or null if no such Component exists in the hierarchy.
 o setDialogParent
 public void setDialogParent(JComponent dialogParent)
Set the dialog parent associated with this context.

Parameters:
dialogParent - JComponent over which subsequent dialogs should be posted and over which the cursor should be changed when using the busy() methods.
 o setDialogParent
 public void setDialogParent(JComponent dialogParent,
                             ResultListener listener)
Set the dialog parent associated with this context and notify listener when the dialog parent has been set in the Swing UI thread.

Parameters:
dialogParent - JComponent over which subsequent dialogs should be posted and over which the cursor should be changed when using the busy() methods.
listener - A ResultListener that is called when the dialogParent has been set.
 o getDialogParent
 public JComponent getDialogParent()
Get the JComponent which will be used for posting dialogs.

Returns:
The JComponent that will be used for posting dialogs.
 o setHostContext
 public void setHostContext(HostContext hostContext)
Set the HostContext associated with this UIContext.

Parameters:
hostContext - The HostContext associated with this UIContext.
 o getHostContext
 public HostContext getHostContext()
Get the HostContext associated with this UIContext.

Returns:
HostContext associated with this UIContext.
 o getResourceStack
 public ResourceStack getResourceStack()
Get the ResourceStack associated with this context.

Returns:
The ResourceStack associated with this context.
 o setResourceStack
 public void setResourceStack(ResourceStack stack)
Sets the resource stack used by this context.

Parameters:
stack - The ResourceStack to use
 o setDialogTitle
 public void setDialogTitle(String dialogTitle)
Set the title of subsequent dialogs posted via this context.

Parameters:
dialogTitle - Localized dialog title.
 o postError
 public void postError(String errorMessage)
Post a modal error dialog and display a localized error message. This method does not block. If you need to find out when the user dismisses the dialog, use the version of postError() that includes an ActionListener parameter.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
errorMessage - Localized error message to display.
 o postGlobalError
 public void postGlobalError(String errorMessage)
Post a localized error message in a modal dialog that prevents input to all clients registered with the current HostContext. This method does not block. If you need to find out when the user confirms the dialog, use the version of postError() that includes an ActionListener parameter.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
errorMessage - Localized error message to display.
 o postError
 public void postError(String errorMessage,
                       ActionListener listener)
Post a modal error dialog and display a localized error message. This method does not block. When the user confirms the dialog, the dialog will be hidden and listener will be notified.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
errorMessage - Localized error message to display.
listener - The listener to be notified when the user confirms the dialog.
 o postGlobalError
 public void postGlobalError(String errorMessage,
                             ActionListener listener)
Post a localized error message in a modal dialog that prevents input to all clients registered with the current HostContext. This method does not block. When the user confirms the dialog, the dialog will be hidden and listener will be notified.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
errorMessage - Localized error message to display.
listener - The listener to be notified when the user confirms the dialog.
 o postWarning
 public void postWarning(String warningMessage)
Post a modal warning dialog and display a localized warning message. This method does not block. If you need to find out when the user confirms the dialog, use the version of postWarning() that includes an ActionListener parameter.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
warningMessage - Localized warning message to display.
 o postGlobalWarning
 public void postGlobalWarning(String warningMessage)
Post a localized warning message in a modal dialog that prevents input to all clients registered with the current HostContext. This method does not block. If you need to find out when the user confirms the dialog, use the version of postWarning() that includes an ActionListener parameter.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
warningMessage - Localized warning message to display.
 o postWarning
 public void postWarning(String warningMessage,
                         ActionListener listener)
Post a modal warning dialog and display a localized warning message. This method does not block. When the user confirms the dialog, the dialog will be hidden and listener will be notified.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
warningMessage - Localized warning message to display.
listener - The listener to be notified when the user confirms the dialog.
 o postGlobalWarning
 public void postGlobalWarning(String warningMessage,
                               ActionListener listener)
Post a localized warning message in a modal dialog that prevents input to all clients registered with the current HostContext. This method does not block. When the user confirms the dialog, the dialog will be hidden and listener will be notified.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
warningMessage - Localized warning message to display.
listener - The listener to be notified when the user confirms the dialog.
 o postInfo
 public void postInfo(String informationMessage)
Post a modal information dialog and display a localized information message. This method does not block. If you need to find out when the user confirms the dialog, use the version of postInfo() that includes an ActionListener parameter.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
informationMessage - Localized information message to display.
 o postGlobalInfo
 public void postGlobalInfo(String informationMessage)
Post a localized information message in a modal dialog that prevents input to all clients registered with the current HostContext. This method does not block. If you need to find out when the user confirms the dialog, use the version of postGlobalInfo() that includes an ActionListener parameter.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
informationMessage - Localized information message to display.
 o postInfo
 public void postInfo(String informationMessage,
                      ActionListener listener)
Post a modal information dialog and display a localized information message. This method does not block. When the user confirms the dialog, the dialog will be hidden and listener will be notified.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
informationMessage - Localized information message to display.
listener - The listener to be notified when the user confirms the dialog.
 o postGlobalInfo
 public void postGlobalInfo(String informationMessage,
                            ActionListener listener)
Post a localized information message in a modal dialog that prevents input to all clients registered with the current HostContext. This method does not block. When the user confirms the dialog, the dialog will be hidden and listener will be notified.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
informationMessage - Localized information message to display.
listener - The listener to be notified when the user confirms the dialog.
 o postQuestion
 public void postQuestion(String questionMessage,
                          ActionListener yesListener,
                          ActionListener noListener)
Post a localized question in a modal question dialog. This method does not block. If the user presses the yes button, the dialog will be hidden and yesListener will be notified. If the user presses the no button, the dialog will be hidden and the noListener will be notified.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
questionMessage - Localized question to display.
yesListener - Notified when user press yes button.
noListener - Notified when user press no button.
 o postQuestion
 public void postQuestion(String questionMessage,
                          ActionListener yesListener,
                          ActionListener noListener,
                          String yesLabel,
                          String noLabel)
Post a localized question in a modal question dialog with localized button labels. This method does not block. If the user presses the "yes" button, the dialog will be hidden and yesListener will be notified. If the user presses the "no" button, the dialog will be hidden and the noListener will be notified. After the dialog is hidden, subsequent postings of the question dialog will use YES_LABEL and NO_LABEL resource strings.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
questionMessage - Localized question to display.
yesListener - Notified when user press yes button.
noListener - Notified when user press no button.
yesLabel - Localized label to display on the "yes" button. YES_LABEL will be used if this parameter is null.
noLabel - Localized label to display on the "no" button. NO_LABEL will be used if this parameter is null.
 o postQuestion
 public void postQuestion(String questionMessage,
                          ActionListener yesListener,
                          ActionListener noListener,
                          String yesLabel,
                          String noLabel,
                          String icon)
Post a localized question in a modal question dialog with localized button labels. This method does not block. If the user presses the "yes" button, the dialog will be hidden and yesListener will be notified. If the user presses the "no" button, the dialog will be hidden and the noListener will be notified. After the dialog is hidden, subsequent postings of the question dialog will use YES_LABEL and NO_LABEL resource strings.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
questionMessage - Localized question to display.
yesListener - Notified when user press yes button.
noListener - Notified when user press no button.
yesLabel - Localized label to display on the "yes" button. YES_LABEL will be used if this parameter is null.
noLabel - Localized label to display on the "no" button. NO_LABEL will be used if this parameter is null.
icon - The Icon to show. Should be one of
  • BUSY_ICON
  • ERROR_ICON
  • WARNING_ICON
  • INFO_ICON
  • QUESTION_ICON
See Also:
BUSY_ICON, ERROR_ICON, WARNING_ICON, INFO_ICON, QUESTION_ICON
 o postGlobalQuestion
 public void postGlobalQuestion(String questionMessage,
                                ActionListener yesListener,
                                ActionListener noListener)
Post a localized question in a modal question dialog that prevents input to all clients registered with the current HostContext. This method does not block. If the user presses the yes button, the dialog will be hidden and yesListener will be notified. If the user presses the no button, the dialog will be hidden and the noListener will be notified.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
questionMessage - Localized question to display.
yesListener - Notified when user press yes button.
noListener - Notified when user press no button.
 o postGlobalQuestion
 public void postGlobalQuestion(String questionMessage,
                                ActionListener yesListener,
                                ActionListener noListener,
                                String yesLabel,
                                String noLabel)
Post a localized question in a modal question dialog that prevents input to all clients registered with the current HostContext. This method does not block. If the user presses the yes button, the dialog will be hidden and yesListener will be notified. If the user presses the no button, the dialog will be hidden and the noListener will be notified.

This method may be called from any thread and the event dispatch thread will be used to post the modal dialog.

Parameters:
questionMessage - Localized question to display.
yesListener - Notified when user press yes button.
noListener - Notified when user press no button.
yesLabel - Localized label to display on the "yes" button. YES_LABEL will be used if this parameter is null.
noLabel - Localized label to display on the "no" button. NO_LABEL will be used if this parameter is null.
 o getPrivs
 public void getPrivs(String privs[],
                      ResultListener listener)
Check to see if we have a set of privileges. If we don't, prompt user for the root passwords and use that to get privileges. Called by Task.checkPrivs().

Parameters:
privs - Set of privileges to get.
listener - Gets notified of the result.
 o addKeyCodeShortCut
 public void addKeyCodeShortCut(JButton button,
                                String keyCodeResource)
Add an accelerator to a button using the specified resource.

Parameters:
button - Button to add accelerator to.
keyCodeResource - Specifies a keyCode resource.
 o addKeyCodeShortCut
 public static void addKeyCodeShortCut(JButton button,
                                       int keyCode)
Add an accelerator to a button using the specified keyCode.

Parameters:
button - Button to add accelerator to.
keyCode - Specifies keyCode to add.
 o busy
 public void busy()
Set the cursor to a busy cursor and do not allow user input. This method may be called from any thread and the event dispatch thread will be used to update the busy cursor and block input.

 o busy
 public void busy(ResultListener listener)
Set the cursor to a busy cursor and do not allow user input; notify the caller when the cursor has changed to busy. This method may be called from any thread and the event dispatch thread will be used to update the busy cursor and block input.

Parameters:
listener - Listener notified when the cursor has changed to busy.
 o busy
 public void busy(String busyMsg)
Post a modal busy dialog with a localized busy message and do not allow user input to the dialog parent. This method may be called from any thread and the event dispatch thread will be used to post the busy dialog. It is an error to attempt to post multiple busy dialogs.

Parameters:
busyMsg - Localized busy message to display.
 o busy
 public void busy(String busyMsg,
                  ActionListener cancelListener)
Post a modal busy dialog with a localized busy message and a cancel button; do not allow user input to the dialog parent. This method may be called from any thread and the event dispatch thread will be used to post the busy dialog.

It is an error to attempt to post multiple busy dialogs.

Parameters:
busyMsg - Localized busy message to display.
cancelListener - Display a cancel button on the busy dialog and notify the specified listener when the cancel button is pressed.
 o notBusy
 public void notBusy()
Clear the busy cursor or busy dialog. This method may be called from any thread and the event dispatch thread will be used to update the UI.

 o notBusy
 public void notBusy(ResultListener listener)
Clear the busy cursor or busy dialog. This method may be called from any thread and the event dispatch thread will be used to update the UI.

Parameters:
listener - Listener to notify when the busy cursor or dialog has been cleared.
 o blockInput
 public void blockInput(boolean block)
Prevent (or allow) input to the dialogParent by raising (or lowering) the glassPane. If there is no glass pane, do nothing.

This method may be called from any thread and the event dispatch thread will be used to block (or unblock) input.

Parameters:
block - true if input should be blocked, false if it should be unblocked.
 o blockInput
 public void blockInput(boolean block,
                        ResultListener listener)
Prevent (or allow) input to the dialogParent by raising (or lowering) the glassPane, notifying listener when input has been blocked (or unblocked). If there is no glass pane, do nothing.

This method may be called from any thread and the event dispatch thread will be used to block input.

Parameters:
block - true if input should be blocked, false if it should be unblocked.
listener - Listener to notify when input has been blocked or unblocked.
 o postDialog
 public void postDialog(JPanel panel,
                        String title,
                        ResultListener listener)
Post a custom dialog. This method creates a JDialog and makes panel its contents. When the dialog has been posted, listener.succeeded will be called. The JDialog that was posted may be obtained by calling ResultEvent.getResult on the ResultEvent that is passed to listener.succeeded.

Parameters:
panel - Contents of the custom dialog.
title - Title of the custom dialog.
listener - Gets notified when the dialog has been posted.

All Packages  Class Hierarchy  This Package  Previous  Next  Index