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