|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl
net.sf.fmj.ejmf.toolkit.gui.controls.MouseListenerControl
public abstract class MouseListenerControl
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.
| Field Summary |
|---|
| Fields inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl |
|---|
skin |
| Constructor Summary | |
|---|---|
protected |
MouseListenerControl(Skin skin)
Create a MouseListenerControl |
protected |
MouseListenerControl(Skin skin,
Controller controller)
Create a MouseListenerControl and associate it with a Controller. |
| Method Summary | |
|---|---|
protected void |
addControlListener(java.util.EventListener listener)
Add control semantics to this Control. |
protected void |
removeControlListener(java.util.EventListener listener)
Remove control semantics from this Control. |
void |
setComponent(javax.swing.AbstractButton button)
Type-safe way to set Control Component. |
void |
setComponentAndListener(javax.swing.AbstractButton button,
java.awt.event.MouseListener listener)
Type-safe way to set Control Component and control listener. |
void |
setControlListener(java.awt.event.MouseListener listener)
Type-safe way to set Control listener. |
| Methods inherited from class net.sf.fmj.ejmf.toolkit.gui.controls.AbstractListenerControl |
|---|
createControlComponent, createControlListener, getControlComponent, getController, getDefaultControlListener, initListener, isOperational, setComponent, setComponentAndListener, setController, setControllerHook, setControlListener, setOperational, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected MouseListenerControl(Skin skin,
Controller controller)
controller - A Controller with which control
is to be associated.protected MouseListenerControl(Skin skin)
| Method Detail |
|---|
protected void addControlListener(java.util.EventListener listener)
addControlListener in class AbstractListenerControllistener - java.util.EventListener representing
control semantics to be added.protected void removeControlListener(java.util.EventListener listener)
removeControlListener in class AbstractListenerControllistener - java.util.EventListener representing
control semantics to be removed.
public void setComponentAndListener(javax.swing.AbstractButton button,
java.awt.event.MouseListener listener)
button - An AbstractButton that serves as Control
component.listener - A ChangeListener that implements
Control semantics.public void setControlListener(java.awt.event.MouseListener listener)
listener - A ChangeListener that implements
Control semantics.public void setComponent(javax.swing.AbstractButton button)
button - An AbstractButton that acts as control
component.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||