public class MathContainerListener extends MathListener implements java.awt.event.ContainerListener
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
componentAdded(java.awt.event.ContainerEvent e) |
void |
componentRemoved(java.awt.event.ContainerEvent e) |
callMathHandler, callVoidMathHandler, getHandler, getLink, setHandler
public MathContainerListener()
public MathContainerListener(KernelLink ml)
ml
- The link to which computations will be sent when ContainerEvents arrive.public MathContainerListener(java.lang.String[][] handlers)
handlers
- An array of {meth, func} pairs associating methods in the ContainerListener
interface with Mathematica functions.public void componentAdded(java.awt.event.ContainerEvent e)
componentAdded
in interface java.awt.event.ContainerListener
public void componentRemoved(java.awt.event.ContainerEvent e)
componentRemoved
in interface java.awt.event.ContainerListener
J/Link is Copyright (c) 1999-2020, Wolfram Research, Inc. All rights reserved.