org.rosuda.plugins
Class PluginGetTreeR

java.lang.Object
  extended by org.rosuda.plugins.Plugin
      extended by org.rosuda.plugins.PluginGetTreeR
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class PluginGetTreeR
extends Plugin
implements java.awt.event.ActionListener


Field Summary
static boolean initializedSuccessfully
           
static java.lang.String lastRbin
           
static java.lang.String lastRcall
           
static java.lang.String lastRver
           
static int lastTreeID
           
 
Fields inherited from class org.rosuda.plugins.Plugin
author, cancel, desc, err, name, PT_GenTree, type
 
Constructor Summary
PluginGetTreeR()
          create a new instance of the plugin
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          activated if a button was pressed.
 boolean checkParameters()
          check consistency of the parameters; for this plugin all we need is the dataset.
 boolean execPlugin()
          executes plugin - generates a tree.
 java.lang.Object getParameter(java.lang.String par)
          get a plugin parameter
 boolean initPlugin()
          initialize plugin insteance
static void main(java.lang.String[] args)
          just a tiny test code
 boolean pluginDlg(java.awt.Frame f)
          pop up dialog asking for variables to be used, response, library and parameters
 void setParameter(java.lang.String par, java.lang.Object val)
          set a plugin parameter
 
Methods inherited from class org.rosuda.plugins.Plugin
donePlugin, getAuthor, getDescription, getLastError, getName, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initializedSuccessfully

public static boolean initializedSuccessfully

lastRbin

public static java.lang.String lastRbin

lastRver

public static java.lang.String lastRver

lastRcall

public static java.lang.String lastRcall

lastTreeID

public static int lastTreeID
Constructor Detail

PluginGetTreeR

public PluginGetTreeR()
create a new instance of the plugin

Method Detail

setParameter

public void setParameter(java.lang.String par,
                         java.lang.Object val)
set a plugin parameter

Overrides:
setParameter in class Plugin
Parameters:
par - parameter name
val - parameter value

getParameter

public java.lang.Object getParameter(java.lang.String par)
get a plugin parameter

Overrides:
getParameter in class Plugin
Parameters:
par - parameter name
Returns:
parameter value or null if not availiable

initPlugin

public boolean initPlugin()
initialize plugin insteance

Overrides:
initPlugin in class Plugin
Returns:
true if the initialization was successful

checkParameters

public boolean checkParameters()
check consistency of the parameters; for this plugin all we need is the dataset.

Overrides:
checkParameters in class Plugin

pluginDlg

public boolean pluginDlg(java.awt.Frame f)
pop up dialog asking for variables to be used, response, library and parameters

Overrides:
pluginDlg in class Plugin
Parameters:
f - parent frame
Returns:
false if the selection was invalid or user pressed cancel. Check the boolean "cancel" variable to see if the cause was error or cancel

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
activated if a button was pressed. It determines whether "cancer" was pressed or OK"

Specified by:
actionPerformed in interface java.awt.event.ActionListener

execPlugin

public boolean execPlugin()
executes plugin - generates a tree. If useRserv is true then an Rserv connection is established (if not existing already due to holdConnection). If Rserv id not availiable, fall back to native R

Overrides:
execPlugin in class Plugin
Returns:
true if everything went fine, false otherwise.

main

public static void main(java.lang.String[] args)
just a tiny test code