Tabnine Logo
BezierTool.finishCreation
Code IndexAdd Tabnine to your IDE (free)

How to use
finishCreation
method
in
org.jhotdraw.draw.tool.BezierTool

Best Java code snippets using org.jhotdraw.draw.tool.BezierTool.finishCreation (Showing top 6 results out of 315)

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void mouseClicked(MouseEvent evt) {
  if (createdFigure != null) {
    switch (evt.getClickCount()) {
      case 1:
        if (createdFigure.getNodeCount() > 2) {
          Rectangle r = new Rectangle(getView().drawingToView(createdFigure.getStartPoint()));
          r.grow(2, 2);
          if (r.contains(evt.getX(), evt.getY())) {
            createdFigure.setClosed(true);
            finishCreation(createdFigure, creationView);
            createdFigure = null;
            if (isToolDoneAfterCreation) {
              fireToolDone();
            }
          }
        }
        break;
      case 2:
        finishWhenMouseReleased = null;
        finishCreation(createdFigure, creationView);
        createdFigure = null;
        break;
    }
  }
}
origin: net.imagej/imagej-ui-swing

@Override
protected void finishCreation(final BezierFigure figure,
  final DrawingView drawingView)
{
  super.finishCreation(figure, drawingView);
  final JHotDrawService jHotDrawService =
    getDisplay().getContext().getService(JHotDrawService.class);
  jHotDrawService.linkOverlay(figure, getAdapter(), getDisplay());
}
origin: net.imagej/ij-ui-swing

@Override
protected void finishCreation(final BezierFigure figure,
  final DrawingView drawingView)
{
  super.finishCreation(figure, drawingView);
  final JHotDrawService jHotDrawService =
    getDisplay().getContext().getService(JHotDrawService.class);
  jHotDrawService.linkOverlay(figure, getAdapter(), getDisplay());
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

r.add(evt.getX(), evt.getY());
maybeFireBoundsInvalidated(r);
finishCreation(createdFigure, creationView);
createdFigure = null;
finishWhenMouseReleased = null;
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void deactivate(DrawingEditor editor) {
  super.deactivate(editor);
  getView().setCursor(Cursor.getDefaultCursor());
  if (createdFigure != null) {
    if (anchor != null && mouseLocation != null) {
      Rectangle r = new Rectangle(anchor);
      r.add(mouseLocation);
      if (createdFigure.getNodeCount() > 0 && createdFigure.isClosed()) {
        r.add(getView().drawingToView(createdFigure.getStartPoint()));
      }
      fireAreaInvalidated(r);
    }
    finishCreation(createdFigure, creationView);
    createdFigure = null;
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

finishCreation(createdFigure, creationView);
createdFigure = null;
org.jhotdraw.draw.toolBezierToolfinishCreation

Popular methods of BezierTool

  • <init>
  • addPointToFigure
  • calculateFittedCurve
  • createFigure
  • fireAreaInvalidated
  • fireToolDone
  • fireUndoEvent
  • getDrawing
  • getEditor
  • getView
  • maybeFireBoundsInvalidated
  • maybeFireBoundsInvalidated

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • getContentResolver (Context)
  • requestLocationUpdates (LocationManager)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • 21 Best Atom Packages for 2021
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