Package muntjac :: Package ui :: Module button :: Class ClickEvent
[hide private]
[frames] | no frames]

Class ClickEvent

source code

      object --+        
               |        
util.EventObject --+    
                   |    
     component.Event --+
                       |
                      ClickEvent

Click event. This event is thrown, when the button is clicked.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
__init__(self, source, details=None)
New instance with mouse details
source code
 
getButton(self)
Gets the Button where the event occurred.
source code
 
getClientX(self)
Returns the mouse position (x coordinate) when the click took place.
source code
 
getClientY(self)
Returns the mouse position (y coordinate) when the click took place.
source code
 
getRelativeX(self)
Returns the relative mouse position (x coordinate) when the click took place.
source code
 
getRelativeY(self)
Returns the relative mouse position (y coordinate) when the click took place.
source code
 
isAltKey(self)
Checks if the Alt key was down when the mouse event took place.
source code
 
isCtrlKey(self)
Checks if the Ctrl key was down when the mouse event took place.
source code
 
isMetaKey(self)
Checks if the Meta key was down when the mouse event took place.
source code
 
isShiftKey(self)
Checks if the Shift key was down when the mouse event took place.
source code

Inherited from component.Event: getComponent

Inherited from util.EventObject: getSource

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, source, details=None)
(Constructor)

source code 

New instance with mouse details

Parameters:
  • source - The source where the click took place
  • details - Details about the mouse click
Overrides: object.__init__

getButton(self)

source code 

Gets the Button where the event occurred.

Returns:
the Source of the event.

getClientX(self)

source code 

Returns the mouse position (x coordinate) when the click took place. The position is relative to the browser client area.

Returns:
The mouse cursor x position or -1 if unknown

getClientY(self)

source code 

Returns the mouse position (y coordinate) when the click took place. The position is relative to the browser client area.

Returns:
The mouse cursor y position or -1 if unknown

getRelativeX(self)

source code 

Returns the relative mouse position (x coordinate) when the click took place. The position is relative to the clicked component.

Returns:
The mouse cursor x position relative to the clicked layout component or -1 if no x coordinate available

getRelativeY(self)

source code 

Returns the relative mouse position (y coordinate) when the click took place. The position is relative to the clicked component.

Returns:
The mouse cursor y position relative to the clicked layout component or -1 if no y coordinate available

isAltKey(self)

source code 

Checks if the Alt key was down when the mouse event took place.

Returns:
true if Alt was down when the event occured, false otherwise or if unknown

isCtrlKey(self)

source code 

Checks if the Ctrl key was down when the mouse event took place.

Returns:
true if Ctrl was pressed when the event occured, false otherwise or if unknown

isMetaKey(self)

source code 

Checks if the Meta key was down when the mouse event took place.

Returns:
true if Meta was pressed when the event occurred, false otherwise or if unknown

isShiftKey(self)

source code 

Checks if the Shift key was down when the mouse event took place.

Returns:
true if Shift was pressed when the event occurred, false otherwise or if unknown