|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.insightful.splus.SplusUserApp
public class SplusUserApp
Connects a user-written Java application to the S-PLUS engine. Provides support for querying the engine to produce SplusDataResult objects, and producing S-PLUS Java graphics.
The fields and methods for this class are static. This supports a single connection to the S-PLUS engine within a single JVM process.
Method Summary | |
---|---|
static SplusDataResult |
eval(String cmd)
Evaluate the specified S-PLUS command. |
static SplusDataResult |
eval(String cmd,
boolean Output,
boolean Result,
boolean Errors,
boolean Warnings,
boolean Expr)
Evaluate the specified S-PLUS command. |
static JComponent |
getGraph()
Get the CanvasTabbedPane in which graphs will be displayed. |
FileInputStream |
getServerFileInputStream(String name)
Return a FileInputStream from the JVM running the engine. |
FileOutputStream |
getServerFileOutputStream(String name)
Return a FileOutputStream from the JVM running the engine. |
FileSystemView |
getServerFileSystemView()
Return a FileSystemView from the JVM running the engine. |
SplusDataResult |
processDataQuery(String cmd)
|
SplusDataResult |
processDataQuery(String cmd,
int timeout)
|
void |
processDialogCommand(String cmd)
|
SplusDataResult |
processFileChooserDataQuery(String cmd)
|
static void |
startSession(String[] args)
Start the S-PLUS Session used by the SplusUserApp with specific command-line arguments. |
void |
writeEngineOutput(String data,
boolean prompted)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void startSession(String[] args)
String args[] = new String[] { "java.exe", "S_HOME=" + System.getProperty("splus.shome"), "S_PROJ=" + System.getProperty("splus.sproj") };
The first argument is the name of the application. The other arguments are typically environment variables to be set.
If the session has already been started, this method does nothing. It isn't necessary to call this method. If the method isn't used, the session will be started the first time getGraph() or eval() is called.
public static SplusDataResult eval(String cmd)
cmd
- expression to evaluatepublic static SplusDataResult eval(String cmd, boolean Output, boolean Result, boolean Errors, boolean Warnings, boolean Expr)
cmd
- expression to evaluateOutput
- true if the result should include text output, if anyResult
- true if the result should include result data, if anyErrors
- true if the result should include error messages, if anyWarnings
- true if the result should include warning messages, if anyExpr
- true if the result should include the expression (cmd)public static JComponent getGraph()
public FileSystemView getServerFileSystemView()
getServerFileSystemView
in interface SplusServerFileHandler
public FileInputStream getServerFileInputStream(String name) throws FileNotFoundException
getServerFileInputStream
in interface SplusServerFileHandler
FileNotFoundException
public FileOutputStream getServerFileOutputStream(String name) throws FileNotFoundException, IOException
getServerFileOutputStream
in interface SplusServerFileHandler
FileNotFoundException
IOException
public SplusDataResult processDataQuery(String cmd)
processDataQuery
in interface SplusEngineQueryHandler
public SplusDataResult processFileChooserDataQuery(String cmd)
public SplusDataResult processDataQuery(String cmd, int timeout)
processDataQuery
in interface SplusEngineQueryHandler
public void processDialogCommand(String cmd)
processDialogCommand
in interface SplusEngineQueryHandler
public void writeEngineOutput(String data, boolean prompted)
writeEngineOutput
in interface SplusEngineQueryHandler
|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |