| 1 | package be.nikiroo.jvcard.tui.windows; |
| 2 | |
| 3 | import jexer.TAction; |
| 4 | import jexer.TKeypress; |
| 5 | import jexer.TLabel; |
| 6 | import jexer.TWindow; |
| 7 | import be.nikiroo.jvcard.Contact; |
| 8 | |
| 9 | public class TuiContactWindow extends TuiBasicWindow { |
| 10 | public TuiContactWindow(final TuiBasicWindow parent, final Contact contact) { |
| 11 | super(parent, "Contact view"); |
| 12 | |
| 13 | addKeyBinding(TKeypress.kbQ, "Quit", new TAction() { |
| 14 | @Override |
| 15 | public void DO() { |
| 16 | parent.getApplication().closeWindow(TuiContactWindow.this); |
| 17 | } |
| 18 | }); |
| 19 | |
| 20 | addKeyBinding(TKeypress.kbR, "Raw view", new TAction() { |
| 21 | @Override |
| 22 | public void DO() { |
| 23 | @SuppressWarnings("unused") |
| 24 | TWindow w = new TuiRawContactWindow(TuiContactWindow.this, |
| 25 | contact); |
| 26 | } |
| 27 | }); |
| 28 | |
| 29 | @SuppressWarnings("unused") |
| 30 | TLabel l = new TLabel(this, "'r' to see raw view", 0, 0); |
| 31 | } |
| 32 | } |