git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#51 wip
[nikiroo-utils.git]
/
src
/
jexer
/
demos
/
DemoMainWindow.java
diff --git
a/src/jexer/demos/DemoMainWindow.java
b/src/jexer/demos/DemoMainWindow.java
index c5e599c53bcebade57dbe95ff13e1786d256d4b9..0be7088556e959b2c64c9d725e316ebbfb1b7321 100644
(file)
--- a/
src/jexer/demos/DemoMainWindow.java
+++ b/
src/jexer/demos/DemoMainWindow.java
@@
-44,6
+44,7
@@
import jexer.TTimer;
import jexer.TWidget;
import jexer.TWindow;
import jexer.event.TCommandEvent;
import jexer.TWidget;
import jexer.TWindow;
import jexer.event.TCommandEvent;
+import jexer.layout.StretchLayoutManager;
import static jexer.TCommand.*;
import static jexer.TKeypress.*;
import static jexer.TCommand.*;
import static jexer.TKeypress.*;
@@
-108,6
+109,9
@@
public class DemoMainWindow extends TWindow {
// centered on screen.
super(parent, i18n.getString("windowTitle"), 0, 0, 64, 23, flags);
// centered on screen.
super(parent, i18n.getString("windowTitle"), 0, 0, 64, 23, flags);
+ setLayoutManager(new StretchLayoutManager(getWidth() - 2,
+ getHeight() - 2));
+
int row = 1;
// Add some widgets
int row = 1;
// Add some widgets
@@
-182,7
+186,8
@@
public class DemoMainWindow extends TWindow {
addButton(i18n.getString("ttableButton1"), 35, row,
new TAction() {
public void DO() {
addButton(i18n.getString("ttableButton1"), 35, row,
new TAction() {
public void DO() {
- // TODO
+ new DemoTableWindow(getApplication(),
+ i18n.getString("tableWidgetDemo"));
}
}
);
}
}
);
@@
-250,6
+255,20
@@
public class DemoMainWindow extends TWindow {
}
);
}
);
+ /*
+ addButton("Exception", 35, row + 3,
+ new TAction() {
+ public void DO() {
+ try {
+ throw new RuntimeException("FUBAR'd!");
+ } catch (Exception e) {
+ new jexer.TExceptionDialog(getApplication(), e);
+ }
+ }
+ }
+ );
+ */
+
activate(first);
statusBar = newStatusBar(i18n.getString("statusBar"));
activate(first);
statusBar = newStatusBar(i18n.getString("statusBar"));