コード例 #1
0
  /**
   * Finds a handle at the given coordinates.
   *
   * @return the hit handle, null if no handle is found.
   */
  public Handle findHandle(int x, int y) {
    Handle handle;

    HandleEnumeration he = selectionHandles();
    while (he.hasNextHandle()) {
      handle = he.nextHandle();
      if (handle.containsPoint(x, y)) {
        return handle;
      }
    }
    return null;
  }
コード例 #2
0
 public void mouseUp(MouseEvent e, int x, int y) {
   super.mouseDrag(e, x, y);
   fAnchorHandle.invokeEnd(x, y, fAnchorX, fAnchorY, view());
 }
コード例 #3
0
 public void mouseDown(MouseEvent e, int x, int y) {
   super.mouseDown(e, x, y);
   fAnchorHandle.invokeStart(x, y, view());
 }