Wire Event Listeners"

From Documentation
Line 2: Line 2:
  
 
=Wire Event Listeners=
 
=Wire Event Listeners=
 +
 +
To wire an event listener, all you need is to declare a method with the event name. The method could have an optional argument for the event received. For example,
 +
 +
<source lang="java">
 +
public void onChange(InputEvent event) {
 +
  //it will be wired and called when onChange is received.
 +
}
 +
public void onMove() {
 +
  //wired and called too, but no pass of the event
 +
}
 +
</source>
  
 
=Wire Event Listeners Targeting Fellows=
 
=Wire Event Listeners Targeting Fellows=

Revision as of 07:41, 12 November 2010


Wire Event Listeners


Wire Event Listeners

To wire an event listener, all you need is to declare a method with the event name. The method could have an optional argument for the event received. For example,

public void onChange(InputEvent event) {
   //it will be wired and called when onChange is received.
}
public void onMove() {
  //wired and called too, but no pass of the event
}

Wire Event Listeners Targeting Fellows

Wire Event Listeners in Nested ID Space

Version History

Last Update : 2010/11/12

Version Date Content
     



Last Update : 2010/11/12

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.