GLG Toolkit, Java Class Library
Version 4.5
|
An Input listener is used to handle user interaction with input objects, as well as to perform object selection and action processing. More...
An Input listener is used to handle user interaction with input objects, as well as to perform object selection and action processing.
The listener is installed via AddListener with the listener type=INPUT_CB.
See InputCallback for more information.
Inherited by GlgJBean.
Public Member Functions | |
void | InputCallback (GlgObject glg_object, GlgObject message) |
Input handler method. More... | |
Input handler method.
This method is invoked on any user interaction with GLG drawing and its input objects.
glg_object | The viewport the listener is attached to. |
message | The message object containing information about the event or action that triggered the callback. |
See the Appendix B: Message Object Resources section of the Appendices chapter of the GLG Programming Reference Manual for a description of data contained in the message object.
The example below demonstrates a very simple input listener which terminates the application when a Quit button is pressed. The example demonstrates how to handle the default input object events and process attached command actions.
The DEMOS_JAVA/GlgRealTimeChart.java file in the GLG installation directory provides an elaborate example of using the Input listener. Other GLG Demos and Examples also provide coding examples of using the listener.
Implemented in GlgJBean.