All Packages Class Hierarchy This Package Previous Next Index

Class org.jfouffa.jslider.gui.TextListener

java.lang.Object
   |
   +----java.awt.event.MouseAdapter
           |
           +----org.jfouffa.jslider.gui.TextListener

public class TextListener
extends MouseAdapter
This class is a listener for a JButton that enables the edition of a Textfield by automatically showing a ListPopupMenu. This listener adds an EditorHandler to the ListPopupMenu it creates. This handler will update the textfield associated to your listener.


Constructor index

 o TextListener(String, String[], TextField)
Constructs a new TextListener with the specified title and items (used by the ListPopupMenu it automatically creates) and the specified Textfield.

Method index

 o mouseClicked(MouseEvent)
Shows the ListPopupMenu created by this class.

Constructors

 o TextListener
 public TextListener(String title,
                     String items[],
                     TextField text)
Constructs a new TextListener with the specified title and items (used by the ListPopupMenu it automatically creates) and the specified Textfield.

Parameters:
title - the ListPopupMenu's title
items - the ListPopupMenu's items
text - the textfield that will be updated by the ListPopupMenu's hanlder

Methods

 o mouseClicked
 public void mouseClicked(MouseEvent e)
Shows the ListPopupMenu created by this class.

Parameters:
e - the mouse event
Overrides:
mouseClicked in class MouseAdapter