<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">If you are interested. Here is documentation on the inner workings:<div><span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 11px; "><p style="font-size: 1em; margin-top: 1em; margin-bottom: 1em; ">The ActionFactory is responsible for creating CWActions and making them available to the program. Each Action is constructed from resources of the form: ActionName.field=value where ActionName is the ACTION_COMMAND_KEY value and field is one of the CWAction constants, e.g. LargeIcon.&nbsp;<br>Field is one of:</p><ul style="font-size: 1em; margin-top: 0px; margin-bottom: 1em; "><li style="font-size: 1em; margin-top: 0px; margin-bottom: 0px; ">Name - This is required. The value is used for the text of the Action.</li><li style="font-size: 1em; margin-top: 0px; margin-bottom: 0px; ">Mnemonic - An upper case letter or other character in the value of the Name field. If found, using a case insensitive search, the mnemonic will cause the corresponding character to be underlined. In a platform dependent way it provides a keyboard mechanism to fire the action. For example, on Windows, alt + mnemonic will cause a visible, active element with that mnemonic to fire. For this reason, it is important to ensure that two visible, active elements do not have the same mnemonic.<br>Note: Mnemonics are suppressed on MacOSX.</li><li style="font-size: 1em; margin-top: 0px; margin-bottom: 0px; ">ToolTip - A tip to show when the mouse is over an element. If not present, Name is used. This is likely to change. It is redundant to show a tooltip that is identical to the shown text.</li><li style="font-size: 1em; margin-top: 0px; margin-bottom: 0px; ">SmallIcon - A 16x16 pixel image to be shown for the item. The value for this is a path which can be found as a resource.<br>Note: the small icon will be used when actions are tied to menu items and buttons.</li><li style="font-size: 1em; margin-top: 0px; margin-bottom: 0px; ">LargeIcon - A 24x24 pixel image to be shown for the item when large items are shown. Currently, these are only used for the ToolBar, when a large toolbar is requested. The value is a resource path to the image.</li><li style="font-size: 1em; margin-top: 0px; margin-bottom: 0px; ">AcceleratorKey - A key on the keyboard, which may be specified with 0x25 kind of notation.<br><br>Accelerators are global key combinations that work within an application to fire the action. When the action is shown as a menu item the accelerator will be listed with the name. Note: The accelerator key and it's modifiers are converted into a&nbsp;<code>KeyStroke</code>&nbsp;with&nbsp;<code>KeyStroke.getKeyStroke(key, modifierMask);</code></li><li style="font-size: 1em; margin-top: 0px; margin-bottom: 0px; ">AcceleratorKey.Modifier - A comma separated list of ctrl, alt, and shift, indicating what modifiers are necessary for the accelerator.<br>Note: ctrl will use a platform's command key. On MacOSX this is the Apple/Command key. Other platforms use Ctrl.</li><li style="font-size: 1em; margin-top: 0px; margin-bottom: 0px; ">Enabled - Defaults to true when not present. It is disabled when the value does not match "true" regardless of case. This is used to initialize widgets tied to actions to disabled. Once the action is created, it's state can be changed and the tied widgets will behave appropriately.</li></ul><p style="font-size: 1em; margin-top: 1em; margin-bottom: 1em; ">In order to facilitate easier translation, Enabled, SmallIcon and LargeIcon can be specified in a parallel resource, whose name is suffixed with "_control" as in Desktop_control. This is meant to extrapolate the constant behavior of an action into a file that probably does not need to be internationalized. If it does, for example, to suppress the display of icons, then one would create a resource further suffixed with the language and perhaps country, as in Desktop_control_fa.</p><p style="font-size: 1em; margin-top: 1em; margin-bottom: 1em; ">To add another twist, several actions may have the same name and mnemonic, differing perhaps by tooltip. To facilitate the sharing of these definitions, an Aliases resource is defined to contain common values. If the value of a ActionName.Name is prefixed with "Alias.", as in Go.Name=Alias.Go, then Go will be used as the ActionName to look up values in the Aliases resource.</p><p style="font-size: 1em; margin-top: 1em; margin-bottom: 1em; ">Aliases defines defaults that can be overridden by the referring resource file. The only value that cannot be overridden is Name.</p><p style="font-size: 1em; margin-top: 1em; margin-bottom: 1em; ">When an action is fired, this class, as a listener, reflects the action on the class providing the resource. For example, DesktopActions creates an ActionFactory from the Desktop ResourceBundle. When the Exit action is fired, ActionFactory calls DesktopActions.doExit(ActionEvent event) or DesktopActions.doExit(), if the first did not exist.</p><p style="font-size: 1em; margin-top: 1em; margin-bottom: 1em; "><br class="webkit-block-placeholder"></p></span><div><div>On Feb 16, 2008, at 9:23 PM, DM Smith wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I've implemented this change. With one more addition: If a ToolTip is &nbsp;<br>not present, then the Name field is used. I know it is redundant and I &nbsp;<br>am thinking of suppressing tooltips when the tooltip is the same as &nbsp;<br>the name.<br><br>On Feb 16, 2008, at 7:22 PM, DM Smith wrote:<br><br><blockquote type="cite">While working on aliases as a way of simplifying translations of<br></blockquote><blockquote type="cite">action property files, I thought I'd look to see how ShortDescription<br></blockquote><blockquote type="cite">and LongDescription are used by BibleDesktop.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">LongDescription is only used in one place: When hovering over a menu<br></blockquote><blockquote type="cite">entry, the long description is shown in the status bar.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">ShortDescription is used for tool tips and for the text of tool bar<br></blockquote><blockquote type="cite">buttons.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(The reason it is use instead of the Name for the tool bar buttons is<br></blockquote><blockquote type="cite">that some Names end with "...". I'm changing it from ShortDescription<br></blockquote><blockquote type="cite">to Name).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When either only one of the descriptions is present, it is also used<br></blockquote><blockquote type="cite">for the other.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If neither is present, there is no ToolTip, but sometimes Bible<br></blockquote><blockquote type="cite">Desktop will show a small square with nothing in it. (I've seen this<br></blockquote><blockquote type="cite">regarding buttons in the Edit Sites screen).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'd like to hear your opinions on:<br></blockquote><blockquote type="cite">Changing the code to ignore LongDescription and use ShortDescription.<br></blockquote><blockquote type="cite">Renaming ShortDescription to ToolTip. (I think this would make it much<br></blockquote><blockquote type="cite">clearer)<br></blockquote><blockquote type="cite">Use Name for ToolTip when it would be otherwise identical.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'll be glad to do the rename. I'll also volunteer to delete<br></blockquote><blockquote type="cite">LongDescription wherever it is identical to ShortDescription, but<br></blockquote><blockquote type="cite">leave it otherwise for you to delete.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Going forward, this should significantly reduce the translation &nbsp;<br></blockquote><blockquote type="cite">effort.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In Him,<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>DM<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">jsword-devel mailing list<br></blockquote><blockquote type="cite"><a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br></blockquote><blockquote type="cite"><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel">http://www..crosswire.org/mailman/listinfo/jsword-devel</a><br></blockquote><br><br><br>_______________________________________________<br>jsword-devel mailing list<br><a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>http://www.crosswire.org/mailman/listinfo/jsword-devel<br></blockquote></div><br></div></body></html>