- java.lang.Object
-
- net.morimekta.strings.chr.Control
-
- All Implemented Interfaces:
Comparable<Char>
,Char
,Stringable
- Direct Known Subclasses:
Color
public class Control extends Object implements Char
https://en.wikipedia.org/wiki/C0_and_C1_control_codes
-
-
Field Summary
Fields Modifier and Type Field Description static Char
ALT_D
static Char
ALT_K
static Char
ALT_U
static Char
ALT_W
static Control
CTRL_DOWN
static Control
CTRL_LEFT
static Control
CTRL_RIGHT
static Control
CTRL_UP
static Control
CURSOR_ERASE
static Control
CURSOR_RESTORE
static Control
CURSOR_SAVE
static Control
DELETE
static Control
DOWN
static Control
DPAD_MID
static Control
END
static Control
F1
static Control
F10
static Control
F11
NOTE: It is common to use F11 to mean 'fullscreen'.static Control
F12
static Control
F2
static Control
F3
static Control
F4
static Control
F5
static Control
F6
static Control
F7
static Control
F8
static Control
F9
static Control
HOME
static Control
INSERT
static Control
LEFT
static Control
PAGE_DOWN
static Control
PAGE_UP
static Control
RIGHT
static Control
UP
-
Fields inherited from interface net.morimekta.strings.chr.Char
ABR, BEL, BS, CR, DEL, EOF, ESC, FF, FS, GS, LF, NUL, RS, TAB, US, VT
-
Fields inherited from interface net.morimekta.strings.Stringable
NULL
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Char
alt(char c)
String
asString()
Make a string representation of the instance value.int
codepoint()
Unicode codepoint representing this character.int
compareTo(Char o)
static Control
cursorDown(int num)
static Control
cursorLeft(int num)
static Control
cursorRight(int num)
static Control
cursorSetPos(int line)
static Control
cursorSetPos(int line, int col)
static Control
cursorUp(int num)
boolean
equals(Object o)
int
hashCode()
int
length()
Number of utf-16 characters that this character takes up if enclosed in a java string.int
printableWidth()
The number of character spaces taken up by this symbol.String
toString()
-
-
-
Field Detail
-
UP
public static final Control UP
-
DOWN
public static final Control DOWN
-
RIGHT
public static final Control RIGHT
-
LEFT
public static final Control LEFT
-
CTRL_UP
public static final Control CTRL_UP
-
CTRL_DOWN
public static final Control CTRL_DOWN
-
CTRL_RIGHT
public static final Control CTRL_RIGHT
-
CTRL_LEFT
public static final Control CTRL_LEFT
-
CURSOR_ERASE
public static final Control CURSOR_ERASE
-
CURSOR_SAVE
public static final Control CURSOR_SAVE
-
CURSOR_RESTORE
public static final Control CURSOR_RESTORE
-
DPAD_MID
public static final Control DPAD_MID
-
INSERT
public static final Control INSERT
-
DELETE
public static final Control DELETE
-
HOME
public static final Control HOME
-
END
public static final Control END
-
PAGE_UP
public static final Control PAGE_UP
-
PAGE_DOWN
public static final Control PAGE_DOWN
-
F1
public static final Control F1
-
F2
public static final Control F2
-
F3
public static final Control F3
-
F4
public static final Control F4
-
F5
public static final Control F5
-
F6
public static final Control F6
-
F7
public static final Control F7
-
F8
public static final Control F8
-
F9
public static final Control F9
-
F10
public static final Control F10
-
F11
public static final Control F11
NOTE: It is common to use F11 to mean 'fullscreen'.
-
F12
public static final Control F12
-
ALT_D
public static final Char ALT_D
-
ALT_W
public static final Char ALT_W
-
ALT_K
public static final Char ALT_K
-
ALT_U
public static final Char ALT_U
-
-
Method Detail
-
cursorSetPos
public static Control cursorSetPos(int line)
-
cursorSetPos
public static Control cursorSetPos(int line, int col)
-
cursorUp
public static Control cursorUp(int num)
-
cursorDown
public static Control cursorDown(int num)
-
cursorRight
public static Control cursorRight(int num)
-
cursorLeft
public static Control cursorLeft(int num)
-
alt
public static Char alt(char c)
-
codepoint
public int codepoint()
Description copied from interface:Char
Unicode codepoint representing this character.
-
asString
public String asString()
Description copied from interface:Stringable
Make a string representation of the instance value.- Specified by:
asString
in interfaceStringable
- Returns:
- The string representation.
-
printableWidth
public int printableWidth()
Description copied from interface:Char
The number of character spaces taken up by this symbol. Usually 1, but 0 for control sequences, control characters, and 2 for wide symbols like CJK characters.- Specified by:
printableWidth
in interfaceChar
- Returns:
- The printable width of the character.
-
length
public int length()
Description copied from interface:Char
Number of utf-16 characters that this character takes up if enclosed in a java string.
-
compareTo
public int compareTo(Char o)
- Specified by:
compareTo
in interfaceComparable<Char>
-
-