com.wolfram.jlink
Class MathContainerListener
java.lang.Object
com.wolfram.jlink.MathListener
com.wolfram.jlink.MathContainerListener
- All Implemented Interfaces:
- java.awt.event.ContainerListener, java.util.EventListener
public class MathContainerListener
- extends MathListener
- implements java.awt.event.ContainerListener
This class lets you trigger a call into Mathematica on the occurrence of a particular event.
Like all the MathXXXListener classes, it is intended to be used primarily from Mathematica, although it
can be used from Java code as well.
In response to a ContainerEvent, objects of this class send to Mathematica:
userCode[theContainerEvent]
userFunc is specified as a string, either a function name or an expression
(like a pure function "foo[#]&"), via the setHandler() method.
|
Constructor Summary |
MathContainerListener()
The constructor that is called from Mathematica. |
MathContainerListener(KernelLink ml)
You must use this constructor when using this class in a Java program,
because you need to specify the KernelLink that will be used. |
MathContainerListener(java.lang.String[][] handlers)
This form of the constructor lets you skip having
to make a series of setHandler() calls. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MathContainerListener
public MathContainerListener()
- The constructor that is called from Mathematica.
MathContainerListener
public MathContainerListener(KernelLink ml)
- You must use this constructor when using this class in a Java program,
because you need to specify the KernelLink that will be used.
- Parameters:
ml - The link to which computations will be sent when ContainerEvents arrive.
MathContainerListener
public MathContainerListener(java.lang.String[][] handlers)
- This form of the constructor lets you skip having
to make a series of setHandler() calls. Use this constructor from Mathematica code only.
- Parameters:
handlers - An array of {meth, func} pairs associating methods in the ContainerListener
interface with Mathematica functions.
componentAdded
public void componentAdded(java.awt.event.ContainerEvent e)
- Specified by:
componentAdded in interface java.awt.event.ContainerListener
componentRemoved
public void componentRemoved(java.awt.event.ContainerEvent e)
- Specified by:
componentRemoved in interface java.awt.event.ContainerListener
J/Link is Copyright (c) 1999-2008,
Wolfram Research, Inc. All rights reserved.