Examples of createCustomCursor()


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()

                    image = bimage;
                } catch (Exception ex) {
                }
            }
           
      return toolkit.createCustomCursor(image, point, name);
           
  } catch (NoSuchMethodError err) {
      //      return Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
      return null;
  }
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

                    image = bimage;
                } catch (Exception ex) {
                }
            }
           
      return toolkit.createCustomCursor(image, point, name);
           
  } catch (NoSuchMethodError err) {
      //      return Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
      return null;
  }
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

    {
      System.err.println(ie);
      System.exit(1);
    }

    Cursor transCursor = toolkit.createCustomCursor(transCursorImage, new Point(0,0), transCursorName);

    for( JFrame frame : _screens )
      frame.setCursor( transCursor );
   
    return true;
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()

                    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()

  private void showCursor (boolean visible) {
    if (!visible) {
      Toolkit t = Toolkit.getDefaultToolkit();
      Image i = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
      Cursor noCursor = t.createCustomCursor(i, new Point(0, 0), "none");
      JFrame frame = findJFrame(canvas);
      frame.setCursor(noCursor);
    } else {
      JFrame frame = findJFrame(canvas);
      frame.setCursor(Cursor.getDefaultCursor());
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()

            Graphics2D scaledGraphics = scaledCompImage.createGraphics();
            scaledGraphics.drawImage(compImage, null, null);
            scaledGraphics.dispose();

            // Actually build a cursor from the scaled image
            return toolkit.createCustomCursor(scaledCompImage, new Point(0, 0), "dndValidCursor");
        }
   
        /*
         * Methods implementing DragSourceListener ************************************************************
         */
 
View Full Code Here

Examples of java.awt.Toolkit.createCustomCursor()

    busyCursor = new Cursor(Cursor.WAIT_CURSOR);
    defaultCursor = new Cursor(Cursor.DEFAULT_CURSOR);
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    Image image = getImageIcon("/images/hand.gif");
    if (image != null)
      handCursor = toolkit.createCustomCursor(image, new Point(0, 0),
          "hand"); //$NON-NLS-1$
  }

  /**
   * Draws the frame.
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.