8020060: MoleculeViewerTest demo doesn't work due to SecurityPermissions

Reviewed-by: malenkov, erikj
This commit is contained in:
Alexander Scherbatiy 2013-09-09 18:34:12 +04:00
parent 51205b7e55
commit dfacc4e272
10 changed files with 20 additions and 22 deletions

View File

@ -65,14 +65,10 @@ $(eval $(call SetupAppletDemo,DitherTest))
$(eval $(call SetupAppletDemo,DrawTest)) $(eval $(call SetupAppletDemo,DrawTest))
$(eval $(call SetupAppletDemo,Fractal)) $(eval $(call SetupAppletDemo,Fractal))
$(eval $(call SetupAppletDemo,GraphicsTest)) $(eval $(call SetupAppletDemo,GraphicsTest))
$(eval $(call SetupAppletDemo,MoleculeViewer))
$(eval $(call SetupAppletDemo,NervousText)) $(eval $(call SetupAppletDemo,NervousText))
$(eval $(call SetupAppletDemo,SimpleGraph)) $(eval $(call SetupAppletDemo,SimpleGraph))
$(eval $(call SetupAppletDemo,SortDemo)) $(eval $(call SetupAppletDemo,SortDemo))
$(eval $(call SetupAppletDemo,SpreadSheet)) $(eval $(call SetupAppletDemo,SpreadSheet))
# Build WireFrame without a server since it
# has a class Matrix3D that also exists in MoleculeViewer.
$(eval $(call SetupAppletDemo,WireFrame,true))
ifndef OPENJDK ifndef OPENJDK
$(eval $(call SetupAppletDemo,Animator,,closed/)) $(eval $(call SetupAppletDemo,Animator,,closed/))
@ -83,7 +79,7 @@ endif
################################################################################################## ##################################################################################################
PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj
define SetupDemo define SetupDemo
# Param 1 = Name of the demo # Param 1 = Name of the demo
@ -161,6 +157,8 @@ $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services : \
BUILD_DEMOS+=$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services BUILD_DEMOS+=$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html XYZApp.java))
$(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html ThreeD.java))
$(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*)) $(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*))
$(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt)) $(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt))
$(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*)) $(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*))

View File

@ -348,7 +348,7 @@ public class XYZApp extends Applet implements Runnable, MouseListener,
InputStream is = null; InputStream is = null;
try { try {
Thread.currentThread().setPriority(Thread.MIN_PRIORITY); Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
is = new URL(getDocumentBase(), mdname).openStream(); is = getClass().getResourceAsStream(mdname);
XYZChemModel m = new XYZChemModel(is); XYZChemModel m = new XYZChemModel(is);
Atom.setApplet(this); Atom.setApplet(this);
md = m; md = m;

View File

@ -2,10 +2,10 @@
<head> <head>
<title>MoleculeViewer (example 1)</title> <title>MoleculeViewer (example 1)</title>
</head> </head>
<body> <body>
<h1>MoleculeViewer (example 1)</h1> <h1>MoleculeViewer (example 1)</h1>
<hr> <hr>
<applet code=XYZApp.class width=300 height=300> <applet code=XYZApp.class archive=MoleculeViewer.jar width=300 height=300>
<param name=model value="models/HyaluronicAcid.xyz"> <param name=model value="models/HyaluronicAcid.xyz">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!
@ -13,7 +13,7 @@
<hr> <hr>
<a href="XYZApp.java">The source</a>. <a href="XYZApp.java">The source</a>.
</body> </body>
</html> </html>

View File

@ -2,10 +2,10 @@
<head> <head>
<title>MoleculeViewer (example 2)</title> <title>MoleculeViewer (example 2)</title>
</head> </head>
<body> <body>
<h1>MoleculeViewer (example 2)</h1> <h1>MoleculeViewer (example 2)</h1>
<hr> <hr>
<applet code=XYZApp.class width=300 height=300> <applet code=XYZApp.class archive=MoleculeViewer.jar width=300 height=300>
<param name=model value="models/buckminsterfullerine.xyz"> <param name=model value="models/buckminsterfullerine.xyz">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!
@ -13,4 +13,4 @@
<hr> <hr>
<a href="XYZApp.java">The source</a>. <a href="XYZApp.java">The source</a>.
</body> </body>
</html> </html>

View File

@ -5,25 +5,25 @@
<body> <body>
<h1>MoleculeViewer (example 3)</h1> <h1>MoleculeViewer (example 3)</h1>
<hr> <hr>
<applet code=XYZApp.class width=100 height=100> <applet code=XYZApp.class archive=MoleculeViewer.jar width=100 height=100>
<param name=model value="models/water.xyz"> <param name=model value="models/water.xyz">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!
</applet> </applet>
<p> <p>
<applet code=XYZApp.class width=100 height=100> <applet code=XYZApp.class archive=MoleculeViewer.jar width=100 height=100>
<param name=model value="models/benzene.xyz"> <param name=model value="models/benzene.xyz">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!
</applet> </applet>
<p> <p>
<applet code=XYZApp.class width=100 height=100> <applet code=XYZApp.class archive=MoleculeViewer.jar width=100 height=100>
<param name=model value="models/ethane.xyz"> <param name=model value="models/ethane.xyz">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!
</applet> </applet>
<p> <p>
<applet code=XYZApp.class width=100 height=100> <applet code=XYZApp.class archive=MoleculeViewer.jar width=100 height=100>
<param name=model value="models/cyclohexane.xyz"> <param name=model value="models/cyclohexane.xyz">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!
@ -31,5 +31,5 @@
<hr> <hr>
<a href="XYZApp.java">The source</a>. <a href="XYZApp.java">The source</a>.
</body> </body>
</html> </html>

View File

@ -416,7 +416,7 @@ public class ThreeD extends Applet
InputStream is = null; InputStream is = null;
try { try {
Thread.currentThread().setPriority(Thread.MIN_PRIORITY); Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
is = new URL(getDocumentBase(), mdname).openStream(); is = getClass().getResourceAsStream(mdname);
Model3D m = new Model3D(is); Model3D m = new Model3D(is);
md = m; md = m;
m.findBB(); m.findBB();

View File

@ -5,7 +5,7 @@
<body> <body>
<h1>3D Model: Cube</h1> <h1>3D Model: Cube</h1>
<hr> <hr>
<applet code=ThreeD.class width=100 height=100> <applet code=ThreeD.class archive=WireFrame.jar width=100 height=100>
<param name=model value="models/cube.obj"> <param name=model value="models/cube.obj">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!

View File

@ -5,7 +5,7 @@
<body> <body>
<h1>3D Model: Dinosaur</h1> <h1>3D Model: Dinosaur</h1>
<hr> <hr>
<applet code=ThreeD.class width=300 height=300> <applet code=ThreeD.class archive=WireFrame.jar width=300 height=300>
<param name=model value="models/dinasaur.obj"> <param name=model value="models/dinasaur.obj">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!

View File

@ -5,7 +5,7 @@
<body> <body>
<h1>3D Model: Hughes</h1> <h1>3D Model: Hughes</h1>
<hr> <hr>
<applet code=ThreeD.class width=300 height=300> <applet code=ThreeD.class archive=WireFrame.jar width=300 height=300>
<param name=model value="models/hughes_500.obj"> <param name=model value="models/hughes_500.obj">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!

View File

@ -5,7 +5,7 @@
<body> <body>
<h1>3D Model: knoxS</h1> <h1>3D Model: knoxS</h1>
<hr> <hr>
<applet code=ThreeD.class width=300 height=300> <applet code=ThreeD.class archive=WireFrame.jar width=300 height=300>
<param name=model value="models/knoxS.obj"> <param name=model value="models/knoxS.obj">
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason." alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag! Your browser is completely ignoring the &lt;APPLET&gt; tag!