2 * Jexer - Java Text User Interface - code pages
6 * Author: Kevin Lamonte, <a href="mailto:kevin.lamonte@gmail.com">kevin.lamonte@gmail.com</a>
8 * License: LGPLv3 or later
10 * Copyright: This module is licensed under the GNU Lesser General
11 * Public License Version 3. Please see the file "COPYING" in this
12 * directory for more information about the GNU Lesser General Public
15 * Copyright (C) 2015 Kevin Lamonte
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public License
19 * as published by the Free Software Foundation; either version 3 of
20 * the License, or (at your option) any later version.
22 * This program is distributed in the hope that it will be useful, but
23 * WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * General Public License for more details.
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this program; if not, see
29 * http://www.gnu.org/licenses/, or write to the Free Software
30 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
35 // Commonly used ASCII characters
38 public static final byte C_NUL = 0x00; // NUL
39 public static final byte C_SOH = 0x01; // SOH
40 public static final byte C_STX = 0x02; // STX
41 public static final byte C_EOT = 0x04; // EOT
42 public static final byte C_ACK = 0x06; // ACK
43 public static final byte C_LF = 0x0A; // Line feed '\n'
44 public static final byte C_CR = 0x0D; // Carriage return '\r'
45 public static final byte C_XON = 0x11; // XON, also known as DC1
46 public static final byte C_XOFF = 0x13; // XOFF, also known as DC3
47 public static final byte C_NAK = 0x15; // NAK
48 public static final byte C_CAN = 0x18; // CAN
49 public static final byte C_SUB = 0x1A; // SUB
50 public static final byte C_ESC = 0x1B; // ESC
54 * Collection of special characters used by the windowing system.
56 public class GraphicsChars
{
59 * CP437 translation map
61 private static final char cp437_chars
[] = {
63 '\u2007', '\u263A', '\u263B', '\u2665', '\u2666', '\u2663', '\u2660', '\u2022',
64 '\u25D8', '\u25CB', '\u25D9', '\u2642', '\u2640', '\u266A', '\u266B', '\u263C',
65 '\u25BA', '\u25C4', '\u2195', '\u203C', '\u00B6', '\u00A7', '\u25AC', '\u21A8',
66 '\u2191', '\u2193', '\u2192', '\u2190', '\u221F', '\u2194', '\u25B2', '\u25BC',
67 '\u0020', '\u0021', '\"', '\u0023', '\u0024', '\u0025', '\u0026', '\'',
69 '\u0028', '\u0029', '\u002a', '\u002b', '\u002c', '\u002d', '\u002e', '\u002f',
70 '\u0030', '\u0031', '\u0032', '\u0033', '\u0034', '\u0035', '\u0036', '\u0037',
71 '\u0038', '\u0039', '\u003a', '\u003b', '\u003c', '\u003d', '\u003e', '\u003f',
72 '\u0040', '\u0041', '\u0042', '\u0043', '\u0044', '\u0045', '\u0046', '\u0047',
73 '\u0048', '\u0049', '\u004a', '\u004b', '\u004c', '\u004d', '\u004e', '\u004f',
74 '\u0050', '\u0051', '\u0052', '\u0053', '\u0054', '\u0055', '\u0056', '\u0057',
75 '\u0058', '\u0059', '\u005a', '\u005b', '\\', '\u005d', '\u005e', '\u005f',
76 '\u0060', '\u0061', '\u0062', '\u0063', '\u0064', '\u0065', '\u0066', '\u0067',
77 '\u0068', '\u0069', '\u006a', '\u006b', '\u006c', '\u006d', '\u006e', '\u006f',
78 '\u0070', '\u0071', '\u0072', '\u0073', '\u0074', '\u0075', '\u0076', '\u0077',
79 '\u0078', '\u0079', '\u007a', '\u007b', '\u007c', '\u007d', '\u007e', '\u007f',
80 '\u00c7', '\u00fc', '\u00e9', '\u00e2', '\u00e4', '\u00e0', '\u00e5', '\u00e7',
81 '\u00ea', '\u00eb', '\u00e8', '\u00ef', '\u00ee', '\u00ec', '\u00c4', '\u00c5',
82 '\u00c9', '\u00e6', '\u00c6', '\u00f4', '\u00f6', '\u00f2', '\u00fb', '\u00f9',
83 '\u00ff', '\u00d6', '\u00dc', '\u00a2', '\u00a3', '\u00a5', '\u20a7', '\u0192',
84 '\u00e1', '\u00ed', '\u00f3', '\u00fa', '\u00f1', '\u00d1', '\u00aa', '\u00ba',
85 '\u00bf', '\u2310', '\u00ac', '\u00bd', '\u00bc', '\u00a1', '\u00ab', '\u00bb',
86 '\u2591', '\u2592', '\u2593', '\u2502', '\u2524', '\u2561', '\u2562', '\u2556',
87 '\u2555', '\u2563', '\u2551', '\u2557', '\u255d', '\u255c', '\u255b', '\u2510',
88 '\u2514', '\u2534', '\u252c', '\u251c', '\u2500', '\u253c', '\u255e', '\u255f',
89 '\u255a', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256c', '\u2567',
90 '\u2568', '\u2564', '\u2565', '\u2559', '\u2558', '\u2552', '\u2553', '\u256b',
91 '\u256a', '\u2518', '\u250c', '\u2588', '\u2584', '\u258c', '\u2590', '\u2580',
92 '\u03b1', '\u00df', '\u0393', '\u03c0', '\u03a3', '\u03c3', '\u00b5', '\u03c4',
93 '\u03a6', '\u0398', '\u03a9', '\u03b4', '\u221e', '\u03c6', '\u03b5', '\u2229',
94 '\u2261', '\u00b1', '\u2265', '\u2264', '\u2320', '\u2321', '\u00f7', '\u2248',
95 '\u00b0', '\u2219', '\u00b7', '\u221a', '\u207f', '\u00b2', '\u25a0', '\u00a0'
99 public static final char HATCH
= cp437_chars
[0xB0];
100 public static final char DOUBLE_BAR
= cp437_chars
[0xCD];
101 public static final char BOX
= cp437_chars
[0xFE];
102 public static final char CHECK
= cp437_chars
[0xFB];
103 public static final char TRIPLET
= cp437_chars
[0xF0];
104 public static final char OMEGA
= cp437_chars
[0xEA];
105 public static final char PI
= cp437_chars
[0xE3];
106 public static final char UPARROW
= cp437_chars
[0x18];
107 public static final char DOWNARROW
= cp437_chars
[0x19];
108 public static final char RIGHTARROW
= cp437_chars
[0x1A];
109 public static final char LEFTARROW
= cp437_chars
[0x1B];
110 public static final char SINGLE_BAR
= cp437_chars
[0xC4];
111 public static final char BACK_ARROWHEAD
= cp437_chars
[0x11];
112 public static final char LRCORNER
= cp437_chars
[0xD9];
113 public static final char URCORNER
= cp437_chars
[0xBF];
114 public static final char LLCORNER
= cp437_chars
[0xC0];
115 public static final char ULCORNER
= cp437_chars
[0xDA];
116 public static final char DEGREE
= cp437_chars
[0xF8];
117 public static final char PLUSMINUS
= cp437_chars
[0xF1];
118 public static final char WINDOW_TOP
= cp437_chars
[0xCD];
119 public static final char WINDOW_LEFT_TOP
= cp437_chars
[0xD5];
120 public static final char WINDOW_RIGHT_TOP
= cp437_chars
[0xB8];
121 public static final char WINDOW_SIDE
= cp437_chars
[0xB3];
122 public static final char WINDOW_LEFT_BOTTOM
= cp437_chars
[0xD4];
123 public static final char WINDOW_RIGHT_BOTTOM
= cp437_chars
[0xBE];
124 public static final char WINDOW_LEFT_TEE
= cp437_chars
[0xC6];
125 public static final char WINDOW_RIGHT_TEE
= cp437_chars
[0xB5];
126 public static final char WINDOW_SIDE_DOUBLE
= cp437_chars
[0xBA];
127 public static final char WINDOW_LEFT_TOP_DOUBLE
= cp437_chars
[0xC9];
128 public static final char WINDOW_RIGHT_TOP_DOUBLE
= cp437_chars
[0xBB];
129 public static final char WINDOW_LEFT_BOTTOM_DOUBLE
= cp437_chars
[0xC8];
130 public static final char WINDOW_RIGHT_BOTTOM_DOUBLE
= cp437_chars
[0xBC];