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.
-
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.
-
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.
-
CANCEL_LABEL
- The property UIContext.Dialog.cancelLabel is a string
displayed on the cancel button of the busy dialog.
-
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().
-
FONT
- The property UIContext.Dialog.font is the name of the font
to use for dialogs posted via UIContext.
-
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.
-
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().
-
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.
-
MAX_LINE_LEN
-
The property UIContext.Dialog.maxLineLen is the length,
in characters, of the longest line in any error, warning, or
info dialog.
-
NO_LABEL
- The property UIContext.Dialog.noLabel is a string
displayed on the no button of the question dialog.
-
OK_LABEL
- The property UIContext.Dialog.okLabel is a string that is
displayed on the confirmation button of dialogs (e.g.
-
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().
-
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.
-
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.
-
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.
-
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().
-
YES_LABEL
- The property UIContext.Dialog.yesLabel is a string
displayed on the yes button of the question dialog.
-
UIContext()
- Default constructor.
-
UIContext(JComponent)
- Construct a UIContext with the specified dialogParent.
-
UIContext(ResourceStack)
- Protected constructor for creating a UIContext with an existing
ResourceStack.
-
UIContext(ResourceStack, JComponent)
- Protected constructor for creating a UIContext with an existing
ResourceStack and a dialogParent.
-
addKeyCodeShortCut(JButton, int)
- Add an accelerator to a button using the specified keyCode.
-
addKeyCodeShortCut(JButton, String)
- Add an accelerator to a button using the specified resource.
-
blockInput(boolean)
- Prevent (or allow) input to the dialogParent by raising
(or lowering) the glassPane.
-
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).
-
busy()
- Set the cursor to a busy cursor and do not allow user input.
-
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.
-
busy(String)
- Post a modal busy dialog with a localized busy message and do
not allow user input to the dialog parent.
-
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.
-
findFocusTraversable(Container)
- Find a Component in parent's Component hierarchy that
is showing, enabled, and focus traversable.
-
getDialogParent()
- Get the JComponent which will be used for posting dialogs.
-
getHostContext()
- Get the HostContext associated with this UIContext.
-
getPrivs(String[], ResultListener)
- Check to see if we have a set of privileges.
-
getResourceStack()
- Get the ResourceStack associated with this context.
-
notBusy()
- Clear the busy cursor or busy dialog.
-
notBusy(ResultListener)
- Clear the busy cursor or busy dialog.
-
postDialog(JPanel, String, ResultListener)
- Post a custom dialog.
-
postError(String)
- Post a modal error dialog and display a localized error message.
-
postError(String, ActionListener)
- Post a modal error dialog and display a localized error message.
-
postGlobalError(String)
- Post a localized error message in a modal dialog that
prevents input to all clients registered with the current HostContext.
-
postGlobalError(String, ActionListener)
- Post a localized error message in a modal dialog that
prevents input to all clients registered with the current HostContext.
-
postGlobalInfo(String)
- Post a localized information message in a modal dialog that
prevents input to all clients registered with the current HostContext.
-
postGlobalInfo(String, ActionListener)
- Post a localized information message in a modal dialog that
prevents input to all clients registered with the current HostContext.
-
postGlobalQuestion(String, ActionListener, ActionListener)
- Post a localized question in a modal question dialog that
prevents input to all clients registered with the current HostContext.
-
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.
-
postGlobalWarning(String)
- Post a localized warning message in a modal dialog that
prevents input to all clients registered with the current HostContext.
-
postGlobalWarning(String, ActionListener)
- Post a localized warning message in a modal dialog that
prevents input to all clients registered with the current HostContext.
-
postInfo(String)
- Post a modal information dialog and display a localized information
message.
-
postInfo(String, ActionListener)
- Post a modal information dialog and display a localized information
message.
-
postQuestion(String, ActionListener, ActionListener)
- Post a localized question in a modal question dialog.
-
postQuestion(String, ActionListener, ActionListener, String, String)
- Post a localized question in a modal question dialog with
localized button labels.
-
postQuestion(String, ActionListener, ActionListener, String, String, String)
- Post a localized question in a modal question dialog with
localized button labels.
-
postWarning(String)
- Post a modal warning dialog and display a localized warning message.
-
postWarning(String, ActionListener)
- Post a modal warning dialog and display a localized warning message.
-
setCursor(Component, Cursor)
- Workaround for Component.setCursor that actually changes the
cursor without requiring the user to move the mouse.
-
setDialogParent(JComponent)
- Set the dialog parent associated with this context.
-
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.
-
setDialogTitle(String)
- Set the title of subsequent dialogs posted via this context.
-
setHostContext(HostContext)
- Set the HostContext associated with this UIContext.
-
setResourceStack(ResourceStack)
- Sets the resource stack used by this context.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
UIContext
public UIContext()
- Default constructor.
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.
UIContext
protected UIContext(ResourceStack rs)
- Protected constructor for creating a UIContext with an existing
ResourceStack.
- Parameters:
- rs - A ResourceStack to use for this UIContext.
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.
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.
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.
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.
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.
getDialogParent
public JComponent getDialogParent()
- Get the JComponent which will be used for posting dialogs.
- Returns:
- The JComponent that will be used for posting dialogs.
setHostContext
public void setHostContext(HostContext hostContext)
- Set the HostContext associated with this UIContext.
- Parameters:
- hostContext - The HostContext associated with this UIContext.
getHostContext
public HostContext getHostContext()
- Get the HostContext associated with this UIContext.
- Returns:
- HostContext associated with this UIContext.
getResourceStack
public ResourceStack getResourceStack()
- Get the ResourceStack associated with this context.
- Returns:
- The ResourceStack associated with this context.
setResourceStack
public void setResourceStack(ResourceStack stack)
- Sets the resource stack used by this context.
- Parameters:
- stack - The ResourceStack to use
setDialogTitle
public void setDialogTitle(String dialogTitle)
- Set the title of subsequent dialogs posted via this context.
- Parameters:
- dialogTitle - Localized dialog title.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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