com.swath.cmd
Class SetTextMode

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

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

Set the current text mode.
Prompts: -

Since:
SWATH 1.3
See Also:
PrintText

Field Summary
static int COLOR_BLACK
          Color black.
static int COLOR_BLUE
          Color blue.
static int COLOR_CYAN
          Color cyan.
static int COLOR_GREEN
          Color green.
static int COLOR_MAGENTA
          Color magenta.
static int COLOR_RED
          Color red.
static int COLOR_WHITE
          Color white.
static int COLOR_YELLOW
          Color yellow.
static int MODE_BLINK
          Blink mode.
static int MODE_HIGHLIGHT
          Highlight mode.
static int MODE_NORMAL
          Normal mode.
 
Method Summary
static void exec()
          Reset the current text mode to the default setting.
static void exec(int fgColor, int bgColor, int mode)
          Set the current text mode.
 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

COLOR_BLACK

public static final int COLOR_BLACK
Color black.

See Also:
Constant Field Values

COLOR_RED

public static final int COLOR_RED
Color red.

See Also:
Constant Field Values

COLOR_GREEN

public static final int COLOR_GREEN
Color green.

See Also:
Constant Field Values

COLOR_YELLOW

public static final int COLOR_YELLOW
Color yellow.

See Also:
Constant Field Values

COLOR_BLUE

public static final int COLOR_BLUE
Color blue.

See Also:
Constant Field Values

COLOR_MAGENTA

public static final int COLOR_MAGENTA
Color magenta.

See Also:
Constant Field Values

COLOR_CYAN

public static final int COLOR_CYAN
Color cyan.

See Also:
Constant Field Values

COLOR_WHITE

public static final int COLOR_WHITE
Color white.

See Also:
Constant Field Values

MODE_NORMAL

public static final int MODE_NORMAL
Normal mode.

See Also:
Constant Field Values

MODE_HIGHLIGHT

public static final int MODE_HIGHLIGHT
Highlight mode.

See Also:
Constant Field Values

MODE_BLINK

public static final int MODE_BLINK
Blink mode.

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()
                    throws java.lang.Exception
Throws:
java.lang.Exception

exec

public static void exec()
                 throws java.lang.Exception
Reset the current text mode to the default setting.

Throws:
java.lang.Exception
Since:
SWATH 1.7

exec

public static void exec(int fgColor,
                        int bgColor,
                        int mode)
                 throws java.lang.Exception
Set the current text mode.

Parameters:
fgColor - The foreground color.
bgColor - The background color.
mode - Text mode (combine several modes with logic OR: | ): MODE_NORMAL, MODE_HIGHLIGHT or MODE_BLINK.
Throws:
java.lang.Exception
Since:
SWATH 1.3
See Also:
COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW, COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE, MODE_NORMAL, MODE_HIGHLIGHT, MODE_BLINK

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.