[.home.]
[.hacks.]
[.java.]

Class Tip

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--Tip
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener

public class Tip
extends java.awt.event.MouseAdapter

(#)Tip.java

Version:
3.2 19-Mar-2004

A tip can be added to almost any widget, however it makes most sense for the static ones (Caption, non-editable textfields). If the user happens to click on the owning widget a helptext will pop up. Add with .addMouseListener(new Tip("Helptext"));
Author:
Holger Pfaff

Field Summary
protected  java.lang.String tip
          The helptext (tip)
 
Constructor Summary
Tip(java.lang.String t)
          Construct a new tip
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent e)
          React on mouse click event
 
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tip

protected java.lang.String tip
The helptext (tip)

Constructor Detail

Tip

public Tip(java.lang.String t)
Construct a new tip

Parameters:
t - helptext (tip)
Method Detail

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
React on mouse click event

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class java.awt.event.MouseAdapter
Parameters:
e - MouseEvent

[.home.]
[.hacks.]
[.java.]