|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jreality.reader.ReaderBSH
public class ReaderBSH
Reader for bsh script files. It creates an bsh.Interpreter instance, see www.beanshell.org for details. In this instance there is a SceneGraphComponent registered as "root", to which the script should attatch the scene parts. Example script:
a=new Appearance(); a.setAttribute("plogonShader.diffuseColor", new java.awt.Color(77,66,44,72)); root.setAppearance(a); root.setGeometry(new CatenoidHelicoid(10));For security reasons, this reader sets up a SecurityManager and a restricting Policy for the codebase of the bsh.jar URL. For this to work the bsh jar must NOT be in the classpath. Pass the location of the bsh.jar file as System property, i.e.:
-Djreality.bsh.jar=file:///opt/jars/bsh-1.3b2.jar
Constructor Summary | |
---|---|
ReaderBSH()
|
Method Summary | |
---|---|
void |
appendInput(Input input)
process the given Input in the current Instance. |
SceneGraphComponent |
getComponent()
provides the root component for the scene that was read. |
void |
processReader(java.io.Reader in,
java.io.PrintStream out,
java.io.PrintStream err)
|
void |
setInput(Input input)
set the input to read the scene from |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReaderBSH() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void setInput(Input input) throws java.io.IOException
SceneReader
setInput
in interface SceneReader
input
- the Input of the resource to read.
java.io.IOException
public void appendInput(Input input) throws java.io.IOException
input
- the Input to process
java.io.IOException
public void processReader(java.io.Reader in, java.io.PrintStream out, java.io.PrintStream err) throws java.lang.Exception
java.lang.Exception
public SceneGraphComponent getComponent()
SceneReader
getComponent
in interface SceneReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |