Tabnine Logo
DrawingView.findHandle
Code IndexAdd Tabnine to your IDE (free)

How to use
findHandle
method
in
org.jhotdraw.draw.DrawingView

Best Java code snippets using org.jhotdraw.draw.DrawingView.findHandle (Showing top 7 results out of 315)

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Hook method which can be overriden by subclasses to provide
 * specialised behaviour in the event of a multi-click.
 */
protected void handleMultiClick(MouseEvent evt) {
  if (DEBUG) {
    System.out.println("DelegationSelectionTool.handleMultiClick " + evt);
  }
  DrawingView v = getView();
  Point pos = new Point(evt.getX(), evt.getY());
  Handle handle = v.findHandle(pos);
  if (handle == null) {
    v.setHandleDetailLevel(v.getHandleDetailLevel() + 1);
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  public String getToolTipText(DrawingView view, MouseEvent evt) {
    Handle handle = view.findHandle(evt.getPoint());
    if (handle != null) {
      return handle.getToolTipText(evt.getPoint());
    }
    Figure figure = view.findFigure(evt.getPoint());
    if (figure != null) {
      return figure.getToolTipText(viewToDrawing(evt.getPoint()));
    }
    return null;
  }
}
origin: net.imagej/ij-ui-swing

  protected boolean maybeSwitchTool(final MouseEvent event) {
    if (activeTool != null && activeTool.isConstructing()) return false;
    anchor = new Point(event.getX(), event.getY());
    JHotDrawTool tool = creationTool;
    final DrawingView view = getView();
    if (view != null && view.isEnabled()) {
      if (view.findHandle(anchor) != null ||
        (view.findFigure(anchor) != null && view.findFigure(anchor)
          .isSelectable()))
      {
        tool = selectionTool;
      }
    }

    if (activeTool != tool) {
      if (activeTool != null) {
        activeTool.deactivate(getEditor());
      }
      if (tool != null) {
        tool.activate(getEditor());
        if (!isActive()) {
          tool.deactivate(getEditor());
        }
      }
      activeTool = tool;
      return true;
    }
    return false;
  }
}
origin: net.imagej/imagej-ui-swing

final DrawingView view = getView();
if (view != null && view.isEnabled()) {
  if (view.findHandle(anchor) != null ||
    (view.findFigure(anchor) != null && view.findFigure(anchor)
      .isSelectable()))
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

public void updateCursor(DrawingView view, Point p) {
  if (view.isEnabled()) {
    Handle handle = view.findHandle(p);
    if (handle != null) {
      view.setCursor(handle.getCursor());
    } else {
      Figure figure = view.findFigure(p);
      Point2D.Double point = view.viewToDrawing(p);
      Drawing drawing = view.getDrawing();
      while (figure != null && !figure.isSelectable()) {
        figure = drawing.findFigureBehind(point, figure);
      }
      if (figure != null) {
        view.setCursor(figure.getCursor(view.viewToDrawing(p)));
      } else {
        view.setCursor(Cursor.getDefaultCursor());
      }
    }
  } else {
    view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

Handle handle = v.findHandle(pos);
if (handle != null) {
  if (DEBUG) {
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

super.mousePressed(evt);
DrawingView view = getView();
Handle handle = view.findHandle(anchor);
Tool newTracker = null;
if (handle != null) {
org.jhotdraw.drawDrawingViewfindHandle

Javadoc

Finds a handle at the given coordinates.

Popular methods of DrawingView

  • findFigure
    Finds a figure at the given point.
  • isEnabled
    Gets the enabled state of the drawing view. This is a bound property.
  • addFigureSelectionListener
    Add a listener for selection changes in this DrawingView.
  • addKeyListener
    Adds a key listener to the drawing view.
  • addMouseListener
    Adds a mouse listener to the drawing view.
  • addMouseMotionListener
    Adds a mouse motion listener to the drawing view.
  • addNotify
    Informs the view that it has been added to the specified editor. The view must draw the tool of the
  • addPropertyChangeListener
    Adds a property change listener to the drawing view.
  • addToSelection
    Adds a figure to the current selection.
  • clearSelection
    Clears the current selection.
  • drawingToView
    Converts drawing coordinates to view coordinates.
  • findFiguresWithin
    Returns all figures that lie within the specified bounds. The figures are returned in Z-order from b
  • drawingToView,
  • findFiguresWithin,
  • getActiveHandle,
  • getCompatibleHandles,
  • getComponent,
  • getConstrainer,
  • getDrawing,
  • getDrawingToViewTransform,
  • getEditor

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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