Class ButtonHandler

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--ButtonHandler

class ButtonHandler
extends java.awt.event.MouseAdapter

This object is used to manage the mouse event associate to the ButtonCtrl. It will send the command associate to the attached button.

Author:
Guy Parent
See Also:
ButtonCtrl, MouseAdapter

Field Summary
(package private)  boolean m_bAutoRelease
          If it true it will unpress the button after the action is perform.
(package private)  ButtonCtrl m_button
          Keep the attached button.
 
Constructor Summary
ButtonHandler(ButtonCtrl button, boolean bAutomaticRelease)
          Constructor.
 
Method Summary
 void mousePressed(java.awt.event.MouseEvent e)
          Anwser to the mouse press event.
 void mouseReleased(java.awt.event.MouseEvent e)
          Called when the user release the mouse button.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_button

ButtonCtrl m_button
Keep the attached button.

m_bAutoRelease

boolean m_bAutoRelease
If it true it will unpress the button after the action is perform. Otherwise the button will be stay in pressed state.
Constructor Detail

ButtonHandler

public ButtonHandler(ButtonCtrl button,
                     boolean bAutomaticRelease)
Constructor.
Parameters:
button - Button which listen the events.
bAutomaticRelease - If true, the button will automaticaly unpress after sending the command.
Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Anwser to the mouse press event. It will send the command to the listener attached to the button.
Overrides:
mousePressed in class java.awt.event.MouseAdapter
Parameters:
e - Mouse event object
See Also:
MouseEvent

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Called when the user release the mouse button.
Overrides:
mouseReleased in class java.awt.event.MouseAdapter
Parameters:
e - Mouse event object
See Also:
MouseEvent