lt.monarch.chart.plugins
Class ToolTipManager

java.lang.Object
  extended by lt.monarch.chart.plugins.AbstractChartPlugin<AbstractChart<?,?>>
      extended by lt.monarch.chart.plugins.ToolTipManager
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable, java.lang.Runnable, java.util.EventListener, ChartPlugin<AbstractChart<?,?>>

public class ToolTipManager
extends AbstractChartPlugin<AbstractChart<?,?>>
implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener, java.lang.Runnable

See Also:
Serialized Form

Constructor Summary
Constructor and Description
ToolTipManager()
           
ToolTipManager(Marker toolTip)
           
 
Method Summary
Modifier and Type Method and Description
 void activate()
          Prepares the plug-in, when it is installed.
 void deactivate()
          Cleanups the plug-in, when it is uninstalled.
 int getShowTime()
          Returns what tool tip show time is set
 Marker getToolTip()
           
protected  void hideTip()
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void paint(AbstractGraphics g)
          Does nothing- must be overridden in extending classes.
protected  void requestTip(ChartEntity entity, Point2D pt)
           
 void run()
           
 void setShowTime(int showTime)
          Sets the timer time for showing the tool tip
 void setTextAlignment(Alignment hAlign, Alignment vAlign)
           
 void setToolTip(Marker toolTip)
           
 void setToolTipPopupDelay(long delay)
           
 
Methods inherited from class lt.monarch.chart.plugins.AbstractChartPlugin
adjustChart, chart, getChart, install, isActivated, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolTipManager

public ToolTipManager()

ToolTipManager

public ToolTipManager(Marker toolTip)
Method Detail

setToolTip

public void setToolTip(Marker toolTip)

setTextAlignment

public void setTextAlignment(Alignment hAlign,
                             Alignment vAlign)

getToolTip

public Marker getToolTip()

setToolTipPopupDelay

public void setToolTipPopupDelay(long delay)

activate

public void activate()
Description copied from class: AbstractChartPlugin
Prepares the plug-in, when it is installed. Also called when chart is activated.

Specified by:
activate in class AbstractChartPlugin<AbstractChart<?,?>>

deactivate

public void deactivate()
Description copied from class: AbstractChartPlugin
Cleanups the plug-in, when it is uninstalled. Also called when chart is deactivated.

Specified by:
deactivate in class AbstractChartPlugin<AbstractChart<?,?>>

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

paint

public void paint(AbstractGraphics g)
Description copied from class: AbstractChartPlugin
Does nothing- must be overridden in extending classes.

Specified by:
paint in interface ChartPlugin<AbstractChart<?,?>>
Overrides:
paint in class AbstractChartPlugin<AbstractChart<?,?>>
Parameters:
g - the Graphics context in which chart is painted
See Also:
ChartPlugin.paint(lt.monarch.chart.engine.AbstractGraphics)

hideTip

protected void hideTip()

requestTip

protected void requestTip(ChartEntity entity,
                          Point2D pt)

run

public void run()
Specified by:
run in interface java.lang.Runnable

getShowTime

public int getShowTime()
Returns what tool tip show time is set

Returns:
shot time in milliseconds

setShowTime

public void setShowTime(int showTime)
Sets the timer time for showing the tool tip

Parameters:
showTime - Time how long to show tool tip in milliseconds