org.rosuda.JGR
Class JGR

java.lang.Object
  extended by org.rosuda.JGR.JGR

public class JGR
extends Object

JGR, Java Gui for R JGR is just a new Gui for R http://www.r-project.org , written in Java.
Thus it is (should) be platform-indepent. Currently we have several problems on *nix machines.

JGR uses JRI and rJava for talking with R, and the JavaGD- Device all written by Simon Urbanek.

RoSuDa 2003 - 2005

Author:
Markus Helbig

Field Summary
static String AUTHOR1
          Author JGR (used for displaying the splashscreen)
static String AUTHOR2
          Author JRI, rJava and JavaGD (used for displaying the splashscreen)
static Vector DATA
          Current data-sets (data.frames, matrix, ...)
static String DEVELTIME
          Develtime (used for displaying the splashscreen)
static Vector FUNCTIONS
          Current functions
static String INSTITUTION
          Organization (used for displaying the splashscreen)
static HashMap KEYWORDS
          Keywords for syntaxhighlighting
static HashMap KEYWORDS_OBJECTS
          Keywords (objects) for syntaxhighlighting
static JGRConsole MAINRCONSOLE
          Main-console window
static Vector MODELS
          Current models
static Vector OBJECTS
          Current objects in workspace
static Vector OTHERS
          Current data not in DATA DATA
static Rengine R
          Rengine Rengine, needed for executing R-commands
static Vector RHISTORY
          The history of current session.
static String RHOME
          RHOME path of current used R
static String[] RLIBS
          RLIB pathes, where we can find the user's R-packages
static ConsoleSync rSync
          ConsoleSnyc org.rosuda.JRG.toolkit.ConsoleSync
static SplashScreen splash
          Splashscreen
static String SPLASH
          Filename of the splash-image (used for displaying the splashscreen)
static boolean STARTED
          Indicates wether the Rengine is up or not
static String SUBTITLE
          Subtitle (used for displaying the splashscreen)
static String TITLE
          Title (used for displaying the splashscreen)
static String VERSION
          Version number of JGR
static String WEBSITE
          Website of organization (used for displaying the splashscreen)
 
Constructor Summary
JGR()
          Starting the JGR Application (javaside)
 
Method Summary
static void addMenu(String name)
          Add new Menu at runtime to Console.
static void addMenuItem(String menu, String name, String cmd)
          Add MenuItem at runtime to ConsoleMenu.
static void addMenuSeparator(String menu)
          Add MenuSeparator at runtime.
static String exit()
          Exits JGR, but not before asked the user if he wants to save his workspace.
static boolean isJGRmain()
          return the value of the JGRmain flag
static void main(String[] args)
          Starts JGR
options:
--debug: enable debug information or any other option supported by R.
static void readHistory()
          If there is a file named .Rhistory in the user's home path we load his commands to current history.
static void setKeyWords(String word)
          Set keywords for highlighting.
static void setKeyWords(String[] words)
          Set keywords for highlighting.
static void setObjects(String object)
          Set objects for hightlighting.
static void setObjects(String[] objects)
          Set objects for hightlighting.
static void setRHome(String rhome)
          Set R_HOME (in java app).
static void setRLibs(String lib)
          Set R_LIBS (in java app).
static void setRLibs(String[] libs)
          Set R_LIBS (in java app).
static void writeHistory()
          Write the commands of current session to .Rhistory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Version number of JGR

See Also:
Constant Field Values

TITLE

public static final String TITLE
Title (used for displaying the splashscreen)

See Also:
Constant Field Values

SUBTITLE

public static final String SUBTITLE
Subtitle (used for displaying the splashscreen)

See Also:
Constant Field Values

DEVELTIME

public static final String DEVELTIME
Develtime (used for displaying the splashscreen)

See Also:
Constant Field Values

INSTITUTION

public static final String INSTITUTION
Organization (used for displaying the splashscreen)

See Also:
Constant Field Values

AUTHOR1

public static final String AUTHOR1
Author JGR (used for displaying the splashscreen)

See Also:
Constant Field Values

AUTHOR2

public static final String AUTHOR2
Author JRI, rJava and JavaGD (used for displaying the splashscreen)

See Also:
Constant Field Values

WEBSITE

public static final String WEBSITE
Website of organization (used for displaying the splashscreen)

See Also:
Constant Field Values

SPLASH

public static final String SPLASH
Filename of the splash-image (used for displaying the splashscreen)

See Also:
Constant Field Values

MAINRCONSOLE

public static JGRConsole MAINRCONSOLE
Main-console window


RHISTORY

public static Vector RHISTORY
The history of current session. If there was a .Rhistory file, it will be loaded into this vector


RHOME

public static String RHOME
RHOME path of current used R


RLIBS

public static String[] RLIBS
RLIB pathes, where we can find the user's R-packages


R

public static Rengine R
Rengine Rengine, needed for executing R-commands


rSync

public static ConsoleSync rSync
ConsoleSnyc org.rosuda.JRG.toolkit.ConsoleSync


DATA

public static Vector DATA
Current data-sets (data.frames, matrix, ...)


MODELS

public static Vector MODELS
Current models


OTHERS

public static Vector OTHERS
Current data not in DATA DATA


FUNCTIONS

public static Vector FUNCTIONS
Current functions


OBJECTS

public static Vector OBJECTS
Current objects in workspace


KEYWORDS

public static HashMap KEYWORDS
Keywords for syntaxhighlighting


KEYWORDS_OBJECTS

public static HashMap KEYWORDS_OBJECTS
Keywords (objects) for syntaxhighlighting


STARTED

public static boolean STARTED
Indicates wether the Rengine is up or not


splash

public static SplashScreen splash
Splashscreen

Constructor Detail

JGR

public JGR()
Starting the JGR Application (javaside)

Method Detail

exit

public static String exit()
Exits JGR, but not before asked the user if he wants to save his workspace.

Returns:
users's answer (yes/no/cancel)

addMenu

public static void addMenu(String name)
Add new Menu at runtime to Console.

Parameters:
name - MenuName

addMenuItem

public static void addMenuItem(String menu,
                               String name,
                               String cmd)
Add MenuItem at runtime to ConsoleMenu.

Parameters:
menu - MenuName
name - ItemName
cmd - Command

addMenuSeparator

public static void addMenuSeparator(String menu)
Add MenuSeparator at runtime.

Parameters:
menu - MenuName

setRHome

public static void setRHome(String rhome)
Set R_HOME (in java app).

Parameters:
rhome - RHOME path

setRLibs

public static void setRLibs(String lib)
Set R_LIBS (in java app).

Parameters:
lib - Library path

setRLibs

public static void setRLibs(String[] libs)
Set R_LIBS (in java app).

Parameters:
libs - Library pathes

setKeyWords

public static void setKeyWords(String word)
Set keywords for highlighting.

Parameters:
word - This word will be highlighted

setKeyWords

public static void setKeyWords(String[] words)
Set keywords for highlighting.

Parameters:
words - These words will be highlighted

setObjects

public static void setObjects(String object)
Set objects for hightlighting.

Parameters:
object - This object will be highlighted

setObjects

public static void setObjects(String[] objects)
Set objects for hightlighting.

Parameters:
objects - These words will be highlighted

readHistory

public static void readHistory()
If there is a file named .Rhistory in the user's home path we load his commands to current history.


writeHistory

public static void writeHistory()
Write the commands of current session to .Rhistory.


isJGRmain

public static boolean isJGRmain()
return the value of the JGRmain flag


main

public static void main(String[] args)
Starts JGR
options:
  1. --debug: enable debug information
or any other option supported by R.