Overview | Module | Use | Devguide | Index

Methods' Summary | Methods' Details | Attributes' Summary | Attributes' Details

:: com :: sun :: star :: script ::
interface XEventAttacherManager
  Base Hierarchy
      ::com::sun::star::uno::XInterface
       |
       +-XEventAttacherManager
Description registers listeners for specified events.

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 [in] ScriptEventDescriptor raises( | nIndex, aScriptEvent ) ::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. Exceptions of type ::com::sun::star::beans::IntrospectionException and CannotCreateAdapterException that can be thrown by methods of XEventAttacher are caught and ignored.
registerScriptEvents
void registerScriptEvents( | [in] long [in] sequence< ScriptEventDescriptor > raises( | nIndex, aScriptEvents ) ::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 registerScriptEvent was called once for each ScriptEventDescriptor in the sequence. If any object is attached under this index, then this event is attached automatically (see attach ) Exceptions of type ::com::sun::star::beans::IntrospectionException and CannotCreateAdapterException that can be thrown by methods of XEventAttacher are caught and ignored. See also registerScriptEvent See also attach
revokeScriptEvent
void revokeScriptEvent( | [in] long [in] string [in] string [in] string raises( | nIndex, aListenerType, aEventMethod, aRemoveListenerParam ) ::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 (see attach ). Exceptions of type ::com::sun::star::beans::IntrospectionException and CannotCreateAdapterException that can be thrown by methods of XEventAttacher are caught and ignored. See also attach
revokeScriptEvents
void revokeScriptEvents( | [in] long raises( | nIndex ) ::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. (see attach ). See also attach
insertEntry
void insertEntry( | [in] long raises( | nIndex ) ::com::sun::star::lang::IllegalArgumentException );
Description creates an empty entry at the given position. The index n of all entries with`n &gt;= nIndex` will be increased by one.
removeEntry
void removeEntry( | [in] long raises( | nIndex ) ::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. (see attach ). See also attach
getScriptEvents
sequence< ScriptEventDescriptor > getScriptEvents( | [in] long raises( | Index ) ::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 [in] ::com::sun::star::uno::XInterface [in] any raises( | nIndex, xObject, aHelper ) ::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. Exceptions of type ::com::sun::star::beans::IntrospectionException and CannotCreateAdapterException that can be thrown by methods of XEventAttacher are caught and ignored.
detach
void detach( | [in] long [in] ::com::sun::star::uno::XInterface raises( | nIndex, xObject ) ::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. Exceptions of type ::com::sun::star::beans::IntrospectionException and CannotCreateAdapterException that can be thrown by methods of XEventAttacher are caught and ignored.
addScriptListener
void addScriptListener( | [in] XScriptListener raises( | xListener ) ::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 . It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. See also removeScriptListener
removeScriptListener
void removeScriptListener( | [in] XScriptListener raises( | Listener ) ::com::sun::star::lang::IllegalArgumentException );
Description removes a XScriptListener from the listener list. Nothing happens if the listener is not registered. It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. See also addScriptListener

Top of Page

Copyright © 2003 Sun Microsystems, Inc.