| 1 | Jexer - Java Text User Interface library |
| 2 | ======================================== |
| 3 | |
| 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. |
| 12 | |
| 13 | Two 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 VERY experimental, please consider filing bugs when you |
| 24 | encounter them. |
| 25 | |
| 26 | A demo application showing the existing UI controls is available via |
| 27 | 'java -jar jexer.jar' or 'java -Djexer.AWT=true -jar jexer.jar' . |
| 28 | |
| 29 | |
| 30 | |
| 31 | License |
| 32 | ------- |
| 33 | |
| 34 | This project is licensed LGPL ("GNU Lesser General Public License") |
| 35 | version 3 or greater. See the file LICENSE for the full license text, |
| 36 | which includes both the GPL v3 and the LGPL supplemental terms. |
| 37 | |
| 38 | |
| 39 | |
| 40 | Acknowledgements |
| 41 | ---------------- |
| 42 | |
| 43 | Jexer makes use of the Terminus TrueType font [made available |
| 44 | here](http://files.ax86.net/terminus-ttf/) . |
| 45 | |
| 46 | |
| 47 | |
| 48 | Usage |
| 49 | ----- |
| 50 | |
| 51 | Usage patterns are still being worked on, but in general the goal will |
| 52 | be to build applications somewhat as follows: |
| 53 | |
| 54 | ```Java |
| 55 | import jexer.*; |
| 56 | |
| 57 | public class MyApplication extends TApplication { |
| 58 | |
| 59 | public MyApplication() { |
| 60 | super(); |
| 61 | |
| 62 | // Create standard menus for File and Window |
| 63 | addFileMenu(); |
| 64 | addWindowMenu(); |
| 65 | } |
| 66 | |
| 67 | public static void main(String [] args) { |
| 68 | MyApplication app = new MyApplication(); |
| 69 | app.run(); |
| 70 | } |
| 71 | } |
| 72 | ``` |
| 73 | |
| 74 | See the file demos/Demo1.java for detailed examples. |
| 75 | |
| 76 | |
| 77 | |
| 78 | Known Issues / Arbitrary Decisions |
| 79 | ---------------------------------- |
| 80 | |
| 81 | Some arbitrary design decisions had to be made when either the |
| 82 | obviously expected behavior did not happen or when a specification was |
| 83 | ambiguous. This section describes such issues. |
| 84 | |
| 85 | TTerminalWindow |
| 86 | --------------- |
| 87 | |
| 88 | - TTerminalWindow will hang on input from the remote if the |
| 89 | TApplication is exited before closing the TTerminalWindow. This |
| 90 | is due to a Java limitation/interaction between blocking reads |
| 91 | (necessary to get UTF8 translation correct) and file streams. |
| 92 | |
| 93 | |
| 94 | Roadmap |
| 95 | ------- |
| 96 | |
| 97 | Many tasks remain before calling this version 1.0: |
| 98 | |
| 99 | 0.0.2: |
| 100 | |
| 101 | - AWT: |
| 102 | - Blinking cursor |
| 103 | - ECMA48Backend running on socket |
| 104 | - TTreeView |
| 105 | - TDirectoryList |
| 106 | - TFileOpen |
| 107 | - Decide on naming convention: getText, getValue, getLabel: one or all |
| 108 | of them? |
| 109 | |
| 110 | 0.0.3: |
| 111 | |
| 112 | - TEditor |
| 113 | |
| 114 | 0.0.4: |
| 115 | |
| 116 | - Bugs |
| 117 | - TSubMenu keyboard mnemonic not working |
| 118 | - Making TMenu keyboard accelerators active/inactive |
| 119 | - TDirectoryList cannot be navigated only with keyboard |
| 120 | - TTreeView cannot be navigated only with keyboard |
| 121 | - RangeViolation after dragging scrollbar up/down |
| 122 | |
| 123 | 0.1.0: |
| 124 | |
| 125 | - TWindow |
| 126 | - "Smart placement" for new windows |
| 127 | - ECMATerminal |
| 128 | - Mouse 1006 mode parsing |
| 129 | |
| 130 | Wishlist features (2.0): |
| 131 | |
| 132 | - TTerminal |
| 133 | - Handle resize events (pass to child process) |
| 134 | - xterm mouse handling |
| 135 | - Screen |
| 136 | - Allow complex characters in putCharXY() and detect them in putStrXY(). |
| 137 | - TComboBox |
| 138 | - TListBox |
| 139 | - TSpinner |
| 140 | - TCalendar widget |
| 141 | - TColorPicker widget |
| 142 | - Drag and drop |
| 143 | - TEditor |
| 144 | - TField |
| 145 | - TText |
| 146 | - TTerminal |
| 147 | - TComboBox |
| 148 | |
| 149 | |
| 150 | Screenshots |
| 151 | ----------- |
| 152 | |
| 153 | ![Several Windows Open Including A Terminal](/screenshots/screenshot1.png?raw=true "Several Windows Open Including A Terminal") |
| 154 | |