コード例 #1
0
  public void onPressed(InputEventInfo ev) {
    if (!CGroupController.exists(uuid) || isActive) {
      return;
    }

    isActive = true;

    prevPoint = new Point();

    cuuid = CGroupController.groupdb.get(uuid).getCanvasUID();

    // TranslateMouseListener resizeDragListener = new TranslateMouseListener(canvasUUID, guuid);
    // CCanvasController.canvasdb.get(canvasUUID).addMouseListener(resizeDragListener);
    // CCanvasController.canvasdb.get(canvasUUID).addMouseMotionListener(resizeDragListener);

    // pass click event on to this listener since it will miss it
    // resizeDragListener.mousePressed(ev.getPoint());

    prevPoint.x = 0;
    prevPoint.y = 0;
    mouseDownPoint = null;

    ev.stop();
    BubbleMenu.isPerformingBubbleMenuAction = true;

    System.out.println("CLICKED GROUP MOVE BUTTON");
    // CGroupController.drop(group_uuid);
  }
コード例 #2
0
  public void onPressed(InputEventInfo ev) {
    if (!CGroupController.exists(uuid) || isActive) {
      return;
    }

    isActive = true;
    super.onPressed(ev);
  }
コード例 #3
0
  public void onReleased(InputEventInfo ev) {
    if (CGroupController.exists(uuid)) {
      CGroupController.set_permanent(uuid, true);
    } else if (CStrokeController.exists(uuid)) {
      long new_uuid = Calico.uuid();
      CStrokeController.makeScrap(uuid, new_uuid);
      CGroupController.set_permanent(new_uuid, true);
    }

    ev.stop();

    Calico.logger.debug("CLICKED GROUP PERM BUTTON");

    isActive = false;
  }