Examples of beginUpdate()


Examples of com.mxgraph.model.mxIGraphModel.beginUpdate()

          editorPane.select(start, ende);
        }
        else
        {
          mxIGraphModel model = graphComponent.getGraph().getModel();
          model.beginUpdate();
          try
          {
            graphComponent.stopEditing(false);
            graphComponent.getGraph().toggleCellStyleFlags(
                mxConstants.STYLE_FONTSTYLE,
View Full Code Here

Examples of com.mxgraph.model.mxIGraphModel.beginUpdate()

      boolean isClone)
  {
    mxGraph graph = graphComponent.getGraph();
    mxIGraphModel model = graph.getModel();

    model.beginUpdate();
    try
    {
      if (isClone)
      {
        Object clone = graph.cloneCells(new Object[] { edge })[0];
View Full Code Here

Examples of com.mxgraph.model.mxIGraphModel.beginUpdate()

    mxIGraphModel model = graphComponent.getGraph().getModel();
    mxGeometry geometry = model.getGeometry(edge);

    if (geometry != null)
    {
      model.beginUpdate();
      try
      {
        geometry = (mxGeometry) geometry.clone();

        if (isSource(index) || isTarget(index))
View Full Code Here

Examples of com.mxgraph.model.mxIGraphModel.beginUpdate()

      else
      {
        parentsChanged = null;
      }

      model.beginUpdate();

      try
      {
        TreeNode node = dfs(root, parent, null);
View Full Code Here

Examples of javax.swing.undo.UndoableEditSupport.beginUpdate()

   * Deletes items and post a cut operation to undo support.
   */
  public void cut(List<? extends Selectable> items) {
    // Start a compound edit that deletes items and changes presentation name
    UndoableEditSupport undoSupport = getUndoableEditSupport();
    undoSupport.beginUpdate();
    getPlanController().deleteItems(items);
    // Add a undoable edit to change presentation name
    undoSupport.postEdit(new AbstractUndoableEdit() {
        @Override
        public String getPresentationName() {
View Full Code Here

Examples of javax.swing.undo.UndoableEditSupport.beginUpdate()

            && !(items.get(0) instanceof Compass))) {
      // Always use selection mode after a drop or a paste operation
      getPlanController().setMode(PlanController.Mode.SELECTION);
      // Start a compound edit that adds walls, furniture, rooms, dimension lines and labels to home
      UndoableEditSupport undoSupport = getUndoableEditSupport();
      undoSupport.beginUpdate();
      List<HomePieceOfFurniture> addedFurniture = Home.getFurnitureSubList(items);
      // If magnetism is enabled, adjust furniture size and elevation
      if (this.preferences.isMagnetismEnabled()) {
        for (HomePieceOfFurniture piece : addedFurniture) {
          if (piece.isResizable()) {
View Full Code Here

Examples of javax.swing.undo.UndoableEditSupport.beginUpdate()

        };
    this.home.addFurnitureListener(addedFurnitureListener);
   
    // Start a compound edit that adds furniture to home
    UndoableEditSupport undoSupport = getUndoableEditSupport();
    undoSupport.beginUpdate();
    // Import furniture
    for (String model : importableModels) {
      getFurnitureController().importFurniture(model);
    }
    this.home.removeFurnitureListener(addedFurnitureListener);
View Full Code Here

Examples of javax.swing.undo.UndoableEditSupport.beginUpdate()

                  + Integer.toHexString(u.hashCode())
                  + " updateLevel: 0 listeners: []"
                  + " compoundEdit: null");

    // Check #2.
    u.beginUpdate();
    u.beginUpdate();
    u.addUndoableEditListener(new MyListener());
    u.addUndoableEditListener(new MyListener());
    harness.check(u.toString(),
                  u.getClass().getName() + "@"
View Full Code Here

Examples of javax.swing.undo.UndoableEditSupport.beginUpdate()

                  + " updateLevel: 0 listeners: []"
                  + " compoundEdit: null");

    // Check #2.
    u.beginUpdate();
    u.beginUpdate();
    u.addUndoableEditListener(new MyListener());
    u.addUndoableEditListener(new MyListener());
    harness.check(u.toString(),
                  u.getClass().getName() + "@"
                  + Integer.toHexString(u.hashCode())
View Full Code Here

Examples of javax.swing.undo.UndoableEditSupport.beginUpdate()

    // Check #1.
    ues = new UndoableEditSupport();
    harness.check(ues.getUpdateLevel(), 0);

    // Check #2.
    ues.beginUpdate();
    harness.check(ues.getUpdateLevel(), 1);

    // Check #3.
    ues.beginUpdate();
    harness.check(ues.getUpdateLevel(), 2);
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.