public class MathItemListener extends MathListener implements java.awt.event.ItemListener
In response to an ItemEvent, objects of this class send to Mathematica:
userCode[theItemEvent, theItemEvent.getStateChange()]
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 |
|---|
MathItemListener()
The constructor that is typically called from Mathematica.
|
MathItemListener(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.
|
MathItemListener(java.lang.String func)
Because the ItemListener interface
has only one method, itemStateChanged(), you can specify the Mathematica function to be
called with this constructor, rather than having to separately call setHandler().
|
| Modifier and Type | Method and Description |
|---|---|
void |
itemStateChanged(java.awt.event.ItemEvent e) |
callMathHandler, callVoidMathHandler, getHandler, getLink, setHandlerpublic MathItemListener()
public MathItemListener(KernelLink ml)
ml - The link to which computations will be sent when itemStateChanged is called.public MathItemListener(java.lang.String func)
func - The Mathematica function to be executed in response to an ItemEvent.J/Link is Copyright (c) 1999-2012, Wolfram Research, Inc. All rights reserved.