Top   Module   Use   Manual   Index 
 EXPORTING SERVICES | METHODS' SUMMARY | METHODS' DETAILS 

com :: sun :: star :: script ::

interface XEventAttacherManager

Base Interface
com::sun::star::uno::XInterface

Description
registers listeners for specified events.


Known Services which Export this Interface

com::sun::star::form::FormComponents specifies the capabilities of a collection of FormComponents.
com::sun::star::form::component::GridControl This service specifies a ControlModel to represent data in a table.

Methods' Summary

registerScriptEvent registers one event for an object identified by its index.
registerScriptEvents registers several events for an object identified by its index.
revokeScriptEvent revokes the registration of an event.
revokeScriptEvents revokes all events which are registered for the given index.
insertEntry creates an empty entry at the given position.
removeEntry removes the entry at the given position.
getScriptEvents @eturns all events registered for the given object index.
attach attaches all the ScriptEvent s which are registered for the given index to the given object.
detach detaches all the ScriptEvent s from the given object which are registered at this object for the given index.
addScriptListener adds an XScriptListener that will be notified when an event takes place. For that a ScriptEventDescriptor is registered at and attached to an object by an XEventAttacherManager .
removeScriptListener removes a XScriptListener from the listener list.

Methods' Details

registerScriptEvent
 
void
registerScriptEvent(
[ in ] long nIndex,
[ in ] com::sun::star::script::ScriptEventDescriptor aScriptEvent )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
registers one event for an object identified by its index.

If any object is attached under this index, then this event is attached automatically.

IntrospectionException and CannotCreateAdapterException are thrown by XEventAttacher and are caught and ignored.

registerScriptEvents
 
void
registerScriptEvents(
[ in ] long nIndex,
[ in ] sequence< com::sun::star::script::ScriptEventDescriptor > aScriptEvents )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
registers several events for an object identified by its index.

The result is the same as if the method were called once for each ScriptEventDescriptor in the sequence.

If any object is attached under this index, then this event is attached automatically. IntrospectionException and CannotCreateAdapterException from the XEventAttacher are caught and ignored.

revokeScriptEvent
 
void
revokeScriptEvent(
[ in ] long nIndex,
[ in ] string aListenerType,
[ in ] string aEventMethod,
[ in ] string aRemoveListenerParam )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
revokes the registration of an event.

The parameters ListenerType and EventMethod are equivalent to the first two members of the ScriptEventDescriptor used to register events. If this event at this index has been attached to any object, it is detached automatically.

The IntrospectionException and the CannotCreateAdapterException are thrown by the XEventAttacher and are caught and ignored.

revokeScriptEvents
 
void
revokeScriptEvents(
[ in ] long nIndex )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
revokes all events which are registered for the given index.

If the events at this index have been attached to any object, they are detached automatically.

insertEntry
 
void
insertEntry(
[ in ] long nIndex )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
creates an empty entry at the given position.

The index n of all entries with n &amp;gt;= nIndex will be increased by one.

removeEntry
 
void
removeEntry(
[ in ] long nIndex )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
removes the entry at the given position.

If any events are registered at this index, they will be revoked, too. So if the events at this index have been attached to any object they are detached automatically.

getScriptEvents
 
sequence< com::sun::star::script::ScriptEventDescriptor >
getScriptEvents(
[ in ] long Index )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
@eturns all events registered for the given object index.
Parameter Index
an index previously inserted with the method insertEntry.
Throws
IllegalArgumentException if Index is not valid.
attach
 
void
attach(
[ in ] long nIndex,
[ in ] com::sun::star::uno::XInterface xObject,
[ in ] any aHelper )
raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::ServiceNotRegisteredException );

Description
attaches all the ScriptEvent s which are registered for the given index to the given object.

IntrospectionException and CannotCreateAdapterException are thrown by the XEventAttacher and are caught and ignored.

detach
 
void
detach(
[ in ] long nIndex,
[ in ] com::sun::star::uno::XInterface xObject )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
detaches all the ScriptEvent s from the given object which are registered at this object for the given index.

IntrospectionException and "com::sun::star::script::CannotCreateAdapterException" from the XEventAttacher are caught and ignored.

addScriptListener
 
void
addScriptListener(
[ in ] com::sun::star::script::XScriptListener xListener )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
adds an XScriptListener that will be notified when an event takes place. For that a ScriptEventDescriptor is registered at and attached to an object by an XEventAttacherManager .
See also
removeScriptListener
removeScriptListener
 
void
removeScriptListener(
[ in ] com::sun::star::script::XScriptListener Listener )
raises ( com::sun::star::lang::IllegalArgumentException );

Description
removes a XScriptListener from the listener list.

Nothing happens if the listener is not registered.

See also
addScriptListener

Top of Page