public static class TextRegion.Cmd
extends Object
This static class is included as a subordinate to the TextRegion class as a convenience for developers to make it easier to find in the documentation.
Modifier and Type | Field and Description |
---|---|
static int |
BG_ARGB
Specifies the background as an ARGB colour, which also includes the alpha
channel blending value that specifies the level of opacity.
|
static int |
BG_ARGB_INT
Specifies the background as an ARGB colour integer, which also includes the
alpha channel blending value that specifies the level of opacity.
|
static int |
BG_BGRA
Specifies the background as an BGRA colour, which also includes the alpha
channel blending value that specifies the level of opacity.
|
static int |
BG_BGRA_INT
Specifies the background as an BGRA colour integer, which also includes the
alpha channel blending value that specifies the level of opacity.
|
static int |
BG_RGB
Specifies the background as an RGB colour.
|
static int |
BG_RGB_INT
Specifies the background as an RGB colour integer.
|
static int |
BG_VGA
Specifies the background colour by its VGA text mode colour index number,
which must be within the range of 0 through 15 (additional bits will be
ignored).
|
static int |
BLACK
The colour BLACK. Also VGA text mode colour index 0.
|
static int |
BLINK_CLEAR
Clear the BLINK attribute setting.
|
static int |
BLINK_OFF
Disable the BLINK attribute.
|
static int |
BLINK_ON
Enable the BLINK attribute.
|
static int |
BLUE
The colour BLUE. Also VGA text mode colour index 1.
|
static int |
BOTTOM
Move the cursor to the bottom row.
|
static int |
BRIGHT_BLUE
The colour BRIGHT_BLUE. Also VGA text mode colour index 9.
|
static int |
BRIGHT_CYAN
The colour BRIGHT_CYAN. Also VGA text mode colour index 11.
|
static int |
BRIGHT_GREEN
An alias for LIME.
|
static int |
BRIGHT_RED
The colour BRIGHT_RED. Also VGA text mode colour index 12.
|
static int |
BRIGHT_WHITE
The colour WHITE. Also VGA text mode colour index 15.
|
static int |
BROWN
The colour BROWN. Also VGA text mode colour index 6.
|
static int |
CENTRE
Move the cursor to the centre of the screen. Where an even number of
rows or columns is in effect, the centre is decided by rounding off the
result after dividing by the total number of rows and columns each by two.
|
static int |
CLEAR
Clear the screen and move the cursor to the top-left corner.
|
static int |
COL
An alias for X.
|
static int |
COLUMN
An alias for X.
|
static int |
CYAN
The colour CYAN. Also VGA text mode colour index 3.
|
static int |
DOWN
Move the cursor down one row, scrolling if already at the bottom (and the
cursor advancement policy is top-to-bottom {default}).
|
static int |
END
Move the cursor to the right-most column.
|
static int |
FG_ARGB
Specifies the foreground as an ARGB colour, which also includes the alpha
channel blending value that specifies the level of opacity.
|
static int |
FG_ARGB_INT
Specifies the foreground as an ARGB colour integer, which also includes the
alpha channel blending value that specifies the level of opacity.
|
static int |
FG_BGRA
Specifies the foreground as an BGRA colour, which also includes the alpha
channel blending value that specifies the level of opacity.
|
static int |
FG_BGRA_INT
Specifies the foreground as an BGRA colour integer, which also includes the
alpha channel blending value that specifies the level of opacity.
|
static int |
FG_RGB
Specifies the foreground as an RGB colour.
|
static int |
FG_RGB_INT
Specifies the foreground as an RGB colour integer.
|
static int |
FG_VGA
Specifies the foreground colour by its VGA text mode colour index number,
which must be within the range of 0 through 15 (additional bits will be
ignored).
|
static int |
FILL
Fill the specified region with the specified character (without changing
the position of the cursor) using the current foreground and background
colours.
|
static int |
FILL_COLOUR
Fill the specified region with the specified background and foreground
colours (without changing the position of the cursor) without changing any
of the characters.
|
static int |
GRAY
An alias for GREY.
|
static int |
GREEN
The colour GREEN. Also VGA text mode colour index 2.
|
static int |
GREY
The colour GREY. Also VGA text mode colour index 8.
|
static int |
HIDDEN_CLEAR
Clear the HIDDEN attribute.
|
static int |
HIDDEN_OFF
Disable the HIDDEN attribute.
|
static int |
HIDDEN_ON
Enable the HIDDEN attribute.
|
static int |
HOME
Move the cursor to the left-most column.
|
static int |
LEFT
Move the cursor left one column, wrapping around the edge to the previous
row as needed and without scrolling (and the cursor advancement policy is
top-to-bottom {default}).
|
static int |
LIME
The colour LIME. Also VGA text mode colour index 10.
|
static int |
MOVE_DOWN
Move the cursor down one row, unless the cursor is already positioned on
the bottom-most row.
|
static int |
MOVE_LEFT
Move the cursor left one column, unless the cursor is already positioned on
the left-most column.
|
static int |
MOVE_RIGHT
Move the cursor right one column, unless the cursor is already positioned
on the right-most column.
|
static int |
MOVE_UP
Move the cursor up one row, unless the cursor is already positioned on the
top-most row.
|
static int |
NEWLINE
Advance the cursor to the beginning of the next row. If the cursor
is already on the bottom row, then the entire TextRegion will be scrolled
up by 1 row (the cursor will still be advanced to the first column).
|
static int |
PINK
The colour PINK. Also VGA text mode colour index 13.
|
static int |
PRINT
Add multiple characters to the TextRegion, and advance the cursor position
accordingly.
|
static int |
PRINT_RAW
Add multiple characters to the TextRegion, and advance the cursor position
accordingly.
|
static int |
PRINTCH
Add a single character to the TextRegion, and advance the cursor position
accordingly.
|
static int |
PRINTCH_RAW
Add a single character to the TextRegion, and advance the cursor position
accordingly.
|
static int |
PRINTLN
Add multiple characters to the TextRegion, and advance the cursor position
accordingly, with NewLine added.
|
static int |
PRINTLN_RAW
Add multiple characters to the TextRegion, and advance the cursor position
accordingly, with NewLine added.
|
static int |
PURPLE
The colour PURPLE. Also VGA text mode colour index 5.
|
static int |
RED
The colour RED. Also VGA text mode colour index 4.
|
static int |
RESIZE_X
Specify a new size for the TextRegion by number of columns. Existing
text will be retained if the new size is larger, or cropped if the new size
is smaller. The cursor position will also be updated as needed in
order to remain properly within the bounds of the TextRegion.
|
static int |
RESIZE_XY
Specify a new size for the TextRegion by number of columns and rows.
Existing text will be retained if the new size is larger, or cropped if the
new size is smaller. The cursor position will also be updated as
needed in order to remain properly within the bounds of the TextRegion.
|
static int |
RESIZE_Y
Specify a new size for the TextRegion by number of rows. Existing
text will be retained if the new size is larger, or cropped if the new size
is smaller. The cursor position will also be updated as needed in
order to remain properly within the bounds of the TextRegion.
|
static int |
RESIZE_YX
Specify a new size for the TextRegion by number of rows and columns.
Existing text will be retained if the new size is larger, or cropped if the
new size is smaller. The cursor position will also be updated as
needed in order to remain properly within the bounds of the TextRegion.
|
static int |
REVERSE_CLEAR
Clear the REVERSE attribute.
|
static int |
REVERSE_OFF
Disable the REVERSE attribute.
|
static int |
REVERSE_ON
Enable the REVERSE attribute.
|
static int |
RIGHT
Move the cursor right one column, wrapping around the edge to the next row
as needed and with scrolling also as needed (and the cursor advancement
policy is top-to-bottom {default}).
|
static int |
ROW
An alias for Y.
|
static int |
SCROLL_DOWN
Scroll the entire region down by the specified number of rows (without
changing the position of the cursor).
|
static int |
SCROLL_DOWN_AREA
Scroll the specified region down by the specified number of rows (without
changing the position of the cursor).
|
static int |
SCROLL_LEFT
Scroll the entire region left by the specified number of columns (without
changing the position of the cursor).
|
static int |
SCROLL_RIGHT
Scroll the entire region right by the specified number of columns (without
changing the position of the cursor).
|
static int |
SCROLL_UP
Scroll the entire region up by the specified number of rows (without
changing the position of the cursor).
|
static int |
SCROLL_UP_AREA
Scroll the specified region up by the specified number of rows (without
changing the position of the cursor).
|
static int |
STRAFE_DOWN
Move the cursor down one row, or scroll up one row if the cursor is already
positioned on the bottom-most row.
|
static int |
STRAFE_LEFT
Move the cursor left one column, or scroll right one column if the cursor
is already positioned on the left-most column.
|
static int |
STRAFE_RIGHT
Move the cursor right one column, or scroll left one column if the cursor
is already positioned on the right-most column.
|
static int |
STRAFE_UP
Move the cursor up one row, or scroll down one row if the cursor is already
positioned on the top-most row.
|
static int |
STRIKE_CLEAR
Clear the STRIKE attribute.
|
static int |
STRIKE_OFF
Disable the STRIKE attribute.
|
static int |
STRIKE_ON
Enable the STRIKE attribute.
|
static int |
TOP
Move the cursor to the top row.
|
static int |
TRANSPARENT_CLEAR
Clear the TRANSPARENT attribute.
|
static int |
TRANSPARENT_OFF
Disable the TRANSPARENT attribute.
|
static int |
TRANSPARENT_ON
Enable the TRANSPARENT attribute.
|
static int |
UNDERLINE_CLEAR
Clear the UNDERLINE attribute.
|
static int |
UNDERLINE_OFF
Disable the UNDERLINE attribute.
|
static int |
UNDERLINE_ON
Enable the UNDERLINE attribute.
|
static int |
UP
Move the cursor up one row, without scrolling if already at the top (and
the cursor advancement policy is top-to-bottom {default}).
|
static int |
WHITE
The colour WHITE. Also VGA text mode colour index 7.
|
static int |
X
Specifies the column, or "X" coordinate, of the cursor.
|
static int |
XY
Next two arguments specify the current X and Y coordinates of the cursor,
where X comes before Y.
|
static int |
Y
Specifies the row, or "Y" coordinate, of the cursor.
|
static int |
YELLOW
The colour YELLOW. Also VGA text mode colour index 14.
|
static int |
YX
Next two arguments specify the current Y and X coordinates of the cursor,
where Y comes before X.
|
Modifier and Type | Method and Description |
---|---|
static int |
colorToARGB(javafx.scene.paint.Color c)
Converts a javafx.scene.paint.Color object to an ARGB-formatted integer.
|
static int |
colorToBGRA(javafx.scene.paint.Color c)
Converts a javafx.scene.paint.Color object to a BGRA-formatted integer.
|
public static final int BG_ARGB
Arguments:
FG_VGA
,
Constant Field Valuespublic static final int BG_ARGB_INT
Arguments:
BG_VGA
,
Constant Field Valuespublic static final int BG_BGRA
Arguments:
BG_VGA
,
Constant Field Valuespublic static final int BG_BGRA_INT
Arguments:
BG_VGA
,
Constant Field Valuespublic static final int BG_RGB
Arguments:
BG_VGA
,
Constant Field Valuespublic static final int BG_RGB_INT
Arguments:
BG_VGA
,
Constant Field Valuespublic static final int BG_VGA
These are the standard 16 basic colours, which are also provided by name as constant ("static final") values, and should suffice for remaining historically consistent with actual text-mode application colours.
Arguments:
public static final int BLACK
public static final int BLINK_CLEAR
Arguments: None
public static final int BLINK_OFF
Arguments: None
public static final int BLINK_ON
Arguments: None
public static final int BLUE
public static final int BOTTOM
Arguments: None
public static final int BRIGHT_BLUE
public static final int BRIGHT_CYAN
public static final int BRIGHT_GREEN
public static final int BRIGHT_RED
public static final int BRIGHT_WHITE
public static final int BROWN
public static final int CENTRE
Arguments: None
public static final int CLEAR
Arguments: None
public static final int COL
X
,
Constant Field Valuespublic static final int COLUMN
X
,
Constant Field Valuespublic static final int CYAN
public static final int DOWN
Arguments: None
public static final int END
Arguments: None
public static final int FG_ARGB
Arguments:
FG_VGA
,
Constant Field Valuespublic static final int FG_ARGB_INT
Arguments:
FG_VGA
,
Constant Field Valuespublic static final int FG_BGRA
Arguments:
FG_VGA
,
Constant Field Valuespublic static final int FG_BGRA_INT
Arguments:
FG_VGA
,
Constant Field Valuespublic static final int FG_RGB
Arguments:
FG_VGA
,
Constant Field Valuespublic static final int FG_RGB_INT
Arguments:
FG_VGA
,
Constant Field Valuespublic static final int FG_VGA
These are the standard 16 basic colours, which are also provided by name as constant ("static final") values, and should suffice for remaining historically consistent with actual text-mode application colours.
Arguments:
public static final int FILL
Arguments:
Note: Where the area exceeds the TextRegion, the area will be truncated accordingly. If the area specifies 0, no scrolling occurs, but negative row and/or column numbers are calculated as counting in reverse from the bottom or right edges respectively (with -1 indicating the final row or column, -2 indicating the penultimate row or column, etc.).
Note: Fill character(s) will be cycled through repeatedly until the area is filled with them. If no characters are specified, then 0 will be used by default.
public static final int FILL_COLOUR
Arguments:
Note: Where the area exceeds the TextRegion, the area will be truncated accordingly. If the area specifies 0, no scrolling occurs, but negative row and/or column numbers are calculated as counting in reverse from the bottom or right edges respectively (with -1 indicating the final row or column, -2 indicating the penultimate row or column, etc.).
public static final int GRAY
public static final int GREEN
public static final int GREY
public static final int HIDDEN_CLEAR
Arguments: None
public static final int HIDDEN_OFF
Arguments: None
public static final int HIDDEN_ON
Arguments: None
public static final int HOME
Arguments: None
public static final int LEFT
Arguments: None
public static final int LIME
public static final int MOVE_DOWN
Arguments: None
public static final int MOVE_LEFT
Arguments: None
public static final int MOVE_RIGHT
Arguments: None
public static final int MOVE_UP
Arguments: None
public static final int NEWLINE
Arguments: None
public static final int PINK
public static final int PRINT
Functional control characters will work as expected.
Arguments:
public static final int PRINT_RAW
Functional control characters will not function, and will be displayed instead of working as expected.
Arguments:
public static final int PRINTCH
Functional control characters will work as expected.
Arguments:
public static final int PRINTCH_RAW
Functional control characters will not function, and will be displayed instead of working as expected.
Arguments:
public static final int PRINTLN
Functional control characters will work as expected.
Arguments:
public static final int PRINTLN_RAW
Functional control characters will not function, and will be displayed instead of working as expected.
Arguments:
public static final int PURPLE
public static final int RED
public static final int RESIZE_X
Arguments:
RESIZE_Y
,
Constant Field Valuespublic static final int RESIZE_XY
Arguments:
RESIZE_YX
,
Constant Field Valuespublic static final int RESIZE_Y
Arguments:
RESIZE_X
,
Constant Field Valuespublic static final int RESIZE_YX
Arguments:
RESIZE_XY
,
Constant Field Valuespublic static final int REVERSE_CLEAR
Arguments: None
public static final int REVERSE_OFF
Arguments: None
public static final int REVERSE_ON
Arguments: None
public static final int RIGHT
Arguments: None
public static final int ROW
Y
,
Constant Field Valuespublic static final int SCROLL_DOWN
Arguments:
Note: If the number of rows exceeds that of the TextRegion, then the clear() method will simply be called instead.
Note: If the number of rows is 0 or less, then no scrolling occurs.
SCROLL_UP
,
Constant Field Valuespublic static final int SCROLL_DOWN_AREA
Arguments:
Note: Where the area exceeds the TextRegion, the area will be truncated accordingly. If the area specifies 0, no scrolling occurs, but negative row and/or column numbers are calculated as counting in reverse from the bottom or right edges respectively (with -1 indicating the final row or column, -2 indicating the penultimate row or column, etc.).
Note: If the number of rows is 0, no scrolling occurs. If the number or rows is negative, then scrolling occurs in the reverse direction instead.
SCROLL_UP_AREA
,
Constant Field Valuespublic static final int SCROLL_LEFT
Arguments:
Note: If the number of columns exceeds that of the TextRegion, then the clear() method will simply be called instead.
Note: If the number of columns is 0 or less, then no scrolling occurs.
SCROLL_RIGHT
,
Constant Field Valuespublic static final int SCROLL_RIGHT
Arguments:
Note: If the number of columns exceeds that of the TextRegion, then the clear() method will simply be called instead.
Note: If the number of columns is 0 or less, then no scrolling occurs.
SCROLL_LEFT
,
Constant Field Valuespublic static final int SCROLL_UP
Arguments:
Note: If the number of rows exceeds that of the TextRegion, then the clear() method will simply be called instead.
Note: If the number of rows is 0 or less, then no scrolling occurs.
SCROLL_DOWN
,
Constant Field Valuespublic static final int SCROLL_UP_AREA
Arguments:
Note: Where the area exceeds the TextRegion, the area will be truncated accordingly. If the area specifies 0, no scrolling occurs, but negative row and/or column numbers are calculated as counting in reverse from the bottom or right edges respectively (with -1 indicating the final row or column, -2 indicating the penultimate row or column, etc.).
Note: If the number of rows is 0, no scrolling occurs. If the number or rows is negative, then scrolling occurs in the reverse direction instead.
SCROLL_DOWN_AREA
,
Constant Field Valuespublic static final int STRAFE_DOWN
Arguments: None
public static final int STRAFE_LEFT
Arguments: None
public static final int STRAFE_RIGHT
Arguments: None
public static final int STRAFE_UP
Arguments: None
public static final int STRIKE_CLEAR
Arguments: None
public static final int STRIKE_OFF
Arguments: None
public static final int STRIKE_ON
Arguments: None
public static final int TOP
Arguments: None
public static final int TRANSPARENT_CLEAR
Arguments: None
public static final int TRANSPARENT_OFF
Arguments: None
public static final int TRANSPARENT_ON
Arguments: None
public static final int UNDERLINE_CLEAR
Arguments: None
public static final int UNDERLINE_OFF
Arguments: None
public static final int UNDERLINE_ON
Arguments: None
public static final int UP
Arguments: None
public static final int WHITE
public static final int X
Arguments:
As a convenience, a negative column number will be counted starting from the right, so a -1 will translate into the last column, -2 will translate into the penultimate column, and so on.
Note: Any position that exceeds the range will be truncated to fit.
XY
,
YX
,
Constant Field Valuespublic static final int XY
Arguments:
As a convenience, negative row and column numbers will be counted starting from the bottom and right respectively, so a -1 will translate into the bottom row or column, -2 will translate into the penultimate row or column, and so on.
Note: Any position that exceeds the range will be truncated to fit.
X
,
Y
,
YX
,
Constant Field Valuespublic static final int Y
Arguments:
As a convenience, a negative row number will be counted starting from the bottom, so a -1 will translate into the bottom row, -2 will translate into the penultimate row, and so on.
Note: Any position that exceeds the range will be truncated to fit.
XY
,
YX
,
Constant Field Valuespublic static final int YELLOW
public static final int YX
Arguments:
As a convenience, negative row and column numbers will be counted starting from the bottom and right respectively, so a -1 will translate into the bottom row or column, -2 will translate into the penultimate row or column, and so on.
Note: Any position that exceeds the range will be truncated to fit.
X
,
Y
,
XY
,
Constant Field Valuespublic static int colorToARGB(javafx.scene.paint.Color c)
c
- The colour to convertpublic static int colorToBGRA(javafx.scene.paint.Color c)
c
- The colour to convert