/** * Hook for subclassers to implement the animation. Invoke stopAnimation * when finished, startAnimation to resume. This is called whenever the * timer fires and fires an mxEvent.EXECUTE event with no properties. */ public void updateAnimation() { fireEvent(new mxEventObject(mxEvent.EXECUTE)); }
/** * Hook for subclassers to implement the animation. Invoke stopAnimation * when finished, startAnimation to resume. This is called whenever the * timer fires and fires an mxEvent.EXECUTE event with no properties. */ public void updateAnimation() { fireEvent(new mxEventObject(mxEvent.EXECUTE)); }
/** * Fires a repaint event. The optional region is the rectangle that needs * to be repainted. */ public void repaint(mxRectangle region) { fireEvent(new mxEventObject(mxEvent.REPAINT, "region", region)); }
public void dispatch() { // LATER: Remove changes property (deprecated) ((mxGraphModel) source).fireEvent(new mxEventObject( mxEvent.CHANGE, "edit", this, "changes", changes)); } };
/** * Clears the command history. */ public void clear() { history = new ArrayList<mxUndoableEdit>(size); indexOfNextAdd = 0; fireEvent(new mxEventObject(mxEvent.CLEAR)); }
/** * Stops the animation by deleting the timer and fires mxEvent.DONE. */ public void stopAnimation() { if (timer != null) { timer.stop(); timer = null; fireEvent(new mxEventObject(mxEvent.DONE)); } }
public void beginUpdate() { updateLevel++; fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE)); }
public void dispatch() { // LATER: Remove changes property (deprecated) ((mxGraphModel) source).fireEvent(new mxEventObject( mxEvent.CHANGE, "edit", this, "changes", changes)); } };
/** * Stops the animation by deleting the timer and fires mxEvent.DONE. */ public void stopAnimation() { if (timer != null) { timer.stop(); timer = null; fireEvent(new mxEventObject(mxEvent.DONE)); } }
/** * Fires a repaint event. The optional region is the rectangle that needs * to be repainted. */ public void repaint(mxRectangle region) { fireEvent(new mxEventObject(mxEvent.REPAINT, "region", region)); }
public void beginUpdate() { updateLevel++; fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE)); }
/** * Clears the command history. */ public void clear() { history = new ArrayList<mxUndoableEdit>(size); indexOfNextAdd = 0; fireEvent(new mxEventObject(mxEvent.CLEAR)); }
/** * */ public void paint(Graphics g) { g.translate(translate.x, translate.y); eventSource.fireEvent(new mxEventObject(mxEvent.BEFORE_PAINT, "g", g)); super.paint(g); eventSource .fireEvent(new mxEventObject(mxEvent.AFTER_PAINT, "g", g)); g.translate(-translate.x, -translate.y); }
/** * */ public void paint(Graphics g) { g.translate(translate.x, translate.y); eventSource.fireEvent(new mxEventObject(mxEvent.BEFORE_PAINT, "g", g)); super.paint(g); eventSource .fireEvent(new mxEventObject(mxEvent.AFTER_PAINT, "g", g)); g.translate(-translate.x, -translate.y); }
/** * Method to be called to add new undoable edits to the history. */ public void undoableEditHappened(mxUndoableEdit undoableEdit) { trim(); if (size > 0 && size == history.size()) { history.remove(0); } history.add(undoableEdit); indexOfNextAdd = history.size(); fireEvent(new mxEventObject(mxEvent.ADD, "edit", undoableEdit)); }
/** * Method to be called to add new undoable edits to the history. */ public void undoableEditHappened(mxUndoableEdit undoableEdit) { trim(); if (size > 0 && size == history.size()) { history.remove(0); } history.add(undoableEdit); indexOfNextAdd = history.size(); fireEvent(new mxEventObject(mxEvent.ADD, "edit", undoableEdit)); }
/** * Hides the marker and fires a mxEvent.MARK event. */ public void unmark() { if (getParent() != null) { setVisible(false); getParent().remove(this); eventSource.fireEvent(new mxEventObject(mxEvent.MARK)); } }
/** * Hides the marker and fires a mxEvent.MARK event. */ public void unmark() { if (getParent() != null) { setVisible(false); getParent().remove(this); eventSource.fireEvent(new mxEventObject(mxEvent.MARK)); } }
/** * Executes the given atomic change and adds it to the current edit. * * @param change Atomic change to be executed. */ public void execute(mxAtomicGraphModelChange change) { change.execute(); beginUpdate(); currentEdit.add(change); fireEvent(new mxEventObject(mxEvent.EXECUTE, "change", change)); endUpdate(); }
/** * Executes the given atomic change and adds it to the current edit. * * @param change Atomic change to be executed. */ public void execute(mxAtomicGraphModelChange change) { change.execute(); beginUpdate(); currentEdit.add(change); fireEvent(new mxEventObject(mxEvent.EXECUTE, "change", change)); endUpdate(); }