示例#1
0
 private void addAction(final String title, final Action action) {
   actionListBox.addAction(
       title,
       new Action() {
         @Override
         public void doAction() {
           if (closeBeforeAction) {
             close();
           }
           action.doAction();
           if (!closeBeforeAction) {
             close();
           }
         }
       });
   actionListBox.setPreferredSize(
       new TerminalSize(
           actionListBox.getPreferredSize().getColumns(),
           actionListBox.getPreferredSize().getRows() + 1));
 }