All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ejmf.toolkit.controls.MouseListenerControl

java.lang.Object
   |
   +----ejmf.toolkit.controls.AbstractListenerControl
           |
           +----ejmf.toolkit.controls.MouseListenerControl

public abstract class MouseListenerControl
extends AbstractListenerControl
All button which require a mouse listener extend MouseListenerControl. Such buttons, for example, need to recognize mousePressed and mouseReleased as different events. MouseListenerControl supplies public methods for manipulating a control's EventListener as an MouseListener thereby providing type-safety at runtime.


Constructor Index

 o MouseListenerControl()
Create a MouseListenerControl
 o MouseListenerControl(Controller)
Create a MouseListenerControl and associate it with a Controller.

Method Index

 o addControlListener(EventListener)
Add control semantics to this Control.
 o removeControlListener(EventListener)
Remove control semantics from this Control.
 o setComponent(AbstractButton)
Type-safe way to set Control Component.
 o setComponentAndListener(AbstractButton, MouseListener)
Type-safe way to set Control Component and control listener.
 o setControlListener(MouseListener)
Type-safe way to set Control listener.

Constructors

 o MouseListenerControl
 protected MouseListenerControl(Controller controller)
Create a MouseListenerControl and associate it with a Controller.

Parameters:
controller - A Controller with which control is to be associated.
 o MouseListenerControl
 protected MouseListenerControl()
Create a MouseListenerControl

Methods

 o addControlListener
 protected void addControlListener(EventListener listener)
Add control semantics to this Control.

Parameters:
listener - java.util.EventListener representing control semantics to be added.
Overrides:
addControlListener in class AbstractListenerControl
 o removeControlListener
 protected void removeControlListener(EventListener listener)
Remove control semantics from this Control.

Parameters:
listener - java.util.EventListener representing control semantics to be removed.
Overrides:
removeControlListener in class AbstractListenerControl
 o setComponentAndListener
 public void setComponentAndListener(AbstractButton button,
                                     MouseListener listener)
Type-safe way to set Control Component and control listener.

Parameters:
button - An AbstractButton that serves as Control component.
listener - A ChangeListener that implements Control semantics.
 o setControlListener
 public void setControlListener(MouseListener listener)
Type-safe way to set Control listener.

Parameters:
listener - A ChangeListener that implements Control semantics.
 o setComponent
 public void setComponent(AbstractButton button)
Type-safe way to set Control Component.

Parameters:
button - An AbstractButton that acts as control component.

All Packages  Class Hierarchy  This Package  Previous  Next  Index