public class MathMouseListener extends MathListener implements java.awt.event.MouseListener
In response to a MouseEvent, objects of this class send to Mathematica:
userCode[theMouseEvent, theMouseEvent.getX(), theMouseEvent.getY(), theMouseEvent.getClickCount()]
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 |
|---|
MathMouseListener()
The constructor that is called from Mathematica.
|
MathMouseListener(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.
|
MathMouseListener(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 |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
callMathHandler, callVoidMathHandler, getHandler, getLink, setHandlerpublic MathMouseListener()
public MathMouseListener(KernelLink ml)
ml - The link to which computations will be sent when MouseEvents arrive.public MathMouseListener(java.lang.String[][] handlers)
handlers - An array of {meth, func} pairs associating methods in the MouseListener
interface with Mathematica functions.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerJ/Link is Copyright (c) 1999-2012, Wolfram Research, Inc. All rights reserved.