|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.util.ObjectListener
public class ObjectListener
Implements ActionListener and MouseListener (and others) interfaces and holds an arbitrary object. This can be used to pass state into anonymous listener objects without having the defined as final in the creation scope of the listener. This also servers like the MouseAdapter - i.e., it implements all of the methods required in the various interfaces. A derived class does not need to implement all of the required methods - just the ones they need.
| Field Summary | |
|---|---|
protected Object |
theObject
This is the object that this class is instantiated with. |
| Constructor Summary | |
|---|---|
ObjectListener(Object stateObject)
Create the ObjectListener with the given object. |
|
ObjectListener(Object[] objs)
A helper constructor that convert the array of objects into an ObjectArray object. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent ev)
_more_ |
void |
actionPerformed(ActionEvent ev,
Object data)
This is a special method so we can pass a generic listener instance into another Class's method that can create some ui thing and route events to this guy. |
Object |
getObject()
_more_ |
void |
itemStateChanged(ItemEvent e)
_more_ |
void |
keyPressed(KeyEvent e)
_more_ |
void |
keyReleased(KeyEvent e)
_more_ |
void |
keyTyped(KeyEvent e)
_more_ |
void |
mouseClicked(MouseEvent e)
_more_ |
void |
mouseEntered(MouseEvent e)
_more_ |
void |
mouseExited(MouseEvent e)
_more_ |
void |
mousePressed(MouseEvent e)
_more_ |
void |
mouseReleased(MouseEvent e)
_more_ |
void |
setObject(Object object)
|
void |
windowActivated(WindowEvent event)
_more_ |
void |
windowClosed(WindowEvent event)
_more_ |
void |
windowClosing(WindowEvent event)
_more_ |
void |
windowDeactivated(WindowEvent event)
_more_ |
void |
windowDeiconified(WindowEvent event)
_more_ |
void |
windowIconified(WindowEvent event)
_more_ |
void |
windowOpened(WindowEvent event)
_more_ |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Object theObject
| Constructor Detail |
|---|
public ObjectListener(Object stateObject)
stateObject - The state objectpublic ObjectListener(Object[] objs)
objs - | Method Detail |
|---|
public Object getObject()
public void setObject(Object object)
public void itemStateChanged(ItemEvent e)
itemStateChanged in interface ItemListenere - public void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - public void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenere - public void mouseExited(MouseEvent e)
mouseExited in interface MouseListenere - public void mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - public void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenere - public void actionPerformed(ActionEvent ev)
actionPerformed in interface ActionListenerev - public void keyPressed(KeyEvent e)
keyPressed in interface KeyListenere - public void keyReleased(KeyEvent e)
keyReleased in interface KeyListenere - public void keyTyped(KeyEvent e)
keyTyped in interface KeyListenere - public void windowActivated(WindowEvent event)
windowActivated in interface WindowListenerevent - public void windowClosed(WindowEvent event)
windowClosed in interface WindowListenerevent - public void windowClosing(WindowEvent event)
windowClosing in interface WindowListenerevent - public void windowDeactivated(WindowEvent event)
windowDeactivated in interface WindowListenerevent - public void windowDeiconified(WindowEvent event)
windowDeiconified in interface WindowListenerevent - public void windowIconified(WindowEvent event)
windowIconified in interface WindowListenerevent - public void windowOpened(WindowEvent event)
windowOpened in interface WindowListenerevent -
public void actionPerformed(ActionEvent ev,
Object data)
ev - data -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||