Commit | Line | Data |
---|---|---|
7d4115a5 KL |
1 | Jexer - Java Text User Interface library |
2 | ======================================== | |
3 | ||
30bd4abd KL |
4 | WARNING: THIS IS ALPHA CODE! |
5 | ||
6 | This library is intended to implement a text-based windowing system | |
7 | loosely reminiscient of Borland's [Turbo | |
8 | Vision](http://en.wikipedia.org/wiki/Turbo_Vision) library. For those | |
9 | wishing to use the actual C++ Turbo Vision library, see [Sergio | |
10 | Sigala's updated version](http://tvision.sourceforge.net/) that runs | |
11 | on many more platforms. | |
7d4115a5 | 12 | |
1ac2ccb1 KL |
13 | Two backends are available: |
14 | ||
30bd4abd KL |
15 | * System.in/out to a command-line ECMA-48 / ANSI X3.64 type terminal |
16 | (tested on Linux + xterm). I/O is handled through terminal escape | |
17 | sequences generated by the library itself: ncurses is not required | |
18 | or linked to. xterm mouse tracking using UTF8 coordinates is | |
19 | supported. This is the default backend on non-Windows platforms. | |
1ac2ccb1 | 20 | |
30bd4abd KL |
21 | * Java AWT UI. This backend can be selected by setting |
22 | jexer.AWT=true. This is the default backend on Windows platforms. | |
bd8d51fa KL |
23 | AWT is experimental, please consider filing bugs when you encounter |
24 | them. The default window size for AWT is 132x40, which is set in | |
25 | jexer.session.AWTSession. | |
1ac2ccb1 KL |
26 | |
27 | A demo application showing the existing UI controls is available via | |
28 | 'java -jar jexer.jar' or 'java -Djexer.AWT=true -jar jexer.jar' . | |
29 | ||
30 | ||
7d4115a5 KL |
31 | |
32 | License | |
33 | ------- | |
34 | ||
30bd4abd | 35 | This project is licensed LGPL ("GNU Lesser General Public License") |
7d4115a5 KL |
36 | version 3 or greater. See the file LICENSE for the full license text, |
37 | which includes both the GPL v3 and the LGPL supplemental terms. | |
38 | ||
39 | ||
30bd4abd KL |
40 | |
41 | Acknowledgements | |
42 | ---------------- | |
43 | ||
44 | Jexer makes use of the Terminus TrueType font [made available | |
45 | here](http://files.ax86.net/terminus-ttf/) . | |
46 | ||
47 | ||
48 | ||
7d4115a5 KL |
49 | Usage |
50 | ----- | |
51 | ||
30bd4abd KL |
52 | Usage patterns are still being worked on, but in general the goal will |
53 | be to build applications somewhat as follows: | |
7d4115a5 KL |
54 | |
55 | ```Java | |
56 | import jexer.*; | |
57 | ||
58 | public class MyApplication extends TApplication { | |
59 | ||
60 | public MyApplication() { | |
fca67db0 | 61 | super(); |
7d4115a5 | 62 | |
fca67db0 KL |
63 | // Create standard menus for File and Window |
64 | addFileMenu(); | |
65 | addWindowMenu(); | |
7d4115a5 KL |
66 | } |
67 | ||
68 | public static void main(String [] args) { | |
fca67db0 KL |
69 | MyApplication app = new MyApplication(); |
70 | app.run(); | |
7d4115a5 KL |
71 | } |
72 | } | |
73 | ``` | |
74 | ||
87a17f3c | 75 | See the file demos/Demo1.java for detailed examples. |
30bd4abd KL |
76 | |
77 | ||
7d4115a5 | 78 | |
92554d64 KL |
79 | Known Issues / Arbitrary Decisions |
80 | ---------------------------------- | |
81 | ||
82 | Some arbitrary design decisions had to be made when either the | |
83 | obviously expected behavior did not happen or when a specification was | |
84 | ambiguous. This section describes such issues. | |
85 | ||
bb35d919 KL |
86 | TTerminalWindow |
87 | --------------- | |
88 | ||
89 | - TTerminalWindow will hang on input from the remote if the | |
69345248 KL |
90 | TApplication is exited before the TTerminalWindow's process has |
91 | closed on its own. This is due to a Java limitation/interaction | |
92 | between blocking reads (which is necessary to get UTF8 translation | |
93 | correct) and file streams. | |
92554d64 | 94 | |
bd8d51fa KL |
95 | - See jexer.tterminal.ECMA48 for more specifics of terminal |
96 | emulation limitations. | |
97 | ||
92554d64 | 98 | |
36338168 KL |
99 | |
100 | ||
7d4115a5 KL |
101 | Roadmap |
102 | ------- | |
103 | ||
30d336cc | 104 | Many tasks remain before calling this version 1.0: |
7d4115a5 | 105 | |
7d4115a5 KL |
106 | 0.0.2: |
107 | ||
69345248 | 108 | - Making TMenu keyboard accelerators active/inactive |
30bd4abd KL |
109 | - AWT: |
110 | - Blinking cursor | |
bd8d51fa | 111 | - Handle kbTab (disable focus traversal BS) |
69345248 | 112 | - Block cursor |
1ac2ccb1 | 113 | - ECMA48Backend running on socket |
cc99cba8 KL |
114 | - TTreeView |
115 | - TDirectoryList | |
b1b355b8 | 116 | - TFileOpen |
30bd4abd KL |
117 | - Decide on naming convention: getText, getValue, getLabel: one or all |
118 | of them? | |
69345248 KL |
119 | - Refactor: |
120 | - TKeypress: | |
121 | - getCh() --> getChar() | |
122 | - getAlt/getCtrl/getShift --> isAltDown / isCtrlDown / isShiftDown | |
123 | - Other boolean getters --> isSomething | |
7d4115a5 KL |
124 | |
125 | 0.0.3: | |
126 | ||
cc99cba8 | 127 | - TEditor |
cc99cba8 KL |
128 | |
129 | 0.0.4: | |
130 | ||
b1b355b8 KL |
131 | - Bugs |
132 | - TSubMenu keyboard mnemonic not working | |
cc99cba8 KL |
133 | - TDirectoryList cannot be navigated only with keyboard |
134 | - TTreeView cannot be navigated only with keyboard | |
135 | - RangeViolation after dragging scrollbar up/down | |
9edb442b | 136 | |
cc99cba8 | 137 | 0.1.0: |
9edb442b | 138 | |
cc99cba8 KL |
139 | - TWindow |
140 | - "Smart placement" for new windows | |
7d4115a5 KL |
141 | |
142 | Wishlist features (2.0): | |
143 | ||
144 | - TTerminal | |
145 | - Handle resize events (pass to child process) | |
7d4115a5 KL |
146 | - Screen |
147 | - Allow complex characters in putCharXY() and detect them in putStrXY(). | |
148 | - TComboBox | |
149 | - TListBox | |
150 | - TSpinner | |
151 | - TCalendar widget | |
152 | - TColorPicker widget | |
153 | - Drag and drop | |
154 | - TEditor | |
155 | - TField | |
156 | - TText | |
157 | - TTerminal | |
158 | - TComboBox | |
92554d64 KL |
159 | |
160 | ||
161 | Screenshots | |
162 | ----------- | |
163 | ||
bb35d919 KL |
164 | ![Several Windows Open Including A Terminal](/screenshots/screenshot1.png?raw=true "Several Windows Open Including A Terminal") |
165 | ||
36338168 KL |
166 | ![Yo Dawg...](/screenshots/yodawg.png?raw=true "Yo Dawg, I heard you |
167 | like text windowing systems, so I ran a text windowing system inside your | |
168 | text windowing system so you can have a terminal in your terminal.") |