The Lucy framework provides a support class, ALcyApplicationPaneTool, for add-ons that need to show a user interface panel in the Lucy application. It allows you to show and hide the user interface panel with a toggle action in the menu. The add-on only needs to define the content of the user interface panel. The ALcyApplicationPaneTool then inserts the toggle action into the menu bar to control the visibility of the panel, and adds the workspace support so that the visibility of the panel is saved in the workspace, and restored from it.


ALcyApplicationPaneTool offers support for exactly one application pane. If you need multiple application panes, you can create multiple instances of this support class. However, if you don’t know the number of application panes in advance — because the user can create new ones at will, for example — you cannot use this support class, because its plugInto method must be called when the add-on is plugged in.

When you are creating multiple instances of this support class, the long prefix used to configure each instance must be unique across the complete Lucy application. This means that you cannot use the ALcyTool.getLongPrefix method to generate the long prefix for this tool, because the long prefix generated by that method depends on the java package only. You can use ALcyTool.getLongPrefixWithClassName instead.

Furthermore, ALcyApplicationPaneTool does not provide a hook to save extra properties in the workspace. If you need to save extra properties, store them using an extra ALcyWorkspaceCodecDelegate. A simpler alternative is storing them using the workspace preferences of an TLcyPreferencesTool. For more information, see Working with the preferences tool.