Пример #1
0
 private void rewindToEndActionPerformed(
     java.awt.event.ActionEvent evt) // GEN-FIRST:event_rewindToEndActionPerformed
     { // GEN-HEADEREND:event_rewindToEndActionPerformed
   try {
     Game activeGame = this.getActiveTabGame();
     if (!activeGame.rewindToEnd()) {
       JOptionPane.showMessageDialog(null, Settings.lang("noMoreUndoMovesInMemory"));
     }
   } catch (ArrayIndexOutOfBoundsException exc) {
     JOptionPane.showMessageDialog(null, Settings.lang("activeTabDoesNotExists"));
   } catch (UnsupportedOperationException exc) {
     JOptionPane.showMessageDialog(null, exc.getMessage());
   }
 } // GEN-LAST:event_rewindToEndActionPerformed
Пример #2
0
 private void moveBackItemActionPerformed(
     java.awt.event.ActionEvent evt) // GEN-FIRST:event_moveBackItemActionPerformed
     { // GEN-HEADEREND:event_moveBackItemActionPerformed
   if (getGui() != null && getGui().getGame() != null) {
     getGui().getGame().undo();
   } else {
     try {
       Game activeGame = this.getActiveTabGame();
       if (!activeGame.undo()) {
         JOptionPane.showMessageDialog(null, Settings.lang("noMoreUndoMovesInMemory"));
       }
     } catch (java.lang.ArrayIndexOutOfBoundsException exc) {
       JOptionPane.showMessageDialog(null, Settings.lang("activeTabDoesNotExists"));
     } catch (UnsupportedOperationException exc) {
       JOptionPane.showMessageDialog(null, exc.getMessage());
     }
   }
 } // GEN-LAST:event_moveBackItemActionPerformed