X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fdemos%2FDemo8.java;h=3b253d0c5aea2210a6b8013a17bf9de6d12e06ab;hb=469c2b3cf74f88072a9a1e5758379f24b14f469e;hp=d7b75013e08fad7516683a988611879385b6cc72;hpb=5ffeabccc177e9fdadb62002c6d3bf1f6ae650fa;p=nikiroo-utils.git diff --git a/src/jexer/demos/Demo8.java b/src/jexer/demos/Demo8.java index d7b7501..3b253d0 100644 --- a/src/jexer/demos/Demo8.java +++ b/src/jexer/demos/Demo8.java @@ -33,6 +33,7 @@ import java.util.ResourceBundle; import jexer.TApplication; import jexer.TPanel; import jexer.TSplitPane; +import jexer.TTerminalWidget; import jexer.TText; import jexer.TWindow; import jexer.layout.BoxLayoutManager; @@ -67,6 +68,16 @@ public class Demo8 { "This library is licensed MIT. See the file LICENSE for the full license " + "for the details.\n"; + /** + * Menu item: split vertically. + */ + private static final int MENU_SPLIT_VERTICAL = 2000; + + /** + * Menu item: split horizontally. + */ + private static final int MENU_SPLIT_HORIZONTAL = 2001; + // ------------------------------------------------------------------------ // Demo8 ------------------------------------------------------------------ // ------------------------------------------------------------------------ @@ -106,14 +117,21 @@ public class Demo8 { 60, 22); TMenu paneMenu = app.addMenu(i18n.getString("paneMenu")); - paneMenu.addDefaultItem(TMenu.MID_SPLIT_VERTICAL, true); - paneMenu.addDefaultItem(TMenu.MID_SPLIT_HORIZONTAL, true); + paneMenu.addItem(MENU_SPLIT_VERTICAL, + i18n.getString("paneSplitVertical")); + paneMenu.addItem(MENU_SPLIT_HORIZONTAL, + i18n.getString("paneSplitHorizontal")); TSplitPane pane = window.addSplitPane(0, 0, window.getWidth() - 2, window.getHeight() - 2, true); - pane.setLeft(new TText(null, TEXT, 0, 0, 10, 10)); - pane.setRight(new TText(null, TEXT, 0, 0, 10, 10)); + // pane.setLeft(new TText(null, TEXT, 0, 0, 10, 10)); + // pane.setRight(new TText(null, TEXT, 0, 0, 10, 10)); + + // For this demo, let's require ptypipe + System.setProperty("jexer.TTerminal.ptypipe", "true"); + pane.setLeft(new TTerminalWidget(null, 0, 0)); + pane.setRight(new TTerminalWidget(null, 0, 0)); app.run(); }