public void onClick(InputEventInfo ev) { super.onClick(ev); final JFileChooser fc = new JFileChooser(); fc.setFileFilter(new ImageFileFilter()); int returnVal = fc.showOpenDialog( CCanvasController.canvasdb.get(CCanvasController.getCurrentUUID()).getComponent()); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); Networking.send( CImageController.getImageTransferPacket( Calico.uuid(), CCanvasController.getCurrentUUID(), BubbleMenu.lastOpenedPosition.x, BubbleMenu.lastOpenedPosition.y, file)); } // if (this.uuid != 0l && new_uuid != 0l && // CGroupController.groupdb.get(new_uuid).getParentUUID() == 0l) // { // CGroupController.move_start(new_uuid); // CGroupController.move_end(new_uuid, ev.getX(), ev.getY()); // } }
public void onPressed(InputEventInfo ev) { if (!CGroupController.exists(uuid) || isActive) { return; } isActive = true; super.onPressed(ev); }
@Override public void onReleased(InputEventInfo event) { super.onReleased(event); long activeCanvasId = CIntentionCellController.getInstance() .getCellById(CIntentionCellInputHandler.getInstance().getActiveCell()) .getCanvasId(); CCanvasLinkController.getInstance().createLinkToEmptyCanvas(activeCanvasId); }
public void onReleased(InputEventInfo ev) { if (BubbleMenu.highlightedParentGroup != 0l) { CGroupController.groupdb.get(BubbleMenu.highlightedParentGroup).highlight_off(); CGroupController.groupdb.get(BubbleMenu.highlightedParentGroup).highlight_repaint(); BubbleMenu.highlightedParentGroup = 0l; } // This threw a null pointer exception for some reason... if (mouseDownPoint != null) CGroupController.move_end(this.uuid, ev.getX(), ev.getY()); // Update the menu location in case it was dropped into a list // BubbleMenu.moveIconPositions(CGroupController.groupdb.get(guuid).getBounds()); ev.stop(); // PieMenu.isPerformingPieMenuAction = false; if (!CGroupController.groupdb.get(uuid).isPermanent()) { // CGroupController.drop(guuid); } super.onReleased(ev); isActive = false; }