public interface RMainLoopCallbacks
rReadConsole(org.rosuda.JRI.Rengine, java.lang.String, int) and rChooseFile(org.rosuda.JRI.Rengine, int) are expected to block until the user performs the desired action.| Modifier and Type | Method and Description |
|---|---|
void |
rBusy(Rengine re,
int which)
called when R enters or exits a longer evaluation.
|
String |
rChooseFile(Rengine re,
int newFile)
called when R expects the user to choose a file
|
void |
rFlushConsole(Rengine re)
called when R requests the console to flush any buffered output
|
void |
rLoadHistory(Rengine re,
String filename)
called to load the contents of the history
|
String |
rReadConsole(Rengine re,
String prompt,
int addToHistory)
called when R waits for user input.
|
void |
rSaveHistory(Rengine re,
String filename)
called to save the contents of the history (the implementation is responsible of keeping track of the history)
|
void |
rShowMessage(Rengine re,
String message)
called when R want to show a warning/error message (not to be confused with messages displayed in the console output)
|
void |
rWriteConsole(Rengine re,
String text,
int oType)
called when R prints output to the console
|
void rWriteConsole(Rengine re, String text, int oType)
re - calling enginetext - text to display in the consoleoType - output type (0=regular, 1=error/warning)void rBusy(Rengine re, int which)
re - calling enginewhich - identifies whether R enters (1) or exits (0) the busy stateString rReadConsole(Rengine re, String prompt, int addToHistory)
Rengine.rniIdle() occasionally to allow other event handlers (e.g graphics device UIs) to run. Implementations should NEVER return immediately even if there is no input - such behavior will result in a fast cycling event loop which makes the use of R pretty much impossible.re - calling engineprompt - prompt to be displayed at the console prior to user's inputaddToHistory - flag telling the handler whether the input should be considered for adding to history (!=0) or not (0)void rShowMessage(Rengine re, String message)
re - calling enginemessage - message to displayString rChooseFile(Rengine re, int newFile)
re - calling enginenewFile - flag determining whether an existing or new file is to be selecteedvoid rFlushConsole(Rengine re)
re - calling enginevoid rSaveHistory(Rengine re, String filename)
re - calling enginefilename - name of the history fileCopyright © 2017. All rights reserved.