|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.rosuda.JGR.toolkit.iFrame
org.rosuda.JGR.JGRConsole
public class JGRConsole
JGRConsole Console Frame, the main window of JGR.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
int |
end
Position where the R splash ends (need for clearing the console |
SyntaxInput |
input
Console command input area |
ConsoleOutput |
output
Console output text panel |
| Fields inherited from class org.rosuda.JGR.toolkit.iFrame |
|---|
clsAbout, clsEditor, clsHelp, clsJavaGD, clsMain, clsObjBrowser, clsPackageUtil, clsPlot, clsPrefs, clsSplash, clsTable, clsUser, MYEntry |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JGRConsole()
|
|
JGRConsole(File workSpace)
Create a new Console window. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
actionPerformed: handle action event: menus. |
void |
clearconsole()
Clear the console's content, if it's too full. |
void |
dispose()
Close Console, but not before we asked the user if he wants to save opened Editors. |
void |
execute(String cmd,
boolean addToHist)
Execute a command and add it into history. |
void |
exit()
Close Console, but not before we asked the user if he wants to save opened Editors. |
void |
focusGained(FocusEvent e)
focusGained: handle focus event, enable and disable cut and paste button. |
void |
focusLost(FocusEvent e)
focusLost: handle focus event. |
int |
getFontWidth()
Get the font's width form current settings using FontMetrics. |
void |
help(String help)
Start the help-browser, first parse for the keyword. |
boolean |
isHelpCMD(String cmd)
Parse command if it is a helpcommand. |
void |
keyPressed(KeyEvent ke)
keyPressed: handle key event, like: adding a new line, history .... |
void |
keyReleased(KeyEvent ke)
keyReleased: handle key event, sending the command. |
void |
keyTyped(KeyEvent ke)
keyTyped: handle key event. |
void |
loadWorkSpace()
Load a workspace, R-command: load(...). |
void |
rBusy(Rengine re,
int which)
Invoke the busy cursor (R callback). |
String |
rChooseFile(Rengine re,
int newFile)
Choose a file invoked be file.choose() (R callback). |
void |
rFlushConsole(Rengine re)
Flush the console (R callback). !! |
void |
rLoadHistory(Rengine re,
String filename)
Load history from a file (R callback). |
String |
rReadConsole(Rengine re,
String prompt,
int addToHistory)
Read the commands from input area (R callback). |
void |
rSaveHistory(Rengine re,
String filename)
Save history to a file (R callback). |
void |
rShowMessage(Rengine re,
String message)
Showing a message from the rengine (R callback). |
void |
rWriteConsole(Rengine re,
String text)
Write output from R into console (R callback). |
void |
saveWorkSpace(String file)
Save workspace with specified filename, R-command: save.image(...). |
void |
saveWorkSpaceAs()
Save workspace to a different file then .RData. |
| Methods inherited from class org.rosuda.JGR.toolkit.iFrame |
|---|
cursorDefault, cursorWait, finalize, getMYEntry, initPlacement, setMinimumSize, setWorking, show |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public ConsoleOutput output
public SyntaxInput input
public int end
| Constructor Detail |
|---|
public JGRConsole()
public JGRConsole(File workSpace)
workSpace - workspace which should be loaded when starting JGR| Method Detail |
|---|
public void exit()
public void dispose()
dispose in class Window
public void execute(String cmd,
boolean addToHist)
cmd - command for executionaddToHist - indicates wether the command should be added to history or notpublic boolean isHelpCMD(String cmd)
cmd - command which should be executed
public void help(String help)
help - help-commandpublic void clearconsole()
public void loadWorkSpace()
public void saveWorkSpace(String file)
file - filenamepublic void saveWorkSpaceAs()
public int getFontWidth()
FontMetrics.
public void rWriteConsole(Rengine re,
String text)
rWriteConsole in interface RMainLoopCallbacksre - used Renginetext - output
public void rBusy(Rengine re,
int which)
rBusy in interface RMainLoopCallbacksre - used Renginewhich - busy (1) or not (0)
public String rReadConsole(Rengine re,
String prompt,
int addToHistory)
rReadConsole in interface RMainLoopCallbacksre - used Rengineprompt - prompt from RaddToHistory - is it an command which to add to the history
public void rShowMessage(Rengine re,
String message)
rShowMessage in interface RMainLoopCallbacksre - used Renginemessage - message from R
public String rChooseFile(Rengine re,
int newFile)
rChooseFile in interface RMainLoopCallbacksre - used RenginenewFile - if it's a new file
public void rFlushConsole(Rengine re)
rFlushConsole in interface RMainLoopCallbacksre - used Rengine
public void rLoadHistory(Rengine re,
String filename)
rLoadHistory in interface RMainLoopCallbacksre - used Renginefilename - history file
public void rSaveHistory(Rengine re,
String filename)
rSaveHistory in interface RMainLoopCallbacksre - used Renginefilename - history filepublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void keyTyped(KeyEvent ke)
keyTyped in interface KeyListenerpublic void keyPressed(KeyEvent ke)
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent ke)
keyReleased in interface KeyListenerpublic void focusGained(FocusEvent e)
focusGained in interface FocusListenerpublic void focusLost(FocusEvent e)
focusLost in interface FocusListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||