Package pyj2d :: Module event :: Class JEvent

Class JEvent

object --+
         |
        JEvent

Instance Methods
 
__init__(self, event, eventType)
Event object wraps Java event.
 
__str__(self)
str(x)
 
__repr__(self)
repr(x)
 
__getattr__(self, attr)
 
__setattr__(self, attr, value)
x.__setattr__('name', value) <==> x.name = value
 
toString(self)
 
getEvent(self)
Return Java event.

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

Properties

Inherited from object: __class__

Method Details

__init__(self, event, eventType)
(Constructor)

 

Event object wraps Java event.

Event object attributes:

  • type: MOUSEBUTTONDOWN, MOUSEBUTTONUP, MOUSEMOTION, KEYDOWN, KEYUP
  • button: mouse button pressed (1-9)
  • buttons: mouse buttons pressed (1,2,3)
  • pos: mouse position (x,y)
  • rel: mouse relative position change (x,y)
  • key: keycode of key pressed (K_a-K_z...)
  • unicode: char pressed ('a'-'z'...)
  • mod: modifier pressed (KMOD_ALT | KMOD_CTRL | KMOD_SHIFT | KMOD_META)
  • loc: key location (KEY_LOCATION_LEFT | KEY_LOCATION_RIGHT)
Overrides: object.__init__

__str__(self)
(Informal representation operator)

 
str(x)
Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

 
repr(x)
Overrides: object.__repr__
(inherited documentation)

__setattr__(self, attr, value)

 
x.__setattr__('name', value) <==> x.name = value
Overrides: object.__setattr__
(inherited documentation)