Merge branch 'master' of https://github.com/klamonte/jexer
[fanfix.git] / README.md
... / ...
CommitLineData
1Jexer - Java Text User Interface library
2========================================
3
4WARNING: THIS IS ALPHA CODE!
5
6This library is intended to implement a text-based windowing system
7loosely reminiscient of Borland's [Turbo
8Vision](http://en.wikipedia.org/wiki/Turbo_Vision) library. For those
9wishing to use the actual C++ Turbo Vision library, see [Sergio
10Sigala's updated version](http://tvision.sourceforge.net/) that runs
11on many more platforms.
12
13Two backends are available:
14
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.
20
21* Java AWT UI. This backend can be selected by setting
22 jexer.AWT=true. This is the default backend on Windows platforms.
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.
26
27A 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
31
32License
33-------
34
35This project is licensed LGPL ("GNU Lesser General Public License",
36sometimes called the "Library GPL") version 3 or greater. You may
37freely use Jexer in both closed source (proprietary) and open source
38applications, however any changes you make to the Jexer code must be
39made available to your users.
40
41See the file LICENSE for the full license text, which includes both
42the GPL v3 and the LGPL supplemental terms.
43
44
45
46Acknowledgements
47----------------
48
49Jexer makes use of the Terminus TrueType font [made available
50here](http://files.ax86.net/terminus-ttf/) .
51
52
53
54Usage
55-----
56
57Usage patterns are still being worked on, but in general the goal will
58be to build applications somewhat as follows:
59
60```Java
61import jexer.*;
62
63public class MyApplication extends TApplication {
64
65 public MyApplication() {
66 super();
67
68 // Create standard menus for File and Window
69 addFileMenu();
70 addWindowMenu();
71 }
72
73 public static void main(String [] args) {
74 MyApplication app = new MyApplication();
75 app.run();
76 }
77}
78```
79
80See the file demos/Demo1.java for detailed examples.
81
82
83
84Known Issues / Arbitrary Decisions
85----------------------------------
86
87Some arbitrary design decisions had to be made when either the
88obviously expected behavior did not happen or when a specification was
89ambiguous. This section describes such issues.
90
91 TTerminalWindow
92 ---------------
93
94 - TTerminalWindow will hang on input from the remote if the
95 TApplication is exited before the TTerminalWindow's process has
96 closed on its own. This is due to a Java limitation/interaction
97 between blocking reads (which is necessary to get UTF8 translation
98 correct) and file streams.
99
100 - See jexer.tterminal.ECMA48 for more specifics of terminal
101 emulation limitations.
102
103
104
105
106Roadmap
107-------
108
109Many tasks remain before calling this version 1.0:
110
1110.0.2:
112
113- Making TMenu keyboard accelerators active/inactive
114- AWT:
115 - Blinking cursor
116 - Handle kbTab (disable focus traversal BS)
117 - Block cursor
118- ECMA48Backend running on socket
119- TTreeView
120- TDirectoryList
121- TFileOpen
122- Decide on naming convention: getText, getValue, getLabel: one or all
123 of them?
124- Refactor:
125 - TKeypress:
126 - getCh() --> getChar()
127 - getAlt/getCtrl/getShift --> isAltDown / isCtrlDown / isShiftDown
128 - Other boolean getters --> isSomething
129
1300.0.3:
131
132- TEditor
133
1340.0.4:
135
136- Bugs
137 - TSubMenu keyboard mnemonic not working
138 - TDirectoryList cannot be navigated only with keyboard
139 - TTreeView cannot be navigated only with keyboard
140 - RangeViolation after dragging scrollbar up/down
141
1420.1.0:
143
144- TWindow
145 - "Smart placement" for new windows
146
147Wishlist features (2.0):
148
149- TTerminal
150 - Handle resize events (pass to child process)
151- Screen
152 - Allow complex characters in putCharXY() and detect them in putStrXY().
153- TComboBox
154- TListBox
155- TSpinner
156- TCalendar widget
157- TColorPicker widget
158- Drag and drop
159 - TEditor
160 - TField
161 - TText
162 - TTerminal
163 - TComboBox
164
165
166Screenshots
167-----------
168
169![Several Windows Open Including A Terminal](/screenshots/screenshot1.png?raw=true "Several Windows Open Including A Terminal")
170
171![Yo Dawg...](/screenshots/yodawg.png?raw=true "Yo Dawg, I heard you
172 like text windowing systems, so I ran a text windowing system inside your
173 text windowing system so you can have a terminal in your terminal.")