import static jexer.TKeypress.*;
/**
- * This window demonstates the TText, THScroller, and TVScroller widgets.
+ * This window demonstates the TEditor widget.
*/
public class DemoEditorWindow extends TWindow {
+ // ------------------------------------------------------------------------
+ // Variables --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Hang onto my TEditor so I can resize it with the window.
*/
private TEditorWidget editField;
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Public constructor makes a text window out of any string.
*
super(parent, title, 0, 0, 44, 22, RESIZABLE);
editField = addEditor(text, 0, 0, 42, 20);
- statusBar = newStatusBar("Editable text window");
+ statusBar = newStatusBar("Editable text demo window");
statusBar.addShortcutKeypress(kbF1, cmHelp, "Help");
statusBar.addShortcutKeypress(kbF2, cmShell, "Shell");
- statusBar.addShortcutKeypress(kbF3, cmOpen, "Open");
statusBar.addShortcutKeypress(kbF10, cmExit, "Exit");
}
"on many more platforms.\n" +
"\n" +
"This library is licensed MIT. See the file LICENSE for the full license\n" +
-"for the details.\n");
+"for the details.\n" +
+"\n" +
+"package jexer.demos;\n" +
+"\n" +
+"import jexer.*;\n" +
+"import jexer.event.*;\n" +
+"import static jexer.TCommand.*;\n" +
+"import static jexer.TKeypress.*;\n" +
+"\n" +
+"/**\n" +
+" * This window demonstates the TText, THScroller, and TVScroller widgets.\n" +
+" */\n" +
+"public class DemoEditorWindow extends TWindow {\n" +
+"\n" +
+"1 2 3 123\n" +
+"\n"
+ );
}
+ // ------------------------------------------------------------------------
+ // TWindow ----------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Handle window/screen resize events.
*