Package AccessEngine :: Package AEEvent :: Module FocusChange :: Class FocusChange
[hide private]
[frames] | no frames]

Class FocusChange

source code

  object --+    
           |    
Base.AEEvent --+
               |
              FocusChange

Event that fires when the focused accessible changes.

This class registers its name and whether it should be monitored by default in an AEMonitor using the Base.registerEventType function when this module is first imported. The AEMonitor can use this information to build its menus.

Instance Methods [hide private]
 
__init__(self, por, gained, **kwargs)
Stores the AEPor for the focused object and the type of focus event.
source code
string
__str__(self)
Returns a human readable representation of this event including its name, its AEPor, and its type.
source code
AEPor
getFocusPOR(self)
Returns the AEPor for this focus event.
source code
dictionary
getDataForTask(self)
Fetches data out of this FocusChange for use by a AEScript.EventScript.onFocusChange.
source code
boolean
execute(self)
Contacts the AETierManager so it can manage the focus change event.
source code

Inherited from Base.AEEvent: getAppID, getLayer, getPOR, getPriority, getTimestamp, setLayer, setPriority

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Instance Variables [hide private]
boolean gained
Type of focus change: True if gained, False if lost

Inherited from Base.AEEvent: layer, por, priority

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, por, gained, **kwargs)
(Constructor)

source code 
Stores the AEPor for the focused object and the type of focus event.
Parameters:
  • por (AEPor) - Point-of-regard from the accessible that just got focus
  • gained (boolean) - Was focused gained or lost?
Overrides: Base.AEEvent.__init__

__str__(self)
(Informal representation operator)

source code 
Returns a human readable representation of this event including its name, its AEPor, and its type.
Returns: string
Information about this event
Overrides: Base.AEEvent.__str__

getFocusPOR(self)

source code 
Returns the AEPor for this focus event. Used by AETier to maintain a focus AEPor.
Returns: AEPor
Point-of-regard for this focus event

getDataForTask(self)

source code 
Fetches data out of this FocusChange for use by a AEScript.EventScript.onFocusChange.
Returns: dictionary
Dictionary of parameters to be passed to a AEScript.EventScript.onFocusChange as follows:
  • por: The AEPor of the accessible in which the focus change occured
  • type: Whether focus was gained (True) or lost (False)
Overrides: Base.AEEvent.getDataForTask

execute(self)

source code 
Contacts the AETierManager so it can manage the focus change event.
Returns: boolean
True if there is an active view, False if not to delay execution of this event until there is
Overrides: Base.AEEvent.execute