|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=TYPE) public @interface EventSet
The EventSet annotation type is used to mark an interface that defines a group of events associated with a Java Control. By convention, event interfaces are defined as inner classes on the Java Control public interface. Each method defined within a event interface indicates an event that can be delivered by the control.
Here is a simple example:
This will declare an event interface named
public interface MyControl extends org.apache.beehive.controls.api.Control
{
MyEvents
that declares a single
event: anEvent
The declaration of an EventSet for a control also means that the associated Control
JavaBean will have listener registration/deregistration APIs. The name of these
APIs will be add/remove
The above example would result in the following APIs on MyControlBean
public class MyControlBean implements MyControl
{
...
public void addMyEventsListener(MyEvents listener) { ... }
public void removeMyEventsListener(MyEvents listener) { ... }
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |