|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XuiEventHandler
Specifies an event handler for XUI. Most of the common events are handled. The class's implementations are intended as a mixin for a panel class such as XPage and should not be used directly
Copyright (c) Xoetrope Ltd., 2002-2003
License: see license.txt
$Revision: 1.7 $| Method Summary | |
|---|---|
void |
addActionHandler(java.lang.Object comp, java.lang.String methodName)Adds a handler for action events |
void |
addFocusHandler(java.lang.Object comp, java.lang.String methodName)Adds a handler for focus events |
XMethodReference |
addHandler(java.lang.Object comp, long eventType, java.lang.String methodName)Adds an event handler. |
XMethodReference |
addHandler(java.lang.Object srcObj, java.lang.String methodName, java.lang.String adderMethod, java.lang.String listenerInterface, long eventMask, java.lang.Object listener)Adds a handler for action events |
void |
addItemHandler(java.lang.Object comp, java.lang.String methodName)Adds a handler for item events |
void |
addKeyHandler(java.lang.Object comp, java.lang.String methodName)Adds a handler for key events |
void |
addListener(java.lang.Object comp, java.lang.String listenerName, java.lang.String argType, java.lang.Object listener)Adds a listener for an event type. |
void |
addMenuHandler(java.lang.Object menuItem, java.lang.String methodName)Adds a handler for action events |
void |
addMouseHandler(java.lang.Object comp, java.lang.String methodName)Adds a handler for mouse events |
void |
addMouseMotionHandler(java.lang.Object comp, java.lang.String methodName)Adds a handler for mouse motion events |
void |
addTextHandler(java.lang.Object comp, java.lang.String methodName)Adds a handler for text events |
java.lang.reflect.Method |
findEvent(java.lang.Object src, long eventType)Lookup an event for a component. |
java.util.EventObject |
getCurrentEvent()Get the current event |
XValidationHandler |
getValidationHandler()Get the validation handler reference. |
void |
invoke(long eventType, java.util.EventObject evt)Invokes an event. |
boolean |
isFocusChangeSuppressed()Check the focus change status |
void |
removeHandlers(java.lang.Object comp)Remove all the event handlers for a particular object |
void |
suppressFocusEvents(boolean suppress)Used by messageboxes and other dialogs to prevent the display of the dialog causing extra focus events from being fired. |
boolean |
wasMouseClicked()A utility method used to determine if the last event corrseponds to a mouse click. |
boolean |
wasMouseDoubleClicked()A utility method used to determine if the last event corrseponds to a mouse double click. |
boolean |
wasMouseRightClicked()A utility method used to determine if the last event corrseponds to a mouse right click. |
| Method Detail |
|---|
XValidationHandler getValidationHandler()
void invoke(long eventType,
java.util.EventObject evt)
eventType - the event typeevt - the event objectvoid removeHandlers(java.lang.Object comp)
comp - the object whose events are being removed
XMethodReference addHandler(java.lang.Object comp,
long eventType,
java.lang.String methodName)
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException
eventType - long value indicating the mask of the event to be handledcomp - the component that fires the eventmethodName - the method to be invoked in response to the objectjava.lang.ClassNotFoundException - throw if the class cannot be locatedjava.lang.NoSuchMethodException - throw if the named method cannot be located
XMethodReference addHandler(java.lang.Object srcObj,
java.lang.String methodName,
java.lang.String adderMethod,
java.lang.String listenerInterface,
long eventMask,
java.lang.Object listener)
srcObj - the menu item that fires the eventsmethodName - the method to be invoked in response to the action eventadderMethod - the adder method name e.g. addActionListenerlistenerInterface - the listener interface e.g. java.awt.event.ActionListenereventMask - the event mask e.g. AWTEvent.ACTION_EVENT_MASKlistener - the listener implementation, usually the page's this pointerActionListener, ActionEvent
void addListener(java.lang.Object comp,
java.lang.String listenerName,
java.lang.String argType,
java.lang.Object listener)
comp - the component that fires eventslistenerName - the name of the listener interfaceargType - the listener argumentslistener - the listener implementation, usually the page's this pointer
void addMenuHandler(java.lang.Object menuItem,
java.lang.String methodName)
menuItem - the menu item that fires the eventsmethodName - the method to be invoked in response to the action eventActionListener, ActionEvent
void addActionHandler(java.lang.Object comp,
java.lang.String methodName)
comp - the component that fires the eventsmethodName - the method to be invoked in response to the action eventActionListener, ActionEvent
void addFocusHandler(java.lang.Object comp,
java.lang.String methodName)
comp - the component that fires the eventsmethodName - the method to be invoked in response to the focus eventFocusListener, FocusEvent
void addTextHandler(java.lang.Object comp,
java.lang.String methodName)
comp - the component that fires the eventsmethodName - the method to be invoked in response to the text eventTextListener, TextEvent
void addItemHandler(java.lang.Object comp,
java.lang.String methodName)
comp - the component that fires the eventsmethodName - the method to be invoked in response to the item eventItemListener, ItemEvent
void addKeyHandler(java.lang.Object comp,
java.lang.String methodName)
comp - the component that fires the eventsmethodName - the method to be invoked in response to the key eventKeyListener, KeyEvent
void addMouseHandler(java.lang.Object comp,
java.lang.String methodName)
comp - the component that fires the eventsmethodName - the method to be invoked in response to the mouse eventMouseMotionListener, MouseEvent
void addMouseMotionHandler(java.lang.Object comp,
java.lang.String methodName)
comp - the component that fires the eventsmethodName - the method to be invoked in response to the mouse eventMouseMotionListener, MouseEvent
boolean wasMouseClicked()
boolean wasMouseDoubleClicked()
boolean wasMouseRightClicked()
java.util.EventObject getCurrentEvent()
boolean isFocusChangeSuppressed()
void suppressFocusEvents(boolean suppress)
suppress - true to suppress focus events
java.lang.reflect.Method findEvent(java.lang.Object src,
long eventType)
src - The Object which contains the eventeventType - The id of the event required
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||