<html> <head> <title>Interface XEventAttacherManager</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../../idl.css"> </head> <body> <div id="adc-idlref"> <a name="_top_"> </a><table class="navimain" border="0" cellpadding="3"> <tr> <td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td> <td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td> <td class="navimain"><a href="XEventAttacherManager-xref.html" class="navimain">Use</a></td> <td class="navimainnone">Devguide</td> <td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td> </tr> </table> <table class="navisub" border="0" cellpadding="0"> <tr> <td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td> <td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td> <td class="navisub">Attributes' Summary</td> <td class="navisub">Attributes' Details</td> </tr> </table> <hr> <table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;"> <tr> <td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">script</a> :: </p> </td> </tr> <tr> <td class="title">interface XEventAttacherManager</td> </tr> <tr> <td/></tr> <tr> <td><dl> <dt><b>Description</b></dt> <dd>registers listeners for specified events. </dd> </dl> </td> </tr> </table> <hr> <a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Methods' Summary</td> </tr> <tr> <td class="imsum_left"><a href="#registerScriptEvent">registerScriptEvent</a></td> <td class="imsum_right">registers one event for an object identified by its index. </td> </tr> <tr> <td class="imsum_left"><a href="#registerScriptEvents">registerScriptEvents</a></td> <td class="imsum_right">registers several events for an object identified by its index. </td> </tr> <tr> <td class="imsum_left"><a href="#revokeScriptEvent">revokeScriptEvent</a></td> <td class="imsum_right">revokes the registration of an event. </td> </tr> <tr> <td class="imsum_left"><a href="#revokeScriptEvents">revokeScriptEvents</a></td> <td class="imsum_right">revokes all events which are registered for the given index. </td> </tr> <tr> <td class="imsum_left"><a href="#insertEntry">insertEntry</a></td> <td class="imsum_right">creates an empty entry at the given position. </td> </tr> <tr> <td class="imsum_left"><a href="#removeEntry">removeEntry</a></td> <td class="imsum_right">removes the entry at the given position. </td> </tr> <tr> <td class="imsum_left"><a href="#getScriptEvents">getScriptEvents</a></td> <td class="imsum_right">@eturns all events registered for the given object index. </td> </tr> <tr> <td class="imsum_left"><a href="#attach">attach</a></td> <td class="imsum_right">attaches all the <a href="ScriptEvent.html">ScriptEvent</a>s which are registered for the given index to the given object. </td> </tr> <tr> <td class="imsum_left"><a href="#detach">detach</a></td> <td class="imsum_right">detaches all the <a href="ScriptEvent.html">ScriptEvent</a>s from the given object which are registered at this object for the given index. </td> </tr> <tr> <td class="imsum_left"><a href="#addScriptListener">addScriptListener</a></td> <td class="imsum_right">adds an <a href="XScriptListener.html">XScriptListener</a> that will be notified when an event takes place. For that a <a href="ScriptEventDescriptor.html">ScriptEventDescriptor</a> is registered at and attached to an object by an <a href="XEventAttacherManager.html">XEventAttacherManager</a>. </td> </tr> <tr> <td class="imsum_left"><a href="#removeScriptListener">removeScriptListener</a></td> <td class="imsum_right">removes a <a href="XScriptListener.html">XScriptListener</a> from the listener list. </td> </tr> </table> <a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle">Methods' Details</td> </tr> <tr> <td class="imdetail"><a name="registerScriptEvent" class="membertitle">registerScriptEvent</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>registerScriptEvent</b>(</td> <td valign="top">[in] long</td> <td valign="bottom"> nIndex,</td> </tr> <tr> <td/><td valign="top">[in] <a href="ScriptEventDescriptor.html">ScriptEventDescriptor</a></td> <td valign="bottom"> aScriptEvent )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>registers one event for an object identified by its index. </dd> <dd><p>If any object is attached under this index, then this event is attached automatically.</p> <p>Exceptions of type ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/IntrospectionException.html">IntrospectionException</a> and <a href="CannotCreateAdapterException.html">CannotCreateAdapterException</a> that can be thrown by methods of <a href="XEventAttacher.html">XEventAttacher</a> are caught and ignored.</p> </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="registerScriptEvents" class="membertitle">registerScriptEvents</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>registerScriptEvents</b>(</td> <td valign="top">[in] long</td> <td valign="bottom"> nIndex,</td> </tr> <tr> <td/><td valign="top">[in] sequence< <a href="ScriptEventDescriptor.html">ScriptEventDescriptor</a> ></td> <td valign="bottom"> aScriptEvents )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>registers several events for an object identified by its index. </dd> <dd><p>The result is the same as if the method <a href="#registerScriptEvent">registerScriptEvent</a> was called once for each <a href="ScriptEventDescriptor.html">ScriptEventDescriptor</a> in the sequence.</p> <p>If any object is attached under this index, then this event is attached automatically (see <a href="#attach">attach</a>)</p> <p>Exceptions of type ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/IntrospectionException.html">IntrospectionException</a> and <a href="CannotCreateAdapterException.html">CannotCreateAdapterException</a> that can be thrown by methods of <a href="XEventAttacher.html">XEventAttacher</a> are caught and ignored.</p> </dd> <dt><b>See also</b></dt> <dd><a href="#registerScriptEvent">registerScriptEvent</a>, <a href="#attach">attach</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="revokeScriptEvent" class="membertitle">revokeScriptEvent</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>revokeScriptEvent</b>(</td> <td valign="top">[in] long</td> <td valign="bottom"> nIndex,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> aListenerType,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> aEventMethod,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> aRemoveListenerParam )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>revokes the registration of an event. </dd> <dd><p>The parameters <var>ListenerType</var> and <var>EventMethod</var> are equivalent to the first two members of the <a href="ScriptEventDescriptor.html">ScriptEventDescriptor</a> used to register events. If this event at this index has been attached to any object, it is detached automatically (see <a href="#attach">attach</a>).</p> <p>Exceptions of type ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/IntrospectionException.html">IntrospectionException</a> and <a href="CannotCreateAdapterException.html">CannotCreateAdapterException</a> that can be thrown by methods of <a href="XEventAttacher.html">XEventAttacher</a> are caught and ignored.</p> </dd> <dt><b>See also</b></dt> <dd><a href="#attach">attach</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="revokeScriptEvents" class="membertitle">revokeScriptEvents</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>revokeScriptEvents</b>(</td> <td valign="top">[in] long</td> <td valign="bottom"> nIndex )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>revokes all events which are registered for the given index. </dd> <dd><p>If the events at this index have been attached to any object, they are detached automatically. (see <a href="#attach">attach</a>).</p> </dd> <dt><b>See also</b></dt> <dd><a href="#attach">attach</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="insertEntry" class="membertitle">insertEntry</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>insertEntry</b>(</td> <td valign="top">[in] long</td> <td valign="bottom"> nIndex )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>creates an empty entry at the given position. </dd> <dd><p>The index <var>n</var> of all entries with <code>n &gt;= nIndex</code> will be increased by one.</p> </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="removeEntry" class="membertitle">removeEntry</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>removeEntry</b>(</td> <td valign="top">[in] long</td> <td valign="bottom"> nIndex )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>removes the entry at the given position. </dd> <dd><p>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 <a href="#attach">attach</a>).</p> </dd> <dt><b>See also</b></dt> <dd><a href="#attach">attach</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getScriptEvents" class="membertitle">getScriptEvents</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< <a href="ScriptEventDescriptor.html">ScriptEventDescriptor</a> ></td> </tr> <tr> <td valign="top"><b>getScriptEvents</b>(</td> <td valign="top">[in] long</td> <td valign="bottom"> Index )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>@eturns all events registered for the given object index. </dd> <dt><b>Parameter Index</b></dt> <dd>an index previously inserted with the method insertEntry. </dd> <dt><b>Throws</b></dt> <dd>IllegalArgumentException if Index is not valid. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="attach" class="membertitle">attach</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>attach</b>(</td> <td valign="top">[in] long</td> <td valign="bottom"> nIndex,</td> </tr> <tr> <td/><td valign="top">[in] ::com::sun::star::<a href="../uno/module-ix.html">uno</a>::<a href="../uno/XInterface.html">XInterface</a></td> <td valign="bottom"> xObject,</td> </tr> <tr> <td/><td valign="top">[in] any</td> <td valign="bottom"> aHelper )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a>,<br> ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/ServiceNotRegisteredException.html">ServiceNotRegisteredException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>attaches all the <a href="ScriptEvent.html">ScriptEvent</a>s which are registered for the given index to the given object. </dd> <dd><p>Exceptions of type ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/IntrospectionException.html">IntrospectionException</a> and <a href="CannotCreateAdapterException.html">CannotCreateAdapterException</a> that can be thrown by methods of <a href="XEventAttacher.html">XEventAttacher</a> are caught and ignored.</p> </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="detach" class="membertitle">detach</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>detach</b>(</td> <td valign="top">[in] long</td> <td valign="bottom"> nIndex,</td> </tr> <tr> <td/><td valign="top">[in] ::com::sun::star::<a href="../uno/module-ix.html">uno</a>::<a href="../uno/XInterface.html">XInterface</a></td> <td valign="bottom"> xObject )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>detaches all the <a href="ScriptEvent.html">ScriptEvent</a>s from the given object which are registered at this object for the given index. </dd> <dd><p>Exceptions of type ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/IntrospectionException.html">IntrospectionException</a> and <a href="CannotCreateAdapterException.html">CannotCreateAdapterException</a> that can be thrown by methods of <a href="XEventAttacher.html">XEventAttacher</a> are caught and ignored.</p> </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="addScriptListener" class="membertitle">addScriptListener</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>addScriptListener</b>(</td> <td valign="top">[in] <a href="XScriptListener.html">XScriptListener</a></td> <td valign="bottom"> xListener )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>adds an <a href="XScriptListener.html">XScriptListener</a> that will be notified when an event takes place. For that a <a href="ScriptEventDescriptor.html">ScriptEventDescriptor</a> is registered at and attached to an object by an <a href="XEventAttacherManager.html">XEventAttacherManager</a>. </dd> <dd><p>It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. </dd> <dt><b>See also</b></dt> <dd><a href="#removeScriptListener">removeScriptListener</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="removeScriptListener" class="membertitle">removeScriptListener</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>removeScriptListener</b>(</td> <td valign="top">[in] <a href="XScriptListener.html">XScriptListener</a></td> <td valign="bottom"> Listener )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>removes a <a href="XScriptListener.html">XScriptListener</a> from the listener list. </dd> <dd><p>Nothing happens if the listener is not registered. <p>It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed. </dd> <dt><b>See also</b></dt> <dd><a href="#addScriptListener">addScriptListener</a></dd> </dl> </td> </tr> </table> </td> </tr> </table> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2008 Sun Microsystems, Inc.</p> </div> <!-- id="adc-idlref" --> </body> </html>