Package com.wolfram.jlink
Class MathWindowListener
- java.lang.Object
-
- com.wolfram.jlink.MathListener
-
- com.wolfram.jlink.MathWindowListener
-
- All Implemented Interfaces:
java.awt.event.WindowListener,java.util.EventListener
public class MathWindowListener extends MathListener implements java.awt.event.WindowListener
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 an WindowEvent, objects of this class send to Mathematica:
userFunc[theWindowEvent]userFunc is specified as a string, either a function name or an expression (like a pure function "foo[#]&"), via the setHandler() method.
-
-
Constructor Summary
Constructors Constructor Description MathWindowListener()The constructor that is called from Mathematica.MathWindowListener(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.MathWindowListener(java.lang.String[][] handlers)This form of the constructor lets you skip having to make a series of setHandler() calls.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwindowActivated(java.awt.event.WindowEvent e)voidwindowClosed(java.awt.event.WindowEvent e)voidwindowClosing(java.awt.event.WindowEvent e)voidwindowDeactivated(java.awt.event.WindowEvent e)voidwindowDeiconified(java.awt.event.WindowEvent e)voidwindowIconified(java.awt.event.WindowEvent e)voidwindowOpened(java.awt.event.WindowEvent e)-
Methods inherited from class com.wolfram.jlink.MathListener
callMathHandler, callVoidMathHandler, getHandler, getLink, setHandler
-
-
-
-
Constructor Detail
-
MathWindowListener
public MathWindowListener()
The constructor that is called from Mathematica.
-
MathWindowListener
public MathWindowListener(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 WindowEvents arrive.
-
MathWindowListener
public MathWindowListener(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 WindowListener interface with Mathematica functions.
-
-
Method Detail
-
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Specified by:
windowActivatedin interfacejava.awt.event.WindowListener
-
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Specified by:
windowClosedin interfacejava.awt.event.WindowListener
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
- Specified by:
windowClosingin interfacejava.awt.event.WindowListener
-
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Specified by:
windowDeactivatedin interfacejava.awt.event.WindowListener
-
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Specified by:
windowDeiconifiedin interfacejava.awt.event.WindowListener
-
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Specified by:
windowIconifiedin interfacejava.awt.event.WindowListener
-
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Specified by:
windowOpenedin interfacejava.awt.event.WindowListener
-
-