Tabnine Logo
Drawing.remove
Code IndexAdd Tabnine to your IDE (free)

How to use
remove
method
in
org.jhotdraw.draw.Drawing

Best Java code snippets using org.jhotdraw.draw.Drawing.remove (Showing top 20 results out of 315)

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void undo() throws CannotUndoException {
  super.undo();
  drawing.remove(c);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  public void redo() throws CannotRedoException {
    super.redo();
    for (int i = 0; i
        < deletedFigureIndices.length; i++) {
      drawing.remove(deletedFigures.get(i));
    }
  }
});
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void undo() throws CannotUndoException {
  super.undo();
  addedDrawing.remove(addedFigure);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  protected void failed(Throwable t) {
    JOptionPane.showMessageDialog(getView().getComponent(),
        t.getMessage(),
        null,
        JOptionPane.ERROR_MESSAGE);
    getDrawing().remove(createdFigure);
    fireToolDone();
  }
};
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void undo() throws CannotUndoException {
  super.undo();
  addedDrawing.remove(addedFigure);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void undo() throws CannotUndoException {
  super.undo();
  addedDrawing.remove(addedFigure);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
protected void failed(Throwable t) {
  JOptionPane.showMessageDialog(getView().getComponent(),
      t.getMessage(),
      null,
      JOptionPane.ERROR_MESSAGE);
  getDrawing().remove(createdFigure);
  fireToolDone();
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void deactivate(DrawingEditor editor) {
  if (createdFigure != null) {
    getDrawing().remove(createdFigure);
    createdFigure = null;
  }
  targetFigure = null;
  startConnector = endConnector = null;
  super.deactivate(editor);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  protected void failed(Throwable value) {
    Throwable t = (Throwable) value;
    JOptionPane.showMessageDialog(getView().getComponent(),
        t.getMessage(),
        null,
        JOptionPane.ERROR_MESSAGE);
    getDrawing().remove(createdFigure);
    fireToolDone();
  }
};
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  public void redo() throws CannotRedoException {
    super.redo();
    for (CompositeFigureEvent evt : new ReversedList<CompositeFigureEvent>(deletionEvents)) {
      drawing.remove(evt.getChildFigure());
    }
  }
});
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
@SuppressWarnings("unchecked")
public Collection<Figure> ungroupFigures(DrawingView view, CompositeFigure group) {
  LinkedList<Figure> figures = new LinkedList<Figure>(group.getChildren());
  view.clearSelection();
  group.basicRemoveAllChildren();
  LinkedList<Figure> paths = new LinkedList<Figure>();
  for (Figure f : figures) {
    ODGPathFigure path = new ODGPathFigure();
    path.removeAllChildren();
    for (Map.Entry<AttributeKey, Object> entry : group.getAttributes().entrySet()) {
      path.set(entry.getKey(), entry.getValue());
    }
    path.add(f);
    view.getDrawing().basicAdd(path);
    paths.add(path);
  }
  view.getDrawing().remove(group);
  view.addToSelection(paths);
  return figures;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@SuppressWarnings("unchecked")
@Override
public Collection<Figure> ungroupFigures(DrawingView view, CompositeFigure group) {
  LinkedList<Figure> figures = new LinkedList<Figure>(group.getChildren());
  view.clearSelection();
  group.basicRemoveAllChildren();
  LinkedList<Figure> paths = new LinkedList<Figure>();
  for (Figure f : figures) {
    ODGPathFigure path = new ODGPathFigure();
    path.removeAllChildren();
    for (Map.Entry<AttributeKey, Object> entry : group.getAttributes().entrySet()) {
      path.set(entry.getKey(), entry.getValue());
    }
    path.add(f);
    view.getDrawing().basicAdd(path);
    paths.add(path);
  }
  view.getDrawing().remove(group);
  view.addToSelection(paths);
  return figures;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

public void splitPath(DrawingView view, CompositeFigure group, List<Figure> ungroupedPaths, int[] ungroupedPathsIndices, int[] ungroupedPathsChildCounts) {
  view.clearSelection();
  Iterator<Figure> groupedFigures = new LinkedList<Figure>(group.getChildren()).iterator();
  group.basicRemoveAllChildren();
  view.getDrawing().remove(group);
  SVGPathFigure pathFigure = (SVGPathFigure) group;
  pathFigure.flattenTransform();
  for (int i = 0; i < ungroupedPaths.size(); i++) {
    CompositeFigure path = (CompositeFigure) ungroupedPaths.get(i);
    view.getDrawing().add(ungroupedPathsIndices[i], path);
    path.willChange();
    for (int j = 0; j < ungroupedPathsChildCounts[i]; j++) {
      Figure child = groupedFigures.next();
      child.willChange();
      path.basicAdd(child);
    }
    path.changed();
  }
  view.addToSelection(ungroupedPaths);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  public Collection<Figure> ungroupFigures(DrawingView view, CompositeFigure group) {
// XXX - This code is redundant with UngroupAction
    LinkedList<Figure> figures = new LinkedList<Figure>(group.getChildren());
    view.clearSelection();
    group.basicRemoveAllChildren();
    view.getDrawing().basicAddAll(view.getDrawing().indexOf(group), figures);
    view.getDrawing().remove(group);
    view.addToSelection(figures);
    return figures;
  }

origin: net.imagej/imagej-ui-swing

private void show(final boolean doShow) {
  final JHotDrawImageCanvas canvas = displayViewer.getCanvas();
  final Drawing drawing = canvas.getDrawing();
  final Figure fig = getFigure();
  if (doShow) {
    if (!drawing.contains(fig)) {
      drawing.add(fig);
    }
  }
  else {
    if (drawing.contains(fig)) {
      drawing.remove(fig);
    }
  }
}
origin: net.imagej/ij-ui-swing

private void show(final boolean doShow) {
  final JHotDrawImageCanvas canvas = displayViewer.getCanvas();
  final Drawing drawing = canvas.getDrawing();
  final Figure fig = getFigure();
  if (doShow) {
    if (!drawing.contains(fig)) {
      drawing.add(fig);
    }
  }
  else {
    if (drawing.contains(fig)) {
      drawing.remove(fig);
    }
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override protected void finishCreation(BezierFigure createdFigure, DrawingView creationView) {
    if (DEBUG) System.out.println("PathTool.finishCreation "+createdFigure);
    creationView.getDrawing().remove(createdFigure);
    SVGPathFigure createdPath = createPath();
    createdPath.removeAllChildren();
    createdPath.add(createdFigure);
    creationView.getDrawing().add(createdPath);
    creationView.addToSelection(createdPath);
    fireUndoEvent(createdPath, creationView);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  protected void finishCreation(BezierFigure createdFigure, DrawingView creationView) {
    if (DEBUG) {
      System.out.println("PathTool.finishCreation " + createdFigure);
    }
    creationView.getDrawing().remove(createdFigure);
    SVGPathFigure createdPath = createPath();
    createdPath.removeAllChildren();
    createdPath.add(createdFigure);
    creationView.getDrawing().add(createdPath);
    fireUndoEvent(createdPath, creationView);
    creationView.addToSelection(createdPath);
    if (isToolDoneAfterCreation()) {
      fireToolDone();
    }
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

} else {
  if (createdFigure != null) {
    getDrawing().remove((Figure) getAddedFigure());
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

view.getDrawing().remove(getConnection());
fireAreaInvalidated(getDrawingArea());
org.jhotdraw.drawDrawingremove

Javadoc

Removes a figure from the drawing. The drawing sends a removeNotify message to the figure before it is removed.

Popular methods of Drawing

  • add
    Adds a figure to the drawing. The drawing sends an addNotify message to the figure after it has been
  • contains
  • addAll
    Adds a collection of figures to the drawing. The drawing sends an addNotify message to each figure a
  • addCompositeFigureListener
  • addFigureListener
  • addInputFormat
    Adds an input format to the drawing.
  • addOutputFormat
    Adds an output format to the drawing.
  • addUndoableEditListener
    Adds a listener for undooable edit events.
  • basicAdd
    Reinserts a figure which was temporarily removed using basicRemove. This is a convenience method for
  • basicAddAll
    Reinserts the specified figures which were temporarily removed from the drawing.
  • basicRemoveAll
    Removes the specified figures temporarily from the drawing.
  • bringToFront
    Brings a figure to the front.
  • basicRemoveAll,
  • bringToFront,
  • changed,
  • clone,
  • draw,
  • drawCanvas,
  • findFigure,
  • findFigureBehind,
  • findFigureExcept

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JTextField (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now