Package java.awt

Examples of java.awt.Cursor


                Toolkit tk = Toolkit.getDefaultToolkit();
                ImageIcon pointer = new ImageIcon(getClass().getResource("pan.gif"));
                Dimension bestSize = tk.getBestCursorSize(pointer.getIconWidth(), pointer.getIconHeight());
                Image pointerImage = ImageScaler.getOptimalScalingImage(pointer.getImage(),(int) bestSize.getWidth(),
                                                                          (int) bestSize.getHeight());
                Cursor cursor = tk.createCustomCursor(pointerImage, new Point(0, 0), "PP");
                setModeCursor(cursor);
                return;
            } catch (Exception e) {
                // Problem finding image probably, just move on.
            }
View Full Code Here


  public void setCursorPosition(int x, int y) {
    AWTUtil.setCursorPosition(canvas, robot, x, y);
  }

  public void setNativeCursor(Object handle) throws LWJGLException {
    Cursor awt_cursor = (Cursor)handle;
    if (frame != null)
      frame.setCursor(awt_cursor);
  }
View Full Code Here

        @Override
        public void run() {
            try {
                updateProgressBar(0);
                initProgressBar(items.size());  
                list.setCursor(new Cursor(Cursor.WAIT_CURSOR));
               
                setStatus("Deleting " + items.size() + " items from to the database");
               
                if (!DcSwingUtilities.displayQuestion("msgDeleteQuestion")) {
                    return;
                } else {
                    startTask();
                    denyActions();
                    int counter = 1;
                    for (DcObject dco : items) {
                        updateProgressBar(counter);
                       
                        dco.markAsUnchanged();
                       
                        if (counter == items.size()) {
                            Requests requests = getAfterDeleteRequests();
                            for (int j = 0; j < requests.get().length; j++) {
                                dco.addRequest(requests.get()[j]);
                            }
                        }

                        try {
                            dco.delete(true);
                        } catch (ValidationException e) {
                            DcSwingUtilities.displayWarningMessage(e.getMessage());
                        }
                       
                        try {
                            sleep(300);
                        } catch (Exception ignore) {}
                       
                        counter++;
                    }
                   
                    list.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                }
            } finally {
                list.setSelectedIndex(0);
                endTask();
                allowActions();
View Full Code Here

                resetCursor();
            // Set this to null, so that when we're done waiting for
            // the layers, we'll just reset.
            currentMapBeanCursor = null;
        } else if (this.map != null) {
            Cursor newCursor;
            // If we're supposed to be showing the watch, do it, but
            // save the request for when the layers are done.
            if (showWaitCursor && waitingForLayers) {
                newCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
                currentMapBeanCursor = cursor;
View Full Code Here

    }
  }//GEN-LAST:event_pnlLinksMouseDragged

  void pnlLinksMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlLinksMouseReleased
    // Add your handling code here:
    pnlLinks.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
  }//GEN-LAST:event_pnlLinksMouseReleased
View Full Code Here

    pnlLinks.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
  }//GEN-LAST:event_pnlLinksMouseReleased

  void pnlLinksMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlLinksMousePressed
    // Add your handling code here:
    pnlLinks.setCursor(new Cursor(Cursor.MOVE_CURSOR));

    downX = evt.getX();
    downY = evt.getY();
  }//GEN-LAST:event_pnlLinksMousePressed
View Full Code Here

            }
          }

          if (hasHyperlink)
          {
            link.setCursor(new Cursor(Cursor.HAND_CURSOR));
          }

          link.setLocation(
            (int)((element.getX() + offsetX) * realZoom),
            (int)((element.getY() + offsetY) * realZoom)
 
View Full Code Here

    return (float) pnlInScroll.getVisibleRect().getHeight() - 20f;
  }

  void pnlLinksMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlLinksMousePressed
    // Add your handling code here:
    pnlLinks.setCursor(new Cursor(Cursor.MOVE_CURSOR));

    downX = evt.getX();
    downY = evt.getY();
  }//GEN-LAST:event_pnlLinksMousePressed
View Full Code Here

    }
  }//GEN-LAST:event_pnlLinksMouseDragged

  void pnlLinksMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlLinksMouseReleased
    // Add your handling code here:
    pnlLinks.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
  }//GEN-LAST:event_pnlLinksMouseReleased
View Full Code Here

            }
          }

          if (hasHyperlink)
          {
            link.setCursor(new Cursor(Cursor.HAND_CURSOR));
          }

          link.setLocation(
            (int)((element.getX() + offsetX) * realZoom),
            (int)((element.getY() + offsetY) * realZoom)
 
View Full Code Here

TOP

Related Classes of java.awt.Cursor

Copyright © 2018 www.massapicom. 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.