Examples of createCustomCursor()


Examples of ae.java.awt.Toolkit.createCustomCursor()

                    new java.security.PrivilegedExceptionAction() {
                    public Object run() throws Exception {
                        Toolkit toolkit = Toolkit.getDefaultToolkit();
                        Image image = toolkit.getImage(
                           systemCustomCursorDirPrefix + fileName);
                        return toolkit.createCustomCursor(
                                    image, new Point(fx,fy), flocalized);
                    }
                });
            } catch (Exception e) {
                throw new AWTException(
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

                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

Examples of java.awt.Toolkit.createCustomCursor()

        new java.security.PrivilegedExceptionAction() {
        public Object run() throws Exception {
      Toolkit toolkit = Toolkit.getDefaultToolkit();
      Image image = toolkit.getImage(
         systemCustomCursorDirPrefix + fileName);
      return toolkit.createCustomCursor(
            image, new Point(fx,fy), flocalized);
        }
    });
      } catch (Exception e) {
    throw new AWTException(
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

            cx += 1;
        }
        if (d.height%2 == 0) {
            cy += 1;
        }
        Cursor cursor = t.createCustomCursor(cursorImage, new Point(cx, cy), null);
        monitorWindow.setCursor(cursor);

        final double[] roiPts = new double[8];
        final int[] count = { 0 };
        monitorWindow.getCanvas().addMouseListener(new MouseAdapter() {
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

    setAlwaysOnTop(true);
    addKeyListener(this);

    Toolkit tk = Toolkit.getDefaultToolkit();
    Image img = tk.createImage("Texture/cursor.png");
    Cursor cursor = tk.createCustomCursor(img, new Point(8, 8),
        "/Texture/cursor.png");
    this.setCursor(cursor);
  }

View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

    public void mouseEntered(MouseEvent e) {
      if (state.getMode() == View.Mode.ZOOM_IN
          || state.getMode() == View.Mode.ZOOM_OUT) {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
          GraphView.this.jgraph.setCursor(toolkit.createCustomCursor(
              IconLoader.getIcon(IconLoader.ZOOM_CURSOR), new Point(0, 0),
              "img"));
        } catch (Exception e1) {
          e1.printStackTrace();
        }
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

            /// Creates an invisble pointer by giving it bogus image
            /// Possibly find a workaround for this...
            Toolkit tk = Toolkit.getDefaultToolkit();
            byte bogus[] = { (byte) 0 };
            blankCursor =
              tk.createCustomCursor( tk.createImage( bogus ), new Point(0, 0), "" );

            zoomWindow = new JWindow( parent ) {
                public void paint( Graphics g ) {
                    g.drawImage( zoomImage, 0, 0, zoomWindow );
                }
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

    Toolkit toolkit = Toolkit.getDefaultToolkit();
    Cursor customCursor;

    switch (action) {
    case CREATE_CONTINUOUS_NODE: {
      customCursor = toolkit.createCustomCursor(iconController
          .getContinueNodeCursor().getImage(), new Point(0, 0),
          "Cursor");
      setCursor(customCursor);
      setState(STATE_NONE);
      this.setShapeStateAll(UShape.STATE_CHANGECURSOR, customCursor);
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

      setState(STATE_NONE);
      this.setShapeStateAll(UShape.STATE_CHANGECURSOR, customCursor);
    }
      break;
    case CREATE_PROBABILISTIC_NODE: {
      customCursor = toolkit.createCustomCursor(iconController
          .getEllipsisNodeCursor().getImage(), new Point(0, 0),
          "Cursor");
      setCursor(customCursor);
      setState(STATE_NONE);
      this.setShapeStateAll(UShape.STATE_CHANGECURSOR, customCursor);
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

      setState(STATE_NONE);
      this.setShapeStateAll(UShape.STATE_CHANGECURSOR, customCursor);
    }
      break;
    case CREATE_DECISION_NODE: {
      customCursor = toolkit.createCustomCursor(iconController
          .getDecisionNodeCursor().getImage(), new Point(0, 0),
          "Cursor");
      setCursor(customCursor);
      setState(STATE_NONE);
      this.setShapeStateAll(UShape.STATE_CHANGECURSOR, customCursor);
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.