com.swath.cmd
Class MessageBox

java.lang.Object
  extended bycom.swath.Info
      extended bycom.swath.cmd.SwathCommand
          extended bycom.swath.cmd.MessageBox
All Implemented Interfaces:
CommandIfc

public final class MessageBox
extends com.swath.cmd.SwathCommand

Display a message box to the user.
Prompts: -

Since:
SWATH 1.3
See Also:
UserChoice

Field Summary
static int ICON_ERROR
          An 'error' icon.
static int ICON_EXCLAMATION
          An 'exclamation' icon.
static int ICON_INFORMATION
          An 'information' icon.
static int ICON_QUESTION
          A 'question' icon.
static int ICON_STOP
          A 'stop' icon.
static int ICON_WARNING
          A 'warning' icon.
static int RES_ABORT
          Return value 'Abort'.
static int RES_CANCEL
          Return value 'Cancel'.
static int RES_IGNORE
          Return value 'Ignore'.
static int RES_NO
          Return value 'No'.
static int RES_OK
          Return value 'Ok'.
static int RES_RETRY
          Return value 'Retry'.
static int RES_YES
          Return value 'Yes'.
static int TYPE_ABORT_RETRY_IGNORE
          'Abort-Retry-Ignore' message box.
static int TYPE_OK
          'Ok' message box.
static int TYPE_OK_CANCEL
          'Ok-Cancel' message box.
static int TYPE_RETRY_CANCEL
          'Retry-Cancel' message box.
static int TYPE_YES_NO
          'Yes-No' message box.
static int TYPE_YES_NO_CANCEL
          'Yes-No-Cancel' message box.
 
Method Summary
static int exec(java.lang.String text, java.lang.String caption, int icon, int type)
          Display a message box to the user.
 java.lang.String getClassName()
          Gets the command class name.
 java.lang.String getName()
          Gets the name of the command.
 java.util.Enumeration getParams()
          Gets the command parameters.
 boolean initCommand()
           
 boolean isInternal()
          Indicates if this is an internal SWATH command or not.
 boolean isUserDefined()
          Indicates if this command is user defined or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ICON_STOP

public static final int ICON_STOP
A 'stop' icon.

See Also:
Constant Field Values

ICON_ERROR

public static final int ICON_ERROR
An 'error' icon.

See Also:
Constant Field Values

ICON_QUESTION

public static final int ICON_QUESTION
A 'question' icon.

See Also:
Constant Field Values

ICON_EXCLAMATION

public static final int ICON_EXCLAMATION
An 'exclamation' icon.

See Also:
Constant Field Values

ICON_WARNING

public static final int ICON_WARNING
A 'warning' icon.

See Also:
Constant Field Values

ICON_INFORMATION

public static final int ICON_INFORMATION
An 'information' icon.

See Also:
Constant Field Values

TYPE_OK

public static final int TYPE_OK
'Ok' message box.

See Also:
Constant Field Values

TYPE_OK_CANCEL

public static final int TYPE_OK_CANCEL
'Ok-Cancel' message box.

See Also:
Constant Field Values

TYPE_YES_NO

public static final int TYPE_YES_NO
'Yes-No' message box.

See Also:
Constant Field Values

TYPE_YES_NO_CANCEL

public static final int TYPE_YES_NO_CANCEL
'Yes-No-Cancel' message box.

See Also:
Constant Field Values

TYPE_RETRY_CANCEL

public static final int TYPE_RETRY_CANCEL
'Retry-Cancel' message box.

See Also:
Constant Field Values

TYPE_ABORT_RETRY_IGNORE

public static final int TYPE_ABORT_RETRY_IGNORE
'Abort-Retry-Ignore' message box.

See Also:
Constant Field Values

RES_OK

public static final int RES_OK
Return value 'Ok'.

See Also:
Constant Field Values

RES_CANCEL

public static final int RES_CANCEL
Return value 'Cancel'.

See Also:
Constant Field Values

RES_ABORT

public static final int RES_ABORT
Return value 'Abort'.

See Also:
Constant Field Values

RES_RETRY

public static final int RES_RETRY
Return value 'Retry'.

See Also:
Constant Field Values

RES_IGNORE

public static final int RES_IGNORE
Return value 'Ignore'.

See Also:
Constant Field Values

RES_YES

public static final int RES_YES
Return value 'Yes'.

See Also:
Constant Field Values

RES_NO

public static final int RES_NO
Return value 'No'.

See Also:
Constant Field Values
Method Detail

isInternal

public boolean isInternal()
Description copied from interface: CommandIfc
Indicates if this is an internal SWATH command or not.


initCommand

public boolean initCommand()

exec

public static int exec(java.lang.String text,
                       java.lang.String caption,
                       int icon,
                       int type)
                throws java.lang.Exception
Display a message box to the user.

Parameters:
text - The text to display in the message box.
caption - The caption text of the message box or null if the default script caption text should be used.
icon - The icon to display in the message box.
type - The type of message box to display.
Returns:
The user choice.
Throws:
java.lang.Exception
Since:
SWATH 1.3
See Also:
ICON_STOP, ICON_ERROR, ICON_QUESTION, ICON_EXCLAMATION, ICON_WARNING, ICON_INFORMATION, TYPE_OK, TYPE_OK_CANCEL, TYPE_YES_NO, TYPE_YES_NO_CANCEL, TYPE_RETRY_CANCEL, TYPE_ABORT_RETRY_IGNORE, RES_OK, RES_CANCEL, RES_YES, RES_NO, RES_ABORT, RES_RETRY, RES_IGNORE

isUserDefined

public final boolean isUserDefined()
Description copied from interface: CommandIfc
Indicates if this command is user defined or not.

Specified by:
isUserDefined in interface CommandIfc
Returns:
true if user defined, otherwise false.

getName

public final java.lang.String getName()
Description copied from interface: CommandIfc
Gets the name of the command.

Specified by:
getName in interface CommandIfc
Returns:
The command name.

getClassName

public final java.lang.String getClassName()
Description copied from interface: CommandIfc
Gets the command class name.

Specified by:
getClassName in interface CommandIfc
Returns:
The class name.

getParams

public final java.util.Enumeration getParams()
Description copied from interface: CommandIfc
Gets the command parameters.

Specified by:
getParams in interface CommandIfc
Returns:
The command parameters.