Package javax.swing.undo

Examples of javax.swing.undo.CompoundEdit


        if (Objects.equal(opId, old)) {
            return;
        }
        boolean sendEdit = false;
        if (currentEdit == null) {
            currentEdit = new CompoundEdit();
            sendEdit = true;
        }
        responseGenerator.set(opId);
        currentEdit.addEdit(new ResponseGeneratorEdit(old, opId));
        if (sendEdit) {
View Full Code Here


    }

    public void addOperation(Operation op) {
        boolean sendEdit = false;
        if (currentEdit == null) {
            currentEdit = new CompoundEdit();
            sendEdit = true;
        }
        addOperation(op.getID());
        currentEdit.addEdit(new AddOperationEdit(op.getID()));
        if (sendEdit) {
View Full Code Here

        // are asynchronous we automatically change the response type to NONE),
        // so we need to remember the old value for undo-redo
        ResponseType oldResponseType = getResponseType();
        boolean sendEdit = false;
        if (currentEdit == null) {
            currentEdit = new CompoundEdit();
            sendEdit = true;
        }
        runModes.put(opId, mode);
        sendChange(RUN_MODE, oldMode, mode);
        updateAsynchronousFlag(false);
View Full Code Here

    @Override
    protected void fireUndoableEditUpdate(UndoableEditEvent e) {
        if (partitioner != null) {
            if (edits == null) {
                edits = new CompoundEdit();
            }
            edits.addEdit(e.getEdit());
        }
    }
View Full Code Here

        textComponent.getDocument().addUndoableEditListener(this);
    }

    private void updateEdit(UndoableEdit e) {
        if (compountEdit == null) {
            compountEdit = new CompoundEdit();
        }
        compountEdit.addEdit(e);
    }
View Full Code Here

    public static void startMergedUndo() {
      if ((compoundEdit!= null) && compoundEdit.isInProgress())
        log.error("CompundEdit was not empty when spawning new." +
            " Some Undo-Information could be lost");
      compoundEdit = new CompoundEdit();
     
    }
View Full Code Here

  public void undoableEditHappened(javax.swing.event.UndoableEditEvent e) {
    _timer.stop();
    long currentTime = System.currentTimeMillis();
    Object currentSource = e.getSource();
    if (_editInProgress == null) {
      _editInProgress = new CompoundEdit();
    } else if ((_lastEditSource != currentSource)
        || ((currentTime - _lastEditTime) > EDIT_COMPOSITION_THRESHOLD)) {
      closeEditInProgress(false);
      _editInProgress = new CompoundEdit();
    }
    _editInProgress.addEdit(e.getEdit());
    _lastEditTime = currentTime;
    _lastEditSource = currentSource;
    _timer.restart();
View Full Code Here

TOP

Related Classes of javax.swing.undo.CompoundEdit

Copyright © 2018 www.massapicom. 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.