net.sf.jaxodraw.gui.panel
Class JaxoLatexTextToolTip

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by javax.swing.event.MouseInputAdapter
          extended by net.sf.jaxodraw.gui.panel.JaxoLatexTextToolTip
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.event.WindowFocusListener, java.util.EventListener, javax.swing.event.MouseInputListener

public class JaxoLatexTextToolTip
extends javax.swing.event.MouseInputAdapter
implements java.awt.event.WindowFocusListener

Show tooltips if the mouse moves over JaxoLatexText objects on the JaxoCanvas in the focused window. Note: For simplicity, this implements listener methods directly. Do not call or override.

Since:
2.0

Constructor Summary
JaxoLatexTextToolTip(JaxoMainPanel mainPanel)
          Constructor.
 
Method Summary
 boolean isEnabled()
          If not enabled, do nothing.
 void mouseDragged(java.awt.event.MouseEvent e)
          Process the event when the mouse is dragged on the canvas.
 void mouseEntered(java.awt.event.MouseEvent e)
          Process the event when the mouse enters the canvas.
 void mouseExited(java.awt.event.MouseEvent e)
          Process the event when the mouse exits the canvas.
 void mouseMoved(java.awt.event.MouseEvent e)
          The action to be taken when the mouse is moved on the canvas.
 void mousePressed(java.awt.event.MouseEvent e)
          Process the event when the mouse is pressed on the canvas.
 void setEnabled(boolean value)
          If not enabled, do nothing.
 void windowGainedFocus(java.awt.event.WindowEvent e)
          Action when window gains focus.
 void windowLostFocus(java.awt.event.WindowEvent e)
          Action when window looses focus.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseReleased, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseReleased
 

Constructor Detail

JaxoLatexTextToolTip

public JaxoLatexTextToolTip(JaxoMainPanel mainPanel)
Constructor.

Parameters:
mainPanel - Instance of the main panel.
Method Detail

isEnabled

public final boolean isEnabled()
If not enabled, do nothing. Default is false.

Returns:
True if currently enabled.

setEnabled

public void setEnabled(boolean value)
If not enabled, do nothing. Default is false.

Parameters:
value - True to enable.

windowGainedFocus

public void windowGainedFocus(java.awt.event.WindowEvent e)
Action when window gains focus. Does nothing.

Specified by:
windowGainedFocus in interface java.awt.event.WindowFocusListener
Parameters:
e - the window event.

windowLostFocus

public void windowLostFocus(java.awt.event.WindowEvent e)
Action when window looses focus. Hide tooltip window.

Specified by:
windowLostFocus in interface java.awt.event.WindowFocusListener
Parameters:
e - the window event.

mouseEntered

public final void mouseEntered(java.awt.event.MouseEvent e)
Process the event when the mouse enters the canvas. Perform action, just in case.

Specified by:
mouseEntered in interface java.awt.event.MouseListener
Overrides:
mouseEntered in class java.awt.event.MouseAdapter
Parameters:
e - The mouse event to process.

mouseMoved

public final void mouseMoved(java.awt.event.MouseEvent e)
The action to be taken when the mouse is moved on the canvas. Checks for Latex texts and shows the latex panel.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class java.awt.event.MouseAdapter
Parameters:
e - The mouse event.

mouseExited

public final void mouseExited(java.awt.event.MouseEvent e)
Process the event when the mouse exits the canvas. Hide window.

Specified by:
mouseExited in interface java.awt.event.MouseListener
Overrides:
mouseExited in class java.awt.event.MouseAdapter
Parameters:
e - The mouse event to process.

mousePressed

public final void mousePressed(java.awt.event.MouseEvent e)
Process the event when the mouse is pressed on the canvas. Hide window on MOVE/DUPLICATE.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class java.awt.event.MouseAdapter
Parameters:
e - The mouse event to process.

mouseDragged

public final void mouseDragged(java.awt.event.MouseEvent e)
Process the event when the mouse is dragged on the canvas. Hide window on MOVE/DUPLICATE.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class java.awt.event.MouseAdapter
Parameters:
e - The mouse event to process.


Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.