|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.lwuit.events.ActionEvent
public class ActionEvent
Event object delivered when an ActionListener
callback is invoked
Constructor Summary | |
---|---|
ActionEvent(Command source,
Component sourceComponent,
int x,
int y)
Creates a new instance of ActionEvent for a command |
|
ActionEvent(java.lang.Object source)
Creates a new instance of ActionEvent |
|
ActionEvent(java.lang.Object source,
int keyEvent)
Creates a new instance of ActionEvent |
|
ActionEvent(java.lang.Object source,
int x,
int y)
Creates a new instance of ActionEvent as a pointer event |
Method Summary | |
---|---|
void |
consume()
Consume the event indicating that it was handled thus preventing other action listeners from handling/receiving the event |
Command |
getCommand()
If this event was sent as a result of a command action this method returns that command |
Component |
getComponent()
Returns the source component object |
int |
getKeyEvent()
If this event was triggered by a key press this method will return the appropriate keycode |
java.lang.Object |
getSource()
The element that triggered the action event, useful for decoupling event handling code |
int |
getX()
The X position if this is a pointer event otherwise undefined |
int |
getY()
The Y position if this is a pointer event otherwise undefined |
boolean |
isConsumed()
Returns true if the event was consumed thus indicating that it was handled. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActionEvent(java.lang.Object source)
source
- element for the action eventpublic ActionEvent(java.lang.Object source, int keyEvent)
source
- element for the action eventkeyEvent
- the key that triggered the eventpublic ActionEvent(java.lang.Object source, int x, int y)
source
- element for the pointer eventx
- the x position of the pointer eventy
- the y position of the pointer eventpublic ActionEvent(Command source, Component sourceComponent, int x, int y)
source
- element commandsourceComponent
- the triggering componentx
- the x position of the pointer eventy
- the y position of the pointer eventMethod Detail |
---|
public java.lang.Object getSource()
public int getKeyEvent()
public Command getCommand()
public Component getComponent()
public void consume()
public boolean isConsumed()
public int getX()
public int getY()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |