Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: awt ::

deprecated interface XExtendedToolkit
Usage Restrictions
deprecated
Deprecation Info
This interface was only implemented in an intermediate developer release anyway.
Description
The XExtendedToolkit is an extension of the XToolkit interface. It basically provides access to three event broadcasters which are used for instance in the context of accessibility. It is, however, not restricted to accessibility.

The first event broadcaster lets you keep track of the open top-level windows (frames). To get the set of currently open top-level window use the getTopWindowCount and getTopWindow methods.

The second event broadcaster informs its listeners of key events. Its listeners can, unlike with most other broadcasters/listeners, consume events, so that other listeners will not be called for consumed events.

The last event broadcaster sends events on focus changes of all elements that can have the input focus.

Since
OOo 1.1.2

Methods' Summary
getTopWindowCount This function returns the number of currently existing top-level windows.  
getTopWindow Return a reference to the specified top-level window. Note that the number of top-level windows may change between a call to getTopWindowCount() and successive calls to this function.  
getActiveTopWindow Return the currently active top-level window, i.e. which has currently the input focus.  
addTopWindowListener Add a new listener that is called for events that involve XTopWindows. After having obtained the current list of exisiting top-level windows you can keep this list up-to-date by listening to opened or closed top-level windows. Wait for activations or deactivations of top-level windows to keep track of the currently active frame.  
removeTopWindowListener Remove the specified listener from the list of listeners.  
addKeyHandler Add a new listener that is called on KeyEvents. Every listener is given the opportunity to consume the event, i.e. prevent the not yet called listeners from being called.  
removeKeyHandler Remove the specified listener from the list of listeners.  
addFocusListener Add a new listener that is called on FocusEvents. Use this focus broadcaster to keep track of the object that currently has the input focus.  
removeFocusListener Remove the specified listener from the list of listeners.  
fireFocusGained Broadcasts the a focusGained on all registered focus listeners  
fireFocusLost Broadcasts the a focusGained on all registered focus listeners  
Methods' Details
getTopWindowCount
long
getTopWindowCount();

Description
This function returns the number of currently existing top-level windows.
Returns
Returns the number of top-level windows. This includes all top-level windows, regardless of whether they are iconized, visible, or active.
getTopWindow
XTopWindow
getTopWindow( [in] long  nIndex )
raises( ::com::sun::star::lang::IndexOutOfBoundsException );

Description
Return a reference to the specified top-level window. Note that the number of top-level windows may change between a call to getTopWindowCount() and successive calls to this function.
Parameter nIndex
The index should be in the intervall from 0 up to but not including the number of top-level windows as returned by getTopWindowCount().
Returns
The returned value is a valid reference to a top-level window.
Throws
IndexOutOfBoundsException when the specified index is outside the valid range.
getActiveTopWindow
XTopWindow
getActiveTopWindow();

Description
Return the currently active top-level window, i.e. which has currently the input focus.
Returns
The returned reference may be empty when no top-level window is active.
addTopWindowListener
[oneway] void
addTopWindowListener( [in] XTopWindowListener  xListener );

Description
Add a new listener that is called for events that involve XTopWindows. After having obtained the current list of exisiting top-level windows you can keep this list up-to-date by listening to opened or closed top-level windows. Wait for activations or deactivations of top-level windows to keep track of the currently active frame.
Parameter xListener
If this is a valid reference it is inserted into the list of listeners. It is the task of the caller to not register the same listener twice (otherwise that listener will be called twice.)
removeTopWindowListener
[oneway] void
removeTopWindowListener( [in] XTopWindowListener  xListener );

Description
Remove the specified listener from the list of listeners.
Parameter xListener
If the reference is empty then nothing will be changed. If the listener has been registered twice (or more) then all refrences will be removed.
addKeyHandler
[oneway] void
addKeyHandler( [in] XKeyHandler  xHandler );

Description
Add a new listener that is called on KeyEvents. Every listener is given the opportunity to consume the event, i.e. prevent the not yet called listeners from being called.
Parameter xHandler
If this is a valid reference it is inserted into the list of handlers. It is the task of the caller to not register the same handler twice (otherwise that listener will be called twice.)
removeKeyHandler
[oneway] void
removeKeyHandler( [in] XKeyHandler  xHandler );

Description
Remove the specified listener from the list of listeners.
Parameter xHandler
If the reference is empty then nothing will be changed. If the handler has been registered twice (or more) then all refrences will be removed.
addFocusListener
[oneway] void
addFocusListener( [in] XFocusListener  xListener );

Description
Add a new listener that is called on FocusEvents. Use this focus broadcaster to keep track of the object that currently has the input focus.
Parameter xListener
If this is a valid reference it is inserted into the list of listeners. It is the task of the caller to not register the same listener twice (otherwise that listener will be called twice.)
removeFocusListener
[oneway] void
removeFocusListener( [in] XFocusListener  xListener );

Description
Remove the specified listener from the list of listeners.
Parameter xListener
If the reference is empty then nothing will be changed. If the listener has been registered twice (or more) then all refrences will be removed.
fireFocusGained
[oneway] void
fireFocusGained( [in] ::com::sun::star::uno::XInterface  source );

Description
Broadcasts the a focusGained on all registered focus listeners
Parameter source
The object that has gained the input focus. It should implement ::com::sun::star::accessibility::XAccessible.
fireFocusLost
[oneway] void
fireFocusLost( [in] ::com::sun::star::uno::XInterface  source );

Description
Broadcasts the a focusGained on all registered focus listeners
Parameter source
The object that has lost the input focus. It should implement ::com::sun::star::accessibility::XAccessible.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.