Example #1
0
 public void undoableEditHappened(UndoableEditEvent e) {
   UndoManager mgr = Undo.getCurrentUndoMgr();
   if (mgr != null && mgr.canRedo()) {
     setToolTipText(mgr.getRedoPresentationName());
     setEnabled(true);
   } else {
     setToolTipText(tipStr);
     setEnabled(false);
   }
 }
Example #2
0
 public VRedoButton(SessionShare sshare, ButtonIF vif, String typ) {
   super(sshare, vif, typ);
   addFocusListener(
       new FocusAdapter() {
         public void focusGained(FocusEvent evt) {
           Undo.restoreLastUndoMgr();
         }
       });
   Undo.addUndoListener(this);
 }
Example #3
0
 public void actionPerformed(ActionEvent e) {
   UndoManager mgr = Undo.getLastUndoMgr();
   if (mgr != null && mgr.canRedo()) mgr.redo();
 }