|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tbee.swing.SwingEventDispatcher
public class SwingEventDispatcher
This class implements a event handling behaviour of Swing components similar to VisualBasic.
| Nested Class Summary | |
|---|---|
static class |
SwingEventDispatcher.PropertyVetoException
For handling VetoableChange correctly. |
| Field Summary | |
|---|---|
static String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Constructor Summary | |
|---|---|
SwingEventDispatcher(Component component,
Object listener)
Initialize |
|
SwingEventDispatcher(Component component,
Object listener,
Map values)
Initialize |
|
SwingEventDispatcher(Component component,
String name,
Object listener)
Convenience constructor: set the name of the component and then initialize. |
|
SwingEventDispatcher(Component component,
String name,
Object listener,
Map values)
Convenience constructor: set the name of the component and then initialize. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
void |
focusGained(FocusEvent e)
|
void |
focusLost(FocusEvent e)
|
void |
itemStateChanged(ItemEvent e)
|
void |
mouseClicked(MouseEvent e)
this method calls mouseClicked and schedules a task to call either single, double, triple or many click |
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
stateChanged(ChangeEvent e)
|
void |
valueChanged(ListSelectionEvent e)
|
void |
valueChanged(TreeSelectionEvent e)
|
void |
vetoableChange(PropertyChangeEvent e)
|
static Component |
wrap(Component component,
String name,
Object listener)
This method is only for convenience, so you can write: JButton b = new JButton("y"); b.setName("z"); new SwingEventDispatcher(b, this); panel.add(b); as: panel.add( SwingEventDispatcher.wrap( new JButton("y"), "z", this) ); |
static Component |
wrap(Component component,
String name,
Object listener,
Map values)
This method is only for convenience, so you can write: JButton b = new JButton("y"); b.setName("z"); new SwingEventDispatcher(b, this, null); panel.add(b); as: panel.add( SwingEventDispatcher.wrap( new JButton("y"), "z", this, null) ); |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SOURCECODE_VERSION
| Constructor Detail |
|---|
public SwingEventDispatcher(Component component,
String name,
Object listener,
Map values)
component - the component of which the events must be dispatchedname - the name that the component gets (is used in finding the event methods)listener - which class / instance contains the event methodsvalues - a convenience map for passing values
public SwingEventDispatcher(Component component,
String name,
Object listener)
component - the component of which the events must be dispatchedname - the name that the component gets (is used in finding the event methods)listener - which class / instance contains the event methods
public SwingEventDispatcher(Component component,
Object listener,
Map values)
component - the component of which the events must be dispatchedlistener - which class / instance contains the event methodsvalues - a convenience map for passing values
public SwingEventDispatcher(Component component,
Object listener)
component - the component of which the events must be dispatchedlistener - which class / instance contains the event methods| Method Detail |
|---|
public static Component wrap(Component component,
String name,
Object listener)
component - the component of which the events must be dispatchedname - the name that the component gets (is used in finding the event methods)listener - which class / instance contains the event methods
public static Component wrap(Component component,
String name,
Object listener,
Map values)
component - the component of which the events must be dispatchedname - the name that the component gets (is used in finding the event methods)listener - which class / instance contains the event methodsvalues - a convenience map for passing values
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void focusGained(FocusEvent e)
focusGained in interface FocusListenerpublic void focusLost(FocusEvent e)
focusLost in interface FocusListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void valueChanged(ListSelectionEvent e)
valueChanged in interface ListSelectionListenerpublic void stateChanged(ChangeEvent e)
stateChanged in interface ChangeListenerpublic void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListener
public void vetoableChange(PropertyChangeEvent e)
throws PropertyVetoException
vetoableChange in interface VetoableChangeListenerPropertyVetoExceptionpublic void valueChanged(TreeSelectionEvent e)
valueChanged in interface TreeSelectionListenerpublic void itemStateChanged(ItemEvent e)
itemStateChanged in interface ItemListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||