|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventHandler
This interface can be used for object that want to gather events (mouse pressed, etc.) produced by HIDs.
This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN
Malai is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
05/19/2010
Method Summary | |
---|---|
void |
onButtonPressed(javax.swing.AbstractButton button)
Defines actions to do when a button is activated. |
void |
onCheckBoxModified(javax.swing.JCheckBox checkbox)
Defines actions to do when the given check box is selected/unselected. |
void |
onItemSelected(java.awt.ItemSelectable itemSelectable)
Defines actions to do when the selected items of the given list changed. |
void |
onKeyPressure(int key,
int idHID,
java.lang.Object source)
Defines actions to do when a key of a keyboard is pressed. |
void |
onKeyRelease(int key,
int idHID,
java.lang.Object source)
Defines actions to do when a key of a keyboard is released. |
void |
onMenuItemPressed(javax.swing.JMenuItem menuItem)
Defines actions to do when the given menu item is pressed. |
void |
onMove(int button,
int x,
int y,
boolean pressed,
int idHID,
java.lang.Object source)
Defines action to do when a mouse or something equivalent is moved. |
void |
onPressure(int button,
int x,
int y,
int idHID,
java.lang.Object source)
Defines action to do when the button of a mouse or something equivalent is pressed. |
void |
onRelease(int button,
int x,
int y,
int idHID,
java.lang.Object source)
Defines action to do when the button of a mouse or something equivalent is released. |
void |
onScroll(int posX,
int posY,
int direction,
int amount,
int type,
int idHID,
java.lang.Object src)
Defines actions to do when a scrolling device (e.g. a mouse wheel) is used. |
void |
onSpinnerChanged(javax.swing.JSpinner spinner)
Defines actions to do when the value of the given spinner change. |
void |
onTabChanged(javax.swing.JTabbedPane tabbedPanel)
Defines actions to do when the selected tab of a tabbed panel has changed. |
void |
onTextChanged(javax.swing.text.JTextComponent textComp)
Defines actions to do when the text of a text field or something equivalent is modified. |
void |
onTimeout(TimeoutTransition timeoutTransition)
Defines action to do when a timeout is elapsed. |
void |
onWindowClosed(MFrame frame)
Defines actions to do when the decorative close button of a frame is pressed. |
Method Detail |
---|
void onTimeout(TimeoutTransition timeoutTransition)
timeoutTransition
- The transition which produced the timeout event.void onPressure(int button, int x, int y, int idHID, java.lang.Object source)
button
- The identifier of the pressed button.x
- The X-coordinate of the pressure location.y
- The Y-coordinate of the pressure location.idHID
- The identifier of the used HID.source
- The object that produces the event.void onRelease(int button, int x, int y, int idHID, java.lang.Object source)
button
- The identifier of the released button.x
- The X-coordinate of the release location.y
- The Y-coordinate of the release location.idHID
- The identifier of the used HID.source
- The object that produces the event.void onMove(int button, int x, int y, boolean pressed, int idHID, java.lang.Object source)
button
- The identifier of the pressed button, if a button is pressed (else -1).x
- The X-coordinate of the pressure location.y
- The Y-coordinate of the pressure location.pressed
- True: a button of the mouse is pressed.idHID
- The identifier of the used HID.source
- The object that produces the event.void onKeyPressure(int key, int idHID, java.lang.Object source)
key
- The pressed key code.idHID
- The identifier of the HID that produced the event.source
- The object that produces the event.void onKeyRelease(int key, int idHID, java.lang.Object source)
key
- The released key code.idHID
- The identifier of the HID that produced the event.source
- The object that produces the event.void onButtonPressed(javax.swing.AbstractButton button)
button
- The pressed button.void onSpinnerChanged(javax.swing.JSpinner spinner)
spinner
- The spinner that changed.void onItemSelected(java.awt.ItemSelectable itemSelectable)
itemSelectable
- The list that changed.void onCheckBoxModified(javax.swing.JCheckBox checkbox)
checkbox
- The modified check box;void onMenuItemPressed(javax.swing.JMenuItem menuItem)
menuItem
- The pressed menu item.void onTextChanged(javax.swing.text.JTextComponent textComp)
textComp
- The text field.void onScroll(int posX, int posY, int direction, int amount, int type, int idHID, java.lang.Object src)
posX
- The X-coordinate of the position where the event occurred.posY
- The Y-coordinate of the position where the event occurred.direction
- Defines if the scrolling is up (positive value) or down (negative value).amount
- The number of units to scroll by scroll.type
- The type of scrolling that should take place in response to this event (block or unit increment).idHID
- The identifier of the used HID.src
- The object that threw the event.void onWindowClosed(MFrame frame)
frame
- The frame closed.void onTabChanged(javax.swing.JTabbedPane tabbedPanel)
tabbedPanel
- The tabbed panel that produces the event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |