<html> <head> <title>Interface XAcceleratorConfiguration</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="XAcceleratorConfiguration-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">Attributes' Summary</td> <td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></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">ui</a> :: </p> </td> </tr> <tr> <td class="title"><table class="title-table" width="99%"> <tr> <td width="25%" class="title2">unpublished </td> <td width="50%" class="title">interface XAcceleratorConfiguration</td> <td width="*"/></tr> </table> </td> </tr> <tr> <td><dl> <dt><b>Base Interfaces</b></dt> <dd><pre style="font-family:monospace;"><strong>XAcceleratorConfiguration</strong> ┣ <a href="XUIConfigurationPersistence.html">XUIConfigurationPersistence</a> ┣ <a href="XUIConfigurationStorage.html">XUIConfigurationStorage</a> ┗ <a href="XUIConfiguration.html">XUIConfiguration</a> </pre></dd> <dd><a name/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="crosstitle"> <tr> <td class="imsum_left"><a href="XUIConfigurationPersistence.html">XUIConfigurationPersistence</a></td> <td class="imsum_right"><dl> <dt><b>Description</b></dt> <dd>specifies a persistence interface which supports to load/store accelerator configuration data to a storage and to retrieve information about the current state. </dd> </dl> </td> </tr> <tr> <td class="imsum_left"><a href="XUIConfigurationStorage.html">XUIConfigurationStorage</a></td> <td class="imsum_right"><dl> <dt><b>Description</b></dt> <dd>connects this configuration to a new storage which must be used further on subsequent calls of com::sun::star::util::::XConfigurationPersistence.load() and com::sun::star::util::::XConfigurationPersistence.store(). </dd> </dl> </td> </tr> <tr> <td class="imsum_left"><a href="XUIConfiguration.html">XUIConfiguration</a></td> <td class="imsum_right"><dl> <dt><b>Description</b></dt> <dd>supports to notify other implementations about changes of this accelerator configuration. </dd> </dl> </td> </tr> </table> </dd> </dl> </td> </tr> <tr> <td><dl> <dt><b>Usage Restrictions</b></dt> <dd><i>not published</i></dd> <dt><b>Description</b></dt> <dd>provides read/write access to an accelerator configuration set. </dd> <dd><p> Such configuration set base on:<br> <ul> <li>Key events structure</li> <li>and Commands, which are represented as URLs; describing a function, which and can be executed using the dispatch API.</li> </ul> </p> <p> Note further:<br> All changes you made on this configration access modify the the configuration set inside memory only. You have to use the ::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XFlushable.html">XFlushable</a> interface (which must be available at the same implementation object too), to make it persistent. </p> </dd> <dt><b>Since </b></dt> <dd>OpenOffice 2.0</dd> <dt><b>See also</b></dt> <dd><a href="XAcceleratorConfiguration.html#AcceleratorConfiguration">AcceleratorConfiguration</a>, dom::sun::star::util::XFlushable</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="#getAllKeyEvents">getAllKeyEvents</a></td> <td class="imsum_right">return the list of all key events, which are available at this configration set. </td> </tr> <tr> <td class="imsum_left"><a href="#getCommandByKeyEvent">getCommandByKeyEvent</a></td> <td class="imsum_right">return the registered command for the specified key event. </td> </tr> <tr> <td class="imsum_left"><a href="#setKeyEvent">setKeyEvent</a></td> <td class="imsum_right">modify or create a key - command - binding. </td> </tr> <tr> <td class="imsum_left"><a href="#removeKeyEvent">removeKeyEvent</a></td> <td class="imsum_right">remove a key-command-binding from this configuration set. </td> </tr> <tr> <td class="imsum_left"><a href="#getKeyEventsByCommand">getKeyEventsByCommand</a></td> <td class="imsum_right">optimized access to the relation "command-key" instead of "key-command" which is provided normaly by this interface. </td> </tr> <tr> <td class="imsum_left"><a href="#getPreferredKeyEventsForCommandList">getPreferredKeyEventsForCommandList</a></td> <td class="imsum_right">optimized function to map a list of commands to a corresponding list of key events. </td> </tr> <tr> <td class="imsum_left"><a href="#removeCommandFromAllKeyEvents">removeCommandFromAllKeyEvents</a></td> <td class="imsum_right">search for an key-command-binding inside this configuration set, where the specified command is used. </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="getAllKeyEvents" class="membertitle">getAllKeyEvents</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< ::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/KeyEvent.html">KeyEvent</a> ></td> </tr> <tr> <td valign="top"><b>getAllKeyEvents</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>return the list of all key events, which are available at this configration set. </dd> <dd><p> The key events are the "primary keys" of this configuration sets. Means: Commands are registerd for key events. </p> <p> Such key event can be mapped to its bound command, using the method getCommandForKeyEvent(). </p> </dd> <dt><b>Returns</b></dt> <dd>A list of key events. </dd> <dt><b>See also</b></dt> <dd><a href="#getCommandForKeyEvent().">getCommandForKeyEvent().</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getCommandByKeyEvent" class="membertitle">getCommandByKeyEvent</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">string</td> </tr> <tr> <td valign="top"><b>getCommandByKeyEvent</b>(</td> <td valign="top">[in] ::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/KeyEvent.html">KeyEvent</a></td> <td valign="bottom"> aKeyEvent )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/NoSuchElementException.html">NoSuchElementException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>return the registered command for the specified key event. </dd> <dd><p> This function can be used to:<br> <ul> <li>by a generic service, which can execute commands if a keyboard event occures.</li> <li>or to iterate over the whole container and change some accelerator bindings.</li> </ul> </p> </dd> <dt><b>Parameter aKeyEvent</b></dt> <dd>the key event, where the registered command is searched for. </dd> <dt><b>Returns</b></dt> <dd>The registered command for the specified key event. </dd> <dt><b>Throws</b></dt> <dd>::com::sun::star::container::NoSuchElementException if the key event is an invalid one or does not exists inside this configuration set. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="setKeyEvent" class="membertitle">setKeyEvent</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>setKeyEvent</b>(</td> <td valign="top">[in] ::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/KeyEvent.html">KeyEvent</a></td> <td valign="bottom"> aKeyEvent,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> sCommand )</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>modify or create a key - command - binding. </dd> <dd><p> If the specified key event does not already exists inside this configuration access, it will be created and the command will be registered for it. </p> <p> If the specified key event already exists, its command will be overwritten with the new command. There is no warning nor any error about that! The outside code has to use the method getCommandForKeyEvent() to check for possible collisions. </p> <p> Note: This method cant be used to remove entities from the configuration set. Empty parameters will result into an exception! Use the method removeKeyEvent() instead. </p> </dd> <dt><b>Parameter aKeyEvent</b></dt> <dd>specify the key event, which must be updated or new created. </dd> <dt><b>Parameter sCommand</b></dt> <dd>the new command for the specified key event. </dd> <dt><b>Throws</b></dt> <dd>::com::sun::star::lang::IllegalArgumentException if the key event isnt a valid one. Commands can be checked only, if they are empty. Because every URL schema can be used by commands in general, so its not possible to validate it. </dd> <dt><b>See also</b></dt> <dd><a href="#removeKeyEvent()">removeKeyEvent()</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="removeKeyEvent" class="membertitle">removeKeyEvent</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>removeKeyEvent</b>(</td> <td valign="top">[in] ::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/KeyEvent.html">KeyEvent</a></td> <td valign="bottom"> aKeyEvent )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/NoSuchElementException.html">NoSuchElementException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>remove a key-command-binding from this configuration set. </dd> <dt><b>Parameter aKeyEvent</b></dt> <dd>the key event, which should be removed. </dd> <dt><b>Throws</b></dt> <dd>::com::sun::star::container::NoSuchElementException if the key event does not exists inside this configuration set. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getKeyEventsByCommand" class="membertitle">getKeyEventsByCommand</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< ::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/KeyEvent.html">KeyEvent</a> ></td> </tr> <tr> <td valign="top"><b>getKeyEventsByCommand</b>(</td> <td valign="top">[in] string</td> <td valign="bottom"> sCommand )</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="../container/module-ix.html">container</a>::<a href="../container/NoSuchElementException.html">NoSuchElementException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>optimized access to the relation "command-key" instead of "key-command" which is provided normaly by this interface. </dd> <dd><p> It can be used to implement collision handling, if more then one key event match to the same command. The returned list contains all possible key events - and the outside code can select an possible one. Of course - mostly this list will contain only one key event ... </p> </dd> <dt><b>Parameter sCommand</b></dt> <dd>the command, where key bindings are searched for. </dd> <dt><b>Returns</b></dt> <dd>A list of ::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/KeyEvent.html">KeyEvent</a> structures, where the pecified command is registered for. </dd> <dt><b>Throws</b></dt> <dd>::com::sun::star::lang::IllegalArgumentException if the specified command is empty. It cant be checked, if a command is valid - because every URL schema can be used here. </dd> <dt><b>Throws</b></dt> <dd>::com::sun::star::container::NoSuchElementException if the specified command isnt empty but does not occure inside this configuration set. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getPreferredKeyEventsForCommandList" class="membertitle">getPreferredKeyEventsForCommandList</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< any ></td> </tr> <tr> <td valign="top"><b>getPreferredKeyEventsForCommandList</b>(</td> <td valign="top">[in] sequence< string ></td> <td valign="bottom"> lCommandList )</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>optimized function to map a list of commands to a corresponding list of key events. </dd> <dd><p> It provides a fast mapping, which is e.g. needed by a menu or toolbar implementation. E.g. a sub menu is described by a list of commands - and the implementation of the menu must show the corresponding shortcuts. Iteration over all items of this configuration set can be very expensive. </p> <p> Instead to the method getKeyEventsForCommand() the returned list contains only one(!) key event bound to one(!) requested command. If more then one key event is bound to a command - a selection is done inside this method. This internal selection cant be influenced from outside. </p> @attention Because its not defined, that any command (e.g. configured inside a menu) must have an accelerator - we cant reject the call if at least one command does not occure inside this configuration set ... We handle it more gracefully - and return an empty item instead of throwing and exception. </dd> <dt><b>Parameter lCommandList</b></dt> <dd>a list of commands </dd> <dt><b>Returns</b></dt> <dd>A (non packed!) list of key events, where every item match by index directly to a command of the specified <var>CommandList</var>. If a command does not exists inside this configuration set, the corresponding any value will be empty. </dd> <dt><b>Throws</b></dt> <dd>::com::sun::star::lang::IllegalArgumentException if at least one of the specified commands is empty. It cant be checked, if a command is valid - because every URL schema can be used here. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="removeCommandFromAllKeyEvents" class="membertitle">removeCommandFromAllKeyEvents</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>removeCommandFromAllKeyEvents</b>(</td> <td valign="top">[in] string</td> <td valign="bottom"> sCommand )</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="../container/module-ix.html">container</a>::<a href="../container/NoSuchElementException.html">NoSuchElementException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>search for an key-command-binding inside this configuration set, where the specified command is used. </dd> <dd><p> If such binding could be located, the command will be removed from it. If as result of that the key binding will be empty, if will be removed too. </p> <p> This is an optimized method, which can perform removing of commands from this configuration set. Because normaly Commands are "foreign keys" and key identifier the "primary keys" - it needs some work to remove all commands outside this container ... </p> </dd> <dt><b>Parameter sCommand</b></dt> <dd>the command, which should be removed from any key binding. </dd> <dt><b>Throws</b></dt> <dd>::com::sun::star::lang::IllegalArgumentException if the specified command is empty. </dd> <dt><b>Throws</b></dt> <dd>::com::sun::star::container::NoSuchElementException if the specified command isnt used inside this configuration set. </dd> </dl> </td> </tr> </table> </td> </tr> </table> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p> </div> <!-- id="adc-idlref" --> </body> </html>