Exemplo n.º 1
0
 public HavenPanel(int w, int h, GLCapabilitiesChooser cc) {
   super(stdcaps(), cc, null, null);
   setSize(this.w = w, this.h = h);
   newui(null);
   initgl();
   if (Toolkit.getDefaultToolkit().getMaximumCursorColors() >= 256) cursmode = "awt";
   setCursor(
       Toolkit.getDefaultToolkit()
           .createCustomCursor(TexI.mkbuf(new Coord(1, 1)), new java.awt.Point(), ""));
 }
Exemplo n.º 2
0
 private static Cursor makeawtcurs(BufferedImage img, Coord hs) {
   java.awt.Dimension cd =
       Toolkit.getDefaultToolkit().getBestCursorSize(img.getWidth(), img.getHeight());
   BufferedImage buf = TexI.mkbuf(new Coord((int) cd.getWidth(), (int) cd.getHeight()));
   java.awt.Graphics g = buf.getGraphics();
   g.drawImage(img, 0, 0, null);
   g.dispose();
   return (Toolkit.getDefaultToolkit()
       .createCustomCursor(buf, new java.awt.Point(hs.x, hs.y), ""));
 }