Examples of addUndoableEditListener()


Examples of com.lightcrafts.ui.region.RegionOverlay.addUndoableEditListener()

                    boolean result = super.addEdit(edit);
                    updateButtons();
                    return result;
                }
            };
            overlay.addUndoableEditListener(undo);

            u = new JButton("Undo");
            u.addActionListener(
                new ActionListener() {
                    public void actionPerformed(ActionEvent event) {
View Full Code Here

Examples of javax.swing.text.AbstractDocument.addUndoableEditListener()

            {
                // Persiste el bug, no ha sido arreglado pues hemos salvado alg�n listener
                for(int i = 0; i < undoListeners.length; i++)
                {
                    UndoableEditListener listener = undoListeners[i];
                    dataModel.addUndoableEditListener(listener);
                }
            }
        }
    }
View Full Code Here

Examples of javax.swing.text.DefaultStyledDocument.addUndoableEditListener()

            }
        });

        // create and add the undo/redo manager
        this.undoManager = new TextUndoManager();
        doc.addUndoableEditListener(undoManager);

        // add the undo actions
        undoManager.addPropertyChangeListener(undoAction);
        undoManager.addPropertyChangeListener(redoAction);
View Full Code Here

Examples of javax.swing.text.DefaultStyledDocument.addUndoableEditListener()

            }
        });

        // create and add the undo/redo manager
        this.undoManager = new TextUndoManager();
        doc.addUndoableEditListener(undoManager);

        // add the undo actions
        undoManager.addPropertyChangeListener(undoAction);
        undoManager.addPropertyChangeListener(redoAction);
View Full Code Here

Examples of javax.swing.text.DefaultStyledDocument.addUndoableEditListener()

        doc.setDocumentFilter(new GroovyFilter(doc));
        textEditor.setDocument(doc);

        // create and add the undo/redo manager
        this.undoManager = new TextUndoManager();
        doc.addUndoableEditListener(undoManager);
       
        // add the undo actions
        undoManager.addPropertyChangeListener(undoAction);
        undoManager.addPropertyChangeListener(redoAction);
View Full Code Here

Examples of javax.swing.text.DefaultStyledDocument.addUndoableEditListener()

            }
        });

        // create and add the undo/redo manager
        this.undoManager = new TextUndoManager();
        doc.addUndoableEditListener(undoManager);

        // add the undo actions
        undoManager.addPropertyChangeListener(undoAction);
        undoManager.addPropertyChangeListener(redoAction);
View Full Code Here

Examples of javax.swing.text.Document.addUndoableEditListener()

                    doc.removeUndoableEditListener(getUndoableEditListener());
                }

                doc = (Document)evt.getNewValue();
                if (doc != null) {
                    doc.addUndoableEditListener(getUndoableEditListener());
                }
            }
        }

    }
View Full Code Here

Examples of javax.swing.text.Document.addUndoableEditListener()

        }
       
        Document doc = pane.getDocument();
       
        // Listen for undo and redo events
        doc.addUndoableEditListener(new UndoableEditListener() {
            public void undoableEditHappened(UndoableEditEvent evt) {
                if (isUndoable()) {
                    undomanager.addEdit(evt.getEdit());
                }
            }
View Full Code Here

Examples of javax.swing.text.Document.addUndoableEditListener()

   
    /** Creates new form WikiEditorPanel */
    public WikiEditorPanel() {
        initComponents();
        Document doc = jTextWiki.getDocument();
        doc.addUndoableEditListener(new MyUndoableEditListener());
        jButtonUndo.setAction(undoAction);
        jButtonRedo.setAction(redoAction);
       
    }
   
View Full Code Here

Examples of javax.swing.text.Document.addUndoableEditListener()

  private void makeUndoable(JTextComponent textComponent) {
    // code from: http://stackoverflow.com/a/12030993
    final UndoManager undoManager = new UndoManager();
    Document doc = textComponent.getDocument();
    doc.addUndoableEditListener(new UndoableEditListener() {
      @Override
      public void undoableEditHappened(UndoableEditEvent e) {
        //System.out.println("Add edit");
        undoManager.addEdit(e.getEdit());
      }
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.