Package javax.swing.undo

Examples of javax.swing.undo.UndoManager.redo()


      // Create a redo button
      this.redoButton = new JButton(new ImageIcon(
          getClass().getResource("resources/Redo16.gif")));
      this.redoButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ev) {
          undoManager.redo();
        }
      });
      this.reverseDirectionButton = new JButton("Reverse");
      this.reverseDirectionButton.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ev) {
View Full Code Here


    // Check home doesn't contain any wall
    assertHomeContains(home);
   
    // 11. Redo 8 times
    for (int i = 0; i < 6; i++) {
      undoManager.redo();
    }
    // Check plan contains the four wall
    assertHomeContains(home, wall1, wall2, wall3, wall4);
    // Check the second and the third wall are selected
    assertSelectionContains(home, wall2, wall3);
View Full Code Here

            private static final long serialVersionUID = 2928127985356997903L;

                public void actionPerformed(ActionEvent e) {
                    try {
                        if (undoManager.canRedo()) {
                            undoManager.redo();
                        }
                    }
                    catch (CannotUndoException ex) {
                    }
                }
View Full Code Here

  private void redoAction(){
    UndoManager undoMgr = theJreepad.getCurrentNode().getArticle().getUndoMgr();
    String redoStyle = undoMgr.getRedoPresentationName();
    try{
      while(redoStyle.equals(undoMgr.getRedoPresentationName()))
        undoMgr.redo();
    }catch(CannotRedoException ex){
      //JOptionPane.showMessageDialog(this, lang.getString("MSG_NOTHING_TO_UNDO"), "No change" , JOptionPane.INFORMATION_MESSAGE);
    }
    updateWindowTitle();
    updateUndoRedoMenuState();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.