|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.event.ClickListener
public class ClickListener
Adds mouse support for clickable controls/regions
Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.
$Revision: 1.6 $
| Constructor Summary | |
|---|---|
ClickListener(java.awt.Component ownr)
Constructs a simple listener that tracks the state of a check mark |
|
ClickListener(java.awt.Component ownr,
int startPos)
Constructs a listener that can track the state of multiple checkmarks. |
|
| Method Summary | |
|---|---|
void |
addActionListener(java.awt.event.ActionListener l)
Adds the specified action listener to receive action events from this button. |
int |
getActiveResponse()
Gets the active response for a listener tracking multiple check marks. |
java.awt.Point |
getClickLocation()
Get the location of the mouse click |
boolean |
getIsEntered()
Gets the entered state of the owner control |
boolean |
getIsSelected()
Gets the selected state of the owner control |
int |
getSelectedResponse()
Gets the selected response for a listener tracking multiple check marks. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Calls the owner's parent responsToEvent method with BUTTON_CLCIKED as the event id |
void |
mouseDragged(java.awt.event.MouseEvent e)
Tracks the mouse position of the owner control |
void |
mouseEntered(java.awt.event.MouseEvent e)
Tracks the entered state of the owner control |
void |
mouseExited(java.awt.event.MouseEvent e)
Tracks the entered state of the owner control |
void |
mouseMoved(java.awt.event.MouseEvent e)
Tracks the mouse position of the owner control |
void |
mousePressed(java.awt.event.MouseEvent e)
Tracks the mouse pressed state of the owner control |
void |
mouseReleased(java.awt.event.MouseEvent e)
Tracks the mouse pressed state of the owner control |
protected void |
processActionEvent(java.awt.event.ActionEvent e)
Processes action events occurring on this button by dispatching them to any registered ActionListener objects. |
void |
removeActionListener(java.awt.event.ActionListener l)
Removes the specified action listener so that it no longer receives action events from this button. |
void |
reset()
Resets the listener's state |
void |
setActiveResponse(int resp)
Set the active response |
void |
setCancelOnDrag(boolean state)
Set the cancelOnDrag flag. |
void |
setIsSelected(boolean selected)
Sets the selected state of the owner control |
void |
setOffset(int off)
Sets the offset to the first check mark |
void |
setSelectedResponse(int resp)
Sets the selected response |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClickListener(java.awt.Component ownr)
ownr - The component to which this listener listens
public ClickListener(java.awt.Component ownr,
int startPos)
ownr - The component to which this listener listensstartPos - The offset to the first check mark| Method Detail |
|---|
public void reset()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenere - public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenere - public void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenere - public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenere - public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenere - public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenere - public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenere - public void setOffset(int off)
off - public boolean getIsEntered()
public boolean getIsSelected()
public void setIsSelected(boolean selected)
selected - the new state of the owner controlpublic int getActiveResponse()
public void setActiveResponse(int resp)
resp - the new active responsepublic int getSelectedResponse()
public void setSelectedResponse(int resp)
resp - the new selectionpublic void setCancelOnDrag(boolean state)
state - true to reset the statepublic java.awt.Point getClickLocation()
public void addActionListener(java.awt.event.ActionListener l)
l - the action listenerremoveActionListener(java.awt.event.ActionListener),
#getActionListeners,
ActionListenerpublic void removeActionListener(java.awt.event.ActionListener l)
l - the action listeneraddActionListener(java.awt.event.ActionListener),
#getActionListeners,
ActionListenerprotected void processActionEvent(java.awt.event.ActionEvent e)
ActionListener objects.
This method is not called unless action events are enabled for this button. Action events are enabled when one of the following occurs:
ActionListener object is registered
via addActionListener.
enableEvents.
Note that if the event parameter is null
the behavior is unspecified and may result in an
exception.
e - the action eventActionListener,
Button.addActionListener(java.awt.event.ActionListener),
Component.enableEvents(long)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||