public class MathVetoableChangeListener extends MathListener implements java.beans.VetoableChangeListener
In response to a PropertyChangeEvent, objects of this class send to Mathematica:
userFunc[thePropertyChangeEvent]userFunc is specified as a string, either a function name or an expression (like a pure function "foo[#]&"), via the setHandler() method.
To veto the property change, have userFunc return False.
Constructor and Description |
---|
MathVetoableChangeListener()
The constructor that is typically called from Mathematica.
|
MathVetoableChangeListener(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.
|
MathVetoableChangeListener(java.lang.String func)
Because the PropertyChangeListener interface
has only one method, vetoableChange(), 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 |
vetoableChange(java.beans.PropertyChangeEvent e) |
callMathHandler, callVoidMathHandler, getHandler, getLink, setHandler
public MathVetoableChangeListener()
public MathVetoableChangeListener(KernelLink ml)
ml
- The link to which computations will be sent when PropertyChangeEvents arrive.public MathVetoableChangeListener(java.lang.String func)
func
- The Mathematica function to be executed in response to a PropertyChangeEvent.J/Link is Copyright (c) 1999-2020, Wolfram Research, Inc. All rights reserved.