# Editor backup files
*.java~
*.xml~
-*Makefile~
+
+# Scratch space
+misc/**
0.0.3:
+- TStatusBar
- TEditor
0.0.4:
![Several Windows Open Including A Terminal](/screenshots/screenshot1.png?raw=true "Several Windows Open Including A Terminal")
-![Yo Dawg...](/screenshots/yodawg.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.")
+![Yo Dawg...](/screenshots/yodawg.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.")
+
<target name="main" depends="clean,run"/>
+ <target name="doc" depends="docs"/>
+
<target name="docs" depends="jar">
<javadoc
destdir="docs/api"
author="true"
version="true"
use="true"
- access="private"
+ access="protected"
failonwarning="true"
windowtitle="Jexer - Java Text User Interface - API docs">
import jexer.menu.TMenu;
import jexer.menu.TMenuItem;
import static jexer.TCommand.*;
-import static jexer.TKeypress.*;
/**
* TApplication sets up a full Text User Interface application.
color.setBackColor(Color.getColor(backColor));
colors.put(key, color);
}
+ // All done.
+ reader.close();
}
/**
import java.awt.Cursor;
import java.awt.Font;
import java.awt.FontMetrics;
-import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Point;
*/
class AWTFrame extends JFrame {
+ /**
+ * Serializable version.
+ */
+ private static final long serialVersionUID = 1;
+
/**
* The terminus font resource filename.
*/
*/
private List<TInputEvent> eventQueue;
- /**
- * The reader thread.
- */
- private Thread readerThread;
-
/**
* The last reported mouse X position.
*/
boolean ctrl = false;
char ch = ' ';
boolean isKey = false;
- int fnKey = 0;
if (key.isActionKey()) {
isKey = true;
} else {
break;
default:
if (!alt && ctrl && !shift) {
- ch = key.getKeyText(key.getKeyCode()).charAt(0);
+ ch = KeyEvent.getKeyText(key.getKeyCode()).charAt(0);
}
// Not a special key, put it together
keypress = new TKeypress(false, 0, ch, alt, ctrl, shift);
boolean ctrl = false;
boolean alt = false;
boolean shift = false;
- char keyCh = ch;
- TKeypress key;
// System.err.printf("state: %s ch %c\r\n", state, ch);
final CellAttributes border, final CellAttributes background,
final int borderType, final boolean shadow) {
- int boxTop = top;
- int boxLeft = left;
int boxWidth = right - left;
int boxHeight = bottom - top;
*/
@Override
public void draw() {
- CellAttributes menuColor;
CellAttributes background = getTheme().getColor("tmenu");
- if (getAbsoluteActive()) {
- menuColor = getTheme().getColor("tmenu.highlighted");
- } else {
- menuColor = getTheme().getColor("tmenu");
- }
-
assert (getAbsoluteActive());
// Fill in the interior background
int newY = getChildren().size() + 1;
assert (newY < getHeight());
- TMenuItem menuItem = new TMenuSeparator(this, 1, newY);
+ // We just have to construct it, don't need to hang onto what it
+ // makes.
+ new TMenuSeparator(this, 1, newY);
setHeight(getHeight() + 1);
}
public void draw() {
super.draw();
- CellAttributes background = getTheme().getColor("tmenu");
CellAttributes menuColor;
- CellAttributes menuMnemonicColor;
if (getAbsoluteActive()) {
menuColor = getTheme().getColor("tmenu.highlighted");
- menuMnemonicColor = getTheme().getColor("tmenu.mnemonic.highlighted");
} else {
if (getEnabled()) {
menuColor = getTheme().getColor("tmenu");
- menuMnemonicColor = getTheme().getColor("tmenu.mnemonic");
} else {
menuColor = getTheme().getColor("tmenu.disabled");
- menuMnemonicColor = getTheme().getColor("tmenu.disabled");
}
}
* @param deviceType DeviceType.VT100, DeviceType, XTERM, etc.
* @param baseLang a base language without UTF-8 flag such as "C" or
* "en_US"
- * @return "LANG=en_US", "LANG=en_US.UTF-8", etc.
+ * @return "en_US", "en_US.UTF-8", etc.
*/
public static String deviceTypeLang(final DeviceType deviceType,
final String baseLang) {
private boolean columns132 = false;
/**
+ * Get 132 columns value.
+ *
+ * @return if true, the terminal is in 132 column mode
+ */
+ public final boolean isColumns132() {
+ return columns132;
+ }
+
+ /**
* true = reverse video. Set by DECSCNM.
*/
private boolean reverseVideo = false;
* @param type one of the DeviceType constants to select VT100, VT102,
* VT220, or XTERM
* @param inputStream an InputStream connected to the remote side. For
- * type == XTERM, inputStrem is converted to a Reader with UTF-8
+ * type == XTERM, inputStream is converted to a Reader with UTF-8
* encoding.
* @param outputStream an OutputStream connected to the remote user. For
* type == XTERM, outputStream is converted to a Writer with UTF-8
* Handle a linefeed.
*/
private void linefeed() {
- int i;
if (currentState.cursorY < scrollRegionBottom) {
// Increment screen y
*
* @param ch character from the remote side
*/
- public void consume(char ch) {
+ private void consume(char ch) {
// DEBUG
// System.err.printf("%c", ch);