X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2FTuiReaderMainWindow.java;h=8f00b493e99238c461746abd46e80fc7b94fbdab;hb=5dd985cf7d5e2bb88b07fd43e7b4a4eda4647181;hp=1de9488ae604a6ac3b070521692cafdaddad01db;hpb=c1873e5678fabf306915c54f9c1736e03e027d60;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/reader/TuiReaderMainWindow.java b/src/be/nikiroo/fanfix/reader/TuiReaderMainWindow.java index 1de9488..8f00b49 100644 --- a/src/be/nikiroo/fanfix/reader/TuiReaderMainWindow.java +++ b/src/be/nikiroo/fanfix/reader/TuiReaderMainWindow.java @@ -4,6 +4,8 @@ import java.util.ArrayList; import java.util.List; import jexer.TAction; +import jexer.TCommand; +import jexer.TKeypress; import jexer.TList; import jexer.TRadioGroup; import jexer.TTreeItem; @@ -11,7 +13,7 @@ import jexer.TTreeView; import jexer.TWindow; import be.nikiroo.fanfix.data.MetaData; -public class TuiReaderMainWindow extends TWindow { +class TuiReaderMainWindow extends TWindow { private TList list; private List listKeys; private List listItems; @@ -20,16 +22,16 @@ public class TuiReaderMainWindow extends TWindow { /** * Constructor. * - * @param parent - * the main application - * @param flags - * bitmask of MODAL, CENTERED, or RESIZABLE + * @param reader + * the reader and main application + * @param stories + * the stories to display */ public TuiReaderMainWindow(TuiReaderApplication reader, List stories) { // Construct a demo window. X and Y don't matter because it will be // centered on screen. - super(reader, "Demo Window", 0, 0, 60, 18, CENTERED | RESIZABLE + super(reader, "Library", 0, 0, 60, 18, CENTERED | RESIZABLE | UNCLOSABLE); this.reader = reader; @@ -55,6 +57,10 @@ public class TuiReaderMainWindow extends TWindow { } }); + // TODO: add the current "type" or filter + statusBar = newStatusBar("Library"); + statusBar.addShortcutKeypress(TKeypress.kbF10, TCommand.cmExit, "Exit"); + if (false) { addLabel("Label (1,1)", 1, 1); addButton("&Button (35,1)", 35, 1, new TAction() {