|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RMainLoopCallbacks
Interface which must be implmented by any class that wants to pose as the call-back handler for R event loop callbacks. It is legal to return immediately except when user interaction is required: 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.
Method Summary | |
---|---|
void |
rBusy(Rengine re,
int which)
called when R enters or exits a longer evaluation. |
java.lang.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,
java.lang.String filename)
called to load the contents of the history |
java.lang.String |
rReadConsole(Rengine re,
java.lang.String prompt,
int addToHistory)
called when R waits for user input. |
void |
rSaveHistory(Rengine re,
java.lang.String filename)
called to save the contents of the history (the implementation is responsible of keeping track of the history) |
void |
rShowMessage(Rengine re,
java.lang.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,
java.lang.String text,
int oType)
called when R prints output to the console |
Method Detail |
---|
void rWriteConsole(Rengine re, java.lang.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 statejava.lang.String rReadConsole(Rengine re, java.lang.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, java.lang.String message)
re
- calling enginemessage
- message to displayjava.lang.String rChooseFile(Rengine re, int newFile)
re
- calling enginenewFile
- flag determining whether an existing or new file is to be selecteed
void rFlushConsole(Rengine re)
re
- calling enginevoid rSaveHistory(Rengine re, java.lang.String filename)
re
- calling enginefilename
- name of the history filevoid rLoadHistory(Rengine re, java.lang.String filename)
re
- calling enginefilename
- name of the history file
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |