Examples of Handle


Examples of com.cburch.draw.model.Handle

  }
 
  @Override
  public void cancelMousePress(Canvas canvas) {
    List<CanvasObject> before = beforePressSelection;
    Handle handle = beforePressHandle;
    beforePressSelection = null;
    beforePressHandle = null;
    if (before != null) {
      curAction = IDLE;
      Selection sel = canvas.getSelection();
View Full Code Here

Examples of com.cburch.draw.model.Handle

   
    if (!dragEffective) {
      Location loc = dragEnd;
      CanvasObject o = getObjectAt(model, loc.getX(), loc.getY(), false);
      if (o != null) {
        Handle han = o.canDeleteHandle(loc);
        if (han != null) {
          selection.setHandleSelected(han);
        } else {
          han = o.canInsertHandle(loc);
          if (han != null) {
            selection.setHandleSelected(han);
          }
        }
      }
    }
   
    Location start = dragStart;
    int x1 = e.getX();
    int y1 = e.getY();
    switch (action) {
    case MOVE_ALL:
      Location moveDelta = selection.getMovingDelta();
      if (dragEffective && !moveDelta.equals(Location.create(0, 0))) {
        canvas.doAction(new ModelTranslateAction(model, selected,
            moveDelta.getX(), moveDelta.getY()));
      }
      break;
    case MOVE_HANDLE:
      HandleGesture gesture = curGesture;
      curGesture = null;
      if (dragEffective && gesture != null) {
        ModelMoveHandleAction act;
        act = new ModelMoveHandleAction(model, gesture);
        canvas.doAction(act);
        Handle result = act.getNewHandle();
        if (result != null) {
          Handle h = result.getObject().canDeleteHandle(result.getLocation());
          selection.setHandleSelected(h);
        }
      }
      break;
    case RECT_SELECT:
View Full Code Here

Examples of com.cburch.draw.model.Handle

    switch (curAction) {
    case MOVE_HANDLE:
      HandleGesture gesture = curGesture;
      if (ctrl) {
        Handle h = gesture.getHandle();
        dx = canvas.snapX(h.getX() + dx) - h.getX();
        dy = canvas.snapY(h.getY() + dy) - h.getY();
      }
      curGesture = new HandleGesture(gesture.getHandle(), dx, dy, mods);
      canvas.getSelection().setHandleGesture(curGesture);
      break;
    case MOVE_ALL:
View Full Code Here

Examples of com.cburch.draw.model.Handle

          y = (int) Math.round(zoom * y);
          gCopy.clearRect(x - offs, y - offs, size, size);
          gCopy.drawRect(x - offs, y - offs, size, size);
        }
      }
      Handle selHandle = selection.getSelectedHandle();
      if (selHandle != null) {
        int x = selHandle.getX();
        int y = selHandle.getY();
        if (action == MOVE_ALL && dragEffective) {
          Location delta = selection.getMovingDelta();
          x += delta.getX();
          y += delta.getY();
        }
View Full Code Here

Examples of com.glines.socketio.annotation.Handle

                LOGGER.log(Level.INFO, "Unable to load transport hander class. Error: " + e.getMessage(), e);
                continue;
            }
            // try to load it to see if it is available
            if (load(transportHandlerClass) != null) {
                Handle handle = transportHandlerClass.getAnnotation(Handle.class);
                if (handle != null) {
                    for (TransportType type : handle.value()) {
                        handlerClasses.put(type, transportHandlerClass);
                    }
                }
            }
        }
View Full Code Here

Examples of com.sun.jna.examples.win32.W32API.HANDLE

                int w = win.getWidth();
                int h = win.getHeight();
                HDC screenDC = user.GetDC(null);
                HDC memDC = gdi.CreateCompatibleDC(screenDC);
                HBITMAP hBitmap = null;
                HANDLE oldBitmap = null;
                try {
                    BufferedImage buf =
                        new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE);
                    Graphics2D g = buf.createGraphics();
                    g.setComposite(AlphaComposite.Clear);
View Full Code Here

Examples of com.sun.jna.examples.win32.WinNT.HANDLE

        File f = new File(fileName);
        if (!f.exists()) {
            throw new FileNotFoundException(fileName);
        }

        HANDLE hFile = null;
        try {
            hFile = Kernel32.INSTANCE.CreateFile(fileName, WinNT.GENERIC_READ,
                    WinNT.FILE_SHARE_READ, new WinBase.SECURITY_ATTRIBUTES(),
                    WinNT.OPEN_EXISTING, WinNT.FILE_ATTRIBUTE_NORMAL,
                    new HANDLEByReference().getValue());
View Full Code Here

Examples of com.sun.jna.platform.win32.WinNT.HANDLE

   * @return the process
   */
  public static Process getProcess(int pid)
  {
    WindowsXPProcess result = new WindowsXPProcess();
    HANDLE hProcess = MyKernel32.INSTANCE.OpenProcess(MyKernel32.PROCESS_ALL_ACCESS, false, pid);
    if (hProcess == null)
      hProcess = MyKernel32.INSTANCE.OpenProcess(MyKernel32.PROCESS_QUERY_INFORMATION, false, pid);
    if (hProcess == null)
      return null;

    result._pid = pid;
    result._processInformation = new PROCESS_INFORMATION();
    result._processInformation.dwProcessId = pid;
    result._processInformation.hProcess = hProcess;
    result._cmd = result.getCommandLineInternal();
    // this does not always work (why ??), if so try again, then this
    // normally does
    // on win64 PEB of 64 bit cannot be accessed from wow -> use wmi
    if (result._cmd.equals("?"))
      result._cmd = result.getCommandLineInternalWMI();
    if ("?".equals(result._cmd))
    {
      System.err.println("Could not get commandline");
    }
    else
      System.out.println("Command line of " + pid + ": " + result._cmd);
    PointerByReference hToken = new PointerByReference();
    HANDLE hp = new HANDLE();
    hp.setPointer(hProcess.getPointer());
    if (MyAdvapi.INSTANCE.OpenProcessToken(hp, MyAdvapi.TOKEN_READ, hToken))
    {
      IntByReference dwSize = new IntByReference();
      MyAdvapi.INSTANCE.GetTokenInformation(hToken.getValue(), MyAdvapi.TokenUser, null, 0, dwSize);
      {
View Full Code Here

Examples of com.sun.midp.io.j2me.apdu.Handle

    public static WIMApplication getInstance(SecurityToken token,
            int slotNum, String securityElementID, boolean readOnly) {

        for (int i = 0; i < selectAPDUs.length; i++) {

            Handle h;
            APDUManager.initACL(slotNum, token);
            try {
                h = APDUManager.selectApplication(
                        selectAPDUs[i], (byte) slotNum, token);
            } catch (IOException e) {
View Full Code Here

Examples of es.juanrak.svn.util.jna.W32API.HANDLE

    public HANDLE getValue()
    {
      Pointer p = getPointer(0);
      if (Pointer.PM1.equals(p))
        return INVALID_HANDLE_VALUE;
      return new HANDLE(p);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.