org.omegahat.R.Java
Class RManualFunctionActionListener
java.lang.Object
|
+--org.omegahat.Interfaces.NativeInterface.ForeignReference
|
+--org.omegahat.R.Java.RForeignReference
|
+--org.omegahat.R.Java.RManualFunctionActionListener
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, ForeignReferenceInt
- public class RManualFunctionActionListener
- extends RForeignReference
- implements java.awt.event.ActionListener
A class that allows an R object (function or closure) to be used
as an ActionListener for Swing buttons, etc. so that when an event
happens on that component, the appropriate R function is invoked.
This differs from the automatically generated versions (using
the dynamic compiler via ForeignReferenceClassGenerator) in that
- the Java method called by the JButton is native
(rather than a method that arranges its arguments into a List
and calls an inherited native method with these arguments,
the name of the method, and the signature)
- the foreing R object that is to be invoked by the
native
actionPerformed method should be
a function, not a list of functions.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RManualFunctionActionListener
public RManualFunctionActionListener(java.lang.String id)
RManualFunctionActionListener
public RManualFunctionActionListener(java.lang.String id,
OmegaInterfaceManager evaluator)
RManualFunctionActionListener
public RManualFunctionActionListener(ForeignReference ref,
OmegaInterfaceManager evaluator)
RManualFunctionActionListener
public RManualFunctionActionListener(ForeignReference ref)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ev)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener