Commit | Line | Data |
---|---|---|
7d4115a5 KL |
1 | Jexer - Java Text User Interface library |
2 | ======================================== | |
3 | ||
3cb99336 | 4 | This library implements a text-based windowing system loosely |
a7f45950 KL |
5 | reminiscent of Borland's [Turbo |
6 | Vision](http://en.wikipedia.org/wiki/Turbo_Vision) system. It looks | |
7 | like this: | |
30bd4abd | 8 | |
01fccda0 | 9 | ![Terminal, Image, Table](/screenshots/new_demo1.png?raw=true "Terminal, Image, Table") |
1ac2ccb1 | 10 | |
a7f45950 KL |
11 | Jexer works on both Xterm-like terminals and Swing, and supports |
12 | images in both Xterm and Swing. On Swing, images are true color: | |
55b4f29b | 13 | |
a7f45950 | 14 | ![Swing Snake Image](/screenshots/snake_swing.png?raw=true "Swing Snake Image") |
1ac2ccb1 | 15 | |
a7f45950 | 16 | On Xterm, images are dithered to a common palette: |
1ac2ccb1 | 17 | |
a7f45950 | 18 | ![Xterm Snake Image](/screenshots/snake_xterm.png?raw=true "Xterm Snake Image") |
1c15371a | 19 | |
1ac2ccb1 | 20 | |
7d4115a5 KL |
21 | |
22 | License | |
23 | ------- | |
24 | ||
a7f45950 | 25 | Jexer is available to all under the MIT License. See the file LICENSE |
e16dda65 | 26 | for the full license text. |
7d4115a5 KL |
27 | |
28 | ||
a7f45950 KL |
29 | |
30 | Obtaining Jexer | |
31 | --------------- | |
1596e11a KL |
32 | |
33 | Jexer is available on Maven Central: | |
34 | ||
35 | ```xml | |
36 | <dependency> | |
37 | <groupId>com.gitlab.klamonte</groupId> | |
38 | <artifactId>jexer</artifactId> | |
f46a119f | 39 | <version>0.3.2</version> |
1596e11a KL |
40 | </dependency> |
41 | ``` | |
42 | ||
a7f45950 KL |
43 | Binary releases are available on SourceForge: |
44 | https://sourceforge.net/projects/jexer/files/jexer/ | |
1596e11a | 45 | |
a7f45950 | 46 | The Jexer source code is hosted at: https://gitlab.com/klamonte/jexer |
30bd4abd | 47 | |
7d4115a5 | 48 | |
4b257bd8 | 49 | |
1f897876 KL |
50 | 1.0.0 Release Coming Soon |
51 | -------------------------- | |
52 | ||
53 | ||
54 | Jexer's original list of features for its 1.0.0 release are undergoing | |
55 | final testing. If you know of a bug or key feature missing, please | |
56 | consider opening an issue | |
57 | [here.](https://gitlab.com/klamonte/jexer/issues) | |
58 | ||
59 | ||
60 | ||
a7f45950 KL |
61 | Documentation |
62 | ------------- | |
4b257bd8 | 63 | |
a7f45950 | 64 | * [Java API Docs](https://jexer.sourceforge.io/apidocs/api/index.html) |
4b257bd8 | 65 | |
a7f45950 | 66 | * [Wiki](https://gitlab.com/klamonte/jexer/wikis/home) |
4b257bd8 | 67 | |
f46a119f KL |
68 | * [Jexer web page](https://jexer.sourceforge.io/) |
69 | ||
0a141b55 KL |
70 | * [Development Standards](https://gitlab.com/klamonte/jexer/wikis/dev-standards) |
71 | ||
528874e2 KL |
72 | |
73 | ||
a7f45950 KL |
74 | Programming Examples |
75 | -------------------- | |
528874e2 KL |
76 | |
77 | The examples/ folder currently contains: | |
78 | ||
79 | * A [prototype tiling window | |
d4c334ef | 80 | manager](/examples/JexerTilingWindowManager.java) in less than 250 |
528874e2 KL |
81 | lines of code. |
82 | ||
9ad2ce4f KL |
83 | * A much slicker [prototype tiling window |
84 | manager](/examples/JexerTilingWindowManager2.java) in less than 200 | |
85 | lines of code. | |
86 | ||
5434cb2b KL |
87 | * A [prototype image thumbnail |
88 | viewer](/examples/JexerImageViewer.java) in less than 350 lines of | |
89 | code. | |
90 | ||
528874e2 KL |
91 | jexer.demos contains official demos showing all of the existing UI |
92 | controls. The demos can be run as follows: | |
4b257bd8 KL |
93 | |
94 | * 'java -jar jexer.jar' . This will use System.in/out with | |
a7f45950 | 95 | Xterm-like sequences on non-Windows non-Mac platforms. On Windows |
92453213 | 96 | and Mac it will use a Swing JFrame. |
4b257bd8 KL |
97 | |
98 | * 'java -Djexer.Swing=true -jar jexer.jar' . This will always use | |
99 | Swing on any platform. | |
100 | ||
101 | * 'java -cp jexer.jar jexer.demos.Demo2 PORT' (where PORT is a | |
a7f45950 KL |
102 | number to run the TCP daemon on). This will use the Xterm backend |
103 | on a telnet server that will update with screen size changes. | |
4b257bd8 | 104 | |
92453213 | 105 | * 'java -cp jexer.jar jexer.demos.Demo3' . This will use |
a7f45950 | 106 | System.in/out with Xterm-like sequences. One can see in the code |
92453213 KL |
107 | how to pass a different InputReader and OutputReader to |
108 | TApplication, permitting a different encoding than UTF-8. | |
109 | ||
110 | * 'java -cp jexer.jar jexer.demos.Demo4' . This demonstrates hidden | |
111 | windows and a custom TDesktop. | |
112 | ||
88a99379 KL |
113 | * 'java -cp jexer.jar jexer.demos.Demo5' . This demonstrates two |
114 | demo applications using different fonts in the same Swing frame. | |
115 | ||
15c86fc2 | 116 | * 'java -cp jexer.jar jexer.demos.Demo6' . This demonstrates two |
a7f45950 | 117 | applications performing I/O across three screens: an Xterm screen |
15c86fc2 | 118 | and Swing screen, monitored from a third Swing screen. |
88a99379 | 119 | |
ba71ae78 KL |
120 | * 'java -cp jexer.jar jexer.demos.Demo7' . This demonstrates the |
121 | BoxLayoutManager, achieving a similar result as the | |
122 | javax.swing.BoxLayout apidocs example. | |
123 | ||
4b257bd8 KL |
124 | |
125 | ||
126 | More Screenshots | |
127 | ---------------- | |
128 | ||
f46a119f KL |
129 | Jexer can be run inside its own terminal window, with support for all |
130 | of its features including images and mouse, and more terminals: | |
131 | ||
465d742a | 132 | ![Yo Dawg...](/screenshots/jexer_sixel_in_sixel.png?raw=true "Yo Dawg, I heard you like text windowing systems, so I ran a text windowing system inside your text windowing system so you can have a terminal in your terminal.") |
4b257bd8 | 133 | |
f46a119f KL |
134 | Sixel output uses a single palette which works OK for a variety of |
135 | real-world images: | |
136 | ||
3cb99336 KL |
137 | ![Sixel Pictures Of Cliffs Of Moher And Buoy](/screenshots/sixel_images.png?raw=true "Sixel Pictures Of Cliffs Of Moher And Buoy") |
138 | ||
f46a119f KL |
139 | The color wheel with that palette is shown below: |
140 | ||
3cb99336 KL |
141 | ![Sixel Color Wheel](/screenshots/sixel_color_wheel.png?raw=true "Sixel Color Wheel") |
142 | ||
4b257bd8 | 143 | |
a7f45950 | 144 | |
9c238a4b KL |
145 | Terminal Support |
146 | ---------------- | |
147 | ||
a7f45950 | 148 | The table below lists terminals tested against Jexer's Xterm backend: |
9c238a4b KL |
149 | |
150 | | Terminal | Environment | Mouse Click | Mouse Cursor | Images | | |
151 | | -------------- | ------------------ | ----------- | ------------ | ------ | | |
152 | | xterm | X11 | yes | yes | yes | | |
f46a119f | 153 | | jexer | CLI, X11, Windows | yes | yes | yes | |
de9f648e | 154 | | mlterm | X11 | yes | yes | yes | |
29dcb861 | 155 | | RLogin | Windows | yes | yes | yes | |
9c238a4b KL |
156 | | alacritty(3) | X11 | yes | yes | no | |
157 | | gnome-terminal | X11 | yes | yes | no | | |
83ca289f KL |
158 | | iTerm2 | Mac | yes | yes | no(5) | |
159 | | kitty(3) | X11 | yes | yes | no | | |
f46a119f | 160 | | lcxterm(3) | CLI, Linux console | yes | yes | no | |
83ca289f | 161 | | mintty | Windows | yes | yes | no(5) | |
f46a119f | 162 | | rxvt-unicode | X11 | yes | yes | no(2) | |
9c238a4b KL |
163 | | xfce4-terminal | X11 | yes | yes | no | |
164 | | aminal(3) | X11 | yes | no | no | | |
165 | | konsole | X11 | yes | no | no | | |
166 | | yakuake | X11 | yes | no | no | | |
cae2b42e | 167 | | Windows Terminal(6) | Windows | no | no | no(2) | |
0bb31542 KL |
168 | | screen | CLI | yes(1) | yes(1) | no(2) | |
169 | | tmux | CLI | yes(1) | yes(1) | no | | |
9c238a4b KL |
170 | | putty | X11, Windows | yes | no | no(2) | |
171 | | Linux | Linux console | no | no | no(2) | | |
172 | | qodem(3) | CLI, Linux console | yes | yes(4) | no | | |
4d184008 | 173 | | qodem-x11(3) | X11 | yes | no | no | |
d033d507 | 174 | | yaft | Linux console (FB) | no | no | yes | |
9c238a4b | 175 | |
0bb31542 | 176 | 1 - Requires mouse support from host terminal. |
9c238a4b KL |
177 | |
178 | 2 - Also fails to filter out sixel data, leaving garbage on screen. | |
179 | ||
180 | 3 - Latest in repository. | |
181 | ||
182 | 4 - Requires TERM=xterm-1003 before starting. | |
183 | ||
83ca289f | 184 | 5 - Sixel images can crash terminal. |
3676d542 | 185 | |
21460f44 | 186 | 6 - Version 0.7.3291.0, on Windows 10.0.18362.30. Tested against |
cae2b42e KL |
187 | WSL-1 Debian instance. |
188 | ||
9c238a4b | 189 | |
4b257bd8 | 190 | |
a7f45950 KL |
191 | See Also |
192 | -------- | |
b5f2a6db | 193 | |
a7f45950 KL |
194 | * [Tranquil Java IDE](https://tjide.sourceforge.io) is a TUI-based |
195 | integrated development environment for the Java language that was | |
196 | built using a very lightly modified GPL version of Jexer. TJ | |
197 | provided a real-world use case to shake out numerous bugs and | |
198 | limitations of Jexer. | |
b5f2a6db | 199 | |
a7f45950 KL |
200 | * [LCXterm](https://lcxterm.sourceforge.io) is a curses-based terminal |
201 | emulator that allows one to use Jexer with full support on the raw | |
202 | Linux console. | |
55b4f29b | 203 | |
a7f45950 KL |
204 | * [ptypipe](https://gitlab.com/klamonte/ptypipe) is a small C utility |
205 | that permits a Jexer TTerminalWindow to resize the running shell | |
206 | when its window is resized. | |
b5f2a6db KL |
207 | |
208 | ||
7d4115a5 | 209 | |
a7f45950 KL |
210 | Acknowledgements |
211 | ---------------- | |
3cb99336 | 212 | |
a7f45950 KL |
213 | Jexer makes use of the Terminus TrueType font [made available |
214 | here](http://files.ax86.net/terminus-ttf/) . |