|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jvx.math.MathListener
Superclass for all event listeners of JavaView supplies adapter functionality to invoke Mathematica functions whenever a JavaView listener method is invoked. This class contains the Math-Link and a hashtable for the method/function mapping.
Beside registration of Mathematica functions this class also provides
the method perform which invokes the Mathematica function
registered in the handler.
This class is provided as a convenience to simplify the writing of listeners. Subclasses do not implement the registration methods invoked by Mathematica to register handler commands and establishing of the kernel link.
| Field Summary | |
protected java.util.Hashtable |
m_code
Contains mapping between JavaView listener methods and Mathematica functions. |
protected java.lang.String |
m_name
The name of a listeners allows the display to issue verbal debug messages. |
protected com.wolfram.jlink.KernelLink |
ml
Math-Link connection to Mathematica kernel. |
| Constructor Summary | |
MathListener()
Constructor tries to get Math-Link connection. |
|
| Method Summary | |
java.lang.String |
getHandler(java.lang.String meth)
Get the callback function of Mathematica which is registered with an event listener method of JavaView. |
java.lang.String |
getName()
The name of a listeners allows the display to issue verbal debug messages. |
protected void |
perform(java.lang.String code,
java.lang.Object event)
Invoke a Mathematica method which must have been registered previously from Mathematica. |
void |
setHandler(java.lang.String meth,
java.lang.String func)
Register a callback function of Mathematica which is invoked whenever the event listener method of JavaView is called. |
void |
setName(java.lang.String name)
Set name of this listener. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String m_name
protected java.util.Hashtable m_code
protected com.wolfram.jlink.KernelLink ml
| Constructor Detail |
public MathListener()
| Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getHandler(java.lang.String meth)
meth - Listener method called from JavaView events.func - Mathematica function to be invoked.
public void setHandler(java.lang.String meth,
java.lang.String func)
meth - Listener method called from JavaView events.func - Mathematica function to be invoked.
protected void perform(java.lang.String code,
java.lang.Object event)
code - Name of Mathematica function to invokeevent - Current camera event to be passed to Mathematica
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||