Package net.morimekta.console.chr
Class Control
- java.lang.Object
-
- net.morimekta.console.chr.Control
-
-
Field Summary
Fields Modifier and Type Field Description static ControlCTRL_DOWNstatic ControlCTRL_LEFTstatic ControlCTRL_RIGHTstatic ControlCTRL_UPstatic ControlCURSOR_ERASEstatic ControlCURSOR_RESTOREstatic ControlCURSOR_SAVEstatic ControlDELETEstatic ControlDOWNstatic ControlDPAD_MIDstatic ControlENDstatic ControlF1static ControlF10static ControlF11NOTE: It is common to use F11 to mean 'fullscreen'.static ControlF12static ControlF2static ControlF3static ControlF4static ControlF5static ControlF6static ControlF7static ControlF8static ControlF9static ControlHOMEstatic ControlINSERTstatic ControlLEFTstatic ControlPAGE_DOWNstatic ControlPAGE_UPstatic ControlRIGHTstatic ControlUP
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intasInteger()Unicode codepoint representing this character.java.lang.StringasString()intcompareTo(Char o)static ControlcursorDown(int num)static ControlcursorLeft(int num)static ControlcursorRight(int num)static ControlcursorSetPos(int line)static ControlcursorSetPos(int line, int col)static ControlcursorUp(int num)booleanequals(java.lang.Object o)inthashCode()intlength()Number of utf-16 characters that this character takes up if enclosed in a java string.intprintableWidth()The number of character spaces taken up by this symbol.java.lang.StringtoString()
-
-
-
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
-
-
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)
-
asInteger
public int asInteger()
Description copied from interface:CharUnicode codepoint representing this character.
-
asString
public java.lang.String asString()
- Specified by:
asStringin interfacenet.morimekta.util.Stringable
-
printableWidth
public int printableWidth()
Description copied from interface:CharThe 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:
printableWidthin interfaceChar- Returns:
- The printable width of the character.
-
length
public int length()
Description copied from interface:CharNumber of utf-16 characters that this character takes up if enclosed in a java string.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-