Package javax.swing.event

Examples of javax.swing.event.UndoableEditEvent


      if ((object1.canIntersect(object2)) && (object1.getType() != Point.TYPE)) {
        intersectionPoints = (Point[])object1.intersect(object2);
        intersectionPoints[0].addToObjects(objects);
        clearAndHide();
        step.setOutputs(intersectionPoints);
        fireUndoableEditUpdate(new UndoableEditEvent(this, step));
      }
      else {
        JOptionPane.showMessageDialog(this, "Objects cannot intersect",
                                "Try Again", JOptionPane.ERROR_MESSAGE);
        initDialog();
      }
    }
    else if (step.getConstructionType() == INTERSECT_TWO_POINTS) {
      GeometricalObject object1 = (GeometricalObject)step.getInputs()[0];
      GeometricalObject object2 = (GeometricalObject)step.getInputs()[1];
      Point[] intersectionPoints = new Point[2];
      if ((object1.canIntersect(object2)) && (object1.getType() != Point.TYPE)) {
        intersectionPoints = (Point[])object1.intersect(object2);
        intersectionPoints[0].addToObjects(objects);
        intersectionPoints[1].addToObjects(objects);
        clearAndHide();
        step.setOutputs(intersectionPoints);
        fireUndoableEditUpdate(new UndoableEditEvent(this, step));
      }
      else {
        JOptionPane.showMessageDialog(this, "Objects cannot intersect",
                                "Try Again", JOptionPane.ERROR_MESSAGE);
        initDialog();
View Full Code Here


            fireUndoableEdit(edit);
        }
    }

    private void fireUndoableEdit(UndoableEdit edit) {
        listeners.call().undoableEditHappened(new UndoableEditEvent(this, edit));
    }
View Full Code Here

    private void handleEdit(UndoableEdit edit) {
        if (compoundEdits != null && !compoundEdits.isEmpty()) {
            compoundEdits.peek().addEdit(edit);
        } else {
            undoListeners.call().undoableEditHappened(new UndoableEditEvent(this, edit));
        }
    }
View Full Code Here

        event.end();

        fireInsertUpdate(event);
        if (contentEdit != null) {
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        }
    }
View Full Code Here

        event.end();

        fireRemoveUpdate(event);
        if (contentEdit != null) {
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        }
    }
View Full Code Here

                currentOffset = element.getEndOffset();
            }

            event.end();
            fireChangedUpdate(event);
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        } finally {
            writeUnlock();
        }
    }
View Full Code Here

                currentOffset = element.getEndOffset();
            }

            event.end();
            fireChangedUpdate(event);
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        } finally {
            writeUnlock();
        }
    }
View Full Code Here

            buffer.create(specs, event);

            event.end();
            fireInsertUpdate(event);
            if (contentInsert != null) {
                fireUndoableEditUpdate(new UndoableEditEvent(this, event));
            }
        } finally {
            writeUnlock();
        }
    }
View Full Code Here

            buffer.insert(offset, text.length(), specs, event);

            event.end();
            fireInsertUpdate(event);
            if (contentInsert != null) {
                fireUndoableEditUpdate(new UndoableEditEvent(this, event));
            }
        } finally {
            writeUnlock();
        }
    }
View Full Code Here

        event.end();

        fireInsertUpdate(event);
        if (contentEdit != null) {
            fireUndoableEditUpdate(new UndoableEditEvent(this, event));
        }
    }
View Full Code Here

TOP

Related Classes of javax.swing.event.UndoableEditEvent

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.