diff options
author | Sven Gothel <[email protected]> | 2001-02-14 07:38:31 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2001-02-14 07:38:31 +0000 |
commit | aaad1aab82e57bc369e26f55a25b24fb77d9fd45 (patch) | |
tree | 78051e866c0f313ff5fdc48bd494f7e6eb75ec74 /demos | |
parent | f36d363033840c84c76bf5285a252846aa9a7e96 (diff) |
2.5.2.0 test2rel-2-5-2-0-test2
Diffstat (limited to 'demos')
-rwxr-xr-x | demos/MiscDemos/DrawColoredPrimitives.java | 3 | ||||
-rw-r--r-- | demos/MiscDemos/DrawColoredPrimitives2.java | 3 | ||||
-rwxr-xr-x | demos/MiscDemos/TriangleRotate.java | 3 | ||||
-rw-r--r-- | demos/MiscDemos/accanti.java | 3 | ||||
-rw-r--r-- | demos/MiscDemos/alpha3D.java | 3 | ||||
-rw-r--r-- | demos/MiscDemos/anti.java | 3 | ||||
-rw-r--r-- | demos/MiscDemos/gears.java | 83 | ||||
-rwxr-xr-x | demos/MiscDemos/pngTextureTestApplet.java | 3 | ||||
-rw-r--r-- | demos/MiscDemos/select.java | 3 | ||||
-rw-r--r-- | demos/gl4java.policy | 58 |
10 files changed, 146 insertions, 19 deletions
diff --git a/demos/MiscDemos/DrawColoredPrimitives.java b/demos/MiscDemos/DrawColoredPrimitives.java index e65d322..6aa5db8 100755 --- a/demos/MiscDemos/DrawColoredPrimitives.java +++ b/demos/MiscDemos/DrawColoredPrimitives.java @@ -60,7 +60,8 @@ public class DrawColoredPrimitives extends SimpleGLAnimApplet1 Dimension ps = applet.getPreferredSize();
f.setBounds(-100,-100,99,99);
f.setVisible(true);
- //f.setVisible(false);
+ f.setVisible(false);
+ f.setVisible(true);
Insets i = f.getInsets();
f.setBounds(0,0,
ps.width+i.left+i.right,
diff --git a/demos/MiscDemos/DrawColoredPrimitives2.java b/demos/MiscDemos/DrawColoredPrimitives2.java index e67f46b..7ff7cb7 100644 --- a/demos/MiscDemos/DrawColoredPrimitives2.java +++ b/demos/MiscDemos/DrawColoredPrimitives2.java @@ -54,7 +54,8 @@ public class DrawColoredPrimitives2 extends SimpleGLAnimApplet1 Dimension ps = applet.getPreferredSize();
f.setBounds(-100,-100,99,99);
f.setVisible(true);
- //f.setVisible(false);
+ f.setVisible(false);
+ f.setVisible(true);
Insets i = f.getInsets();
f.setBounds(0,0,
ps.width+i.left+i.right,
diff --git a/demos/MiscDemos/TriangleRotate.java b/demos/MiscDemos/TriangleRotate.java index 695575b..25bccdd 100755 --- a/demos/MiscDemos/TriangleRotate.java +++ b/demos/MiscDemos/TriangleRotate.java @@ -56,7 +56,8 @@ public class TriangleRotate extends SimpleGLAnimApplet1 Dimension ps = applet.getPreferredSize();
f.setBounds(-100,-100,99,99);
f.setVisible(true);
- //f.setVisible(false);
+ f.setVisible(false);
+ f.setVisible(true);
Insets i = f.getInsets();
f.setBounds(0,0,
ps.width+i.left+i.right,
diff --git a/demos/MiscDemos/accanti.java b/demos/MiscDemos/accanti.java index f15287a..44bbbd6 100644 --- a/demos/MiscDemos/accanti.java +++ b/demos/MiscDemos/accanti.java @@ -82,7 +82,8 @@ public class accanti extends Applet Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - //f.setVisible(false); + f.setVisible(false); + f.setVisible(true); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/alpha3D.java b/demos/MiscDemos/alpha3D.java index 3d59134..5bd72ef 100644 --- a/demos/MiscDemos/alpha3D.java +++ b/demos/MiscDemos/alpha3D.java @@ -67,7 +67,8 @@ public class alpha3D extends SimpleGLAnimApplet1 Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - //f.setVisible(false); + f.setVisible(false); + f.setVisible(true); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/anti.java b/demos/MiscDemos/anti.java index bc00948..97c11e7 100644 --- a/demos/MiscDemos/anti.java +++ b/demos/MiscDemos/anti.java @@ -79,7 +79,8 @@ public class anti extends Applet Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - //f.setVisible(false); + f.setVisible(false); + f.setVisible(true); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/gears.java b/demos/MiscDemos/gears.java index 44f709e..3be3c28 100644 --- a/demos/MiscDemos/gears.java +++ b/demos/MiscDemos/gears.java @@ -18,9 +18,15 @@ import gl4java.awt.GLAnimCanvas; import gl4java.applet.SimpleGLAnimApplet1;
public class gears extends SimpleGLAnimApplet1
+ implements MouseListener
{
/* Initialize the applet */
+ static {
+ GLContext.gljNativeDebug = false;
+ GLContext.gljThreadDebug = false;
+ GLContext.gljClassDebug = true;
+ }
public void init()
@@ -34,6 +40,7 @@ public class gears extends SimpleGLAnimApplet1 Dimension d = getSize();
canvas = new gearsCanvas(showGL, d.width, d.height);
add("Center", canvas);
+ addMouseListener(this);
}
@@ -71,7 +78,7 @@ public class gears extends SimpleGLAnimApplet1 i++;
}
- if(!perftest)
+ if(perftest)
{
GLContext.gljNativeDebug = false;
GLContext.gljThreadDebug = false;
@@ -101,9 +108,6 @@ public class gears extends SimpleGLAnimApplet1 gears applet = new gears();
- applet.setSize(300, 300);
- applet.init(true);
-
if(perftest)
{
applet.canvas.setUseFpsSleep(false);
@@ -117,14 +121,66 @@ public class gears extends SimpleGLAnimApplet1 applet.canvas.getUseFpsSleep());
}
- applet.start();
-
mainFrame.add(applet);
-
- mainFrame.pack();
+ applet.setSize(400,500);
+ applet.init();
+ applet.start();
+ Dimension ps = applet.getPreferredSize();
+ mainFrame.setBounds(-100,-100,99,99);
+ mainFrame.setVisible(true);
+ mainFrame.setVisible(false);
+ mainFrame.setVisible(true);
+ Insets is = mainFrame.getInsets();
+ mainFrame.setBounds(0,0,
+ ps.width+is.left+is.right,
+ ps.height+is.top+is.bottom);
mainFrame.setVisible(true);
}
+ // Methods required for the implementation of MouseListener
+ public void mouseEntered( MouseEvent evt )
+ {
+ //System.out.println("mouse entered: ");
+ super.mouseEntered(evt);
+ }
+
+ public void mouseExited( MouseEvent evt )
+ {
+ //System.out.println("mouse exit: ");
+ super.mouseExited(evt);
+ }
+
+ public void mousePressed( MouseEvent evt )
+ {
+ //System.out.println("mouse pressed: ");
+ super.mousePressed(evt);
+ }
+
+ public void mouseReleased( MouseEvent evt )
+ {
+ //System.out.println("mouse released: ");
+ super.mouseReleased(evt);
+ }
+
+ public void mouseClicked( MouseEvent evt )
+ {
+ //System.out.println("mouse clicked: ");
+ super.mouseClicked(evt);
+
+ if ((evt.getModifiers() & evt.BUTTON2_MASK) != 0)
+ {
+ System.out.println("stopping applet now .. (after 1s, restart)");
+ stop();
+ try {
+ Thread.sleep(1000);
+ } catch (Exception e)
+ { System.out.println("oops, somebody woke us up .."); }
+ System.out.println("restarting applet now .. ");
+ canvas.setVisible(true);
+ start();
+ }
+ }
+
/* Local GLAnimCanvas extension class */
@@ -206,6 +262,7 @@ public class gears extends SimpleGLAnimApplet1 addMouseMotionListener(this);
T0=System.currentTimeMillis();
+ System.out.println("init ..");
}
public void doCleanup()
@@ -406,39 +463,43 @@ public class gears extends SimpleGLAnimApplet1 // Methods required for the implementation of MouseListener
public void mouseEntered( MouseEvent evt )
{
+ //System.out.println("mouse entered cvs: ");
}
public void mouseExited( MouseEvent evt )
{
+ //System.out.println("mouse exit cvs: ");
}
public void mousePressed( MouseEvent evt )
{
+ //System.out.println("mouse pressed cvs: ");
prevMouseX = evt.getX();
prevMouseY = evt.getY();
if ((evt.getModifiers() & evt.BUTTON3_MASK) != 0)
{
mouseRButtonDown = true;
- evt.consume();
}
}
public void mouseReleased( MouseEvent evt )
{
+ //System.out.println("mouse released cvs: ");
if ((evt.getModifiers() & evt.BUTTON3_MASK) != 0)
{
mouseRButtonDown = false;
- evt.consume();
}
}
public void mouseClicked( MouseEvent evt )
{
+ //System.out.println("mouse clicked cvs: ");
}
// Methods required for the implementation of MouseMotionListener
public void mouseDragged( MouseEvent evt )
{
+ //System.out.println("mouse dragged: ");
int x = evt.getX();
int y = evt.getY();
Dimension size = getSize();
@@ -452,11 +513,11 @@ public class gears extends SimpleGLAnimApplet1 view_rotx += thetaX;
view_roty += thetaY;
- evt.consume();
}
public void mouseMoved( MouseEvent evt )
{
+ //System.out.println("mouse moved: ");
}
}
}
diff --git a/demos/MiscDemos/pngTextureTestApplet.java b/demos/MiscDemos/pngTextureTestApplet.java index 18c05d2..d3d08c1 100755 --- a/demos/MiscDemos/pngTextureTestApplet.java +++ b/demos/MiscDemos/pngTextureTestApplet.java @@ -59,7 +59,8 @@ public class pngTextureTestApplet extends Applet Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - //f.setVisible(false); + f.setVisible(false); + f.setVisible(true); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/select.java b/demos/MiscDemos/select.java index 3605e97..4e67dba 100644 --- a/demos/MiscDemos/select.java +++ b/demos/MiscDemos/select.java @@ -95,7 +95,8 @@ public class select extends Applet Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - //f.setVisible(false); + f.setVisible(false); + f.setVisible(true); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/gl4java.policy b/demos/gl4java.policy index 7c7ee41..1679a0d 100644 --- a/demos/gl4java.policy +++ b/demos/gl4java.policy @@ -49,6 +49,16 @@ grant codeBase "http://www.jausoft.com/Files/Java/1.1.X/GL4Java/demos/HodglimsNe permission java.security.AllPermission; }; +grant codeBase "http://www.jausoft.com/Files/Java/1.1.X/GL4Java-Stuff/*" +{ + permission java.security.AllPermission; +}; + +grant codeBase "http://www.jausoft.com/Files/Java/1.1.X/GL4Java-Stuff/psi/*" +{ + permission java.security.AllPermission; +}; + grant codeBase "http://jausoft.goethel.de/Files/Java/1.1.X/GL4Java/Installer/*" { permission java.security.AllPermission; @@ -94,3 +104,51 @@ grant codeBase "http://jausoft.goethel.de/Files/Java/1.1.X/GL4Java-Stuff/psi/*" permission java.security.AllPermission; }; + +// Standard extensions get all permissions by default + +grant codeBase "file:${java.home}/lib/ext/*" { + permission java.security.AllPermission; +}; + +// default permissions granted to all domains + +grant { + // Allows any thread to stop itself using the java.lang.Thread.stop() + // method that takes no argument. + // Note that this permission is granted by default only to remain + // backwards compatible. + // It is strongly recommended that you either remove this permission + // from this policy file or further restrict it to code sources + // that you specify, because Thread.stop() is potentially unsafe. + // See "http://java.sun.com/notes" for more information. + permission java.lang.RuntimePermission "stopThread"; + + // allows anyone to listen on un-privileged ports + permission java.net.SocketPermission "localhost:1024-", "listen"; + + // "standard" properies that can be read by anyone + + permission java.util.PropertyPermission "java.version", "read"; + permission java.util.PropertyPermission "java.vendor", "read"; + permission java.util.PropertyPermission "java.vendor.url", "read"; + permission java.util.PropertyPermission "java.class.version", "read"; + permission java.util.PropertyPermission "os.name", "read"; + permission java.util.PropertyPermission "os.version", "read"; + permission java.util.PropertyPermission "os.arch", "read"; + permission java.util.PropertyPermission "file.separator", "read"; + permission java.util.PropertyPermission "path.separator", "read"; + permission java.util.PropertyPermission "line.separator", "read"; + + permission java.util.PropertyPermission "java.specification.version", "read"; + permission java.util.PropertyPermission "java.specification.vendor", "read"; + permission java.util.PropertyPermission "java.specification.name", "read"; + + permission java.util.PropertyPermission "java.vm.specification.version", "read"; + permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; + permission java.util.PropertyPermission "java.vm.specification.name", "read"; + permission java.util.PropertyPermission "java.vm.version", "read"; + permission java.util.PropertyPermission "java.vm.vendor", "read"; + permission java.util.PropertyPermission "java.vm.name", "read"; +}; + |