| java.lang.Object org.columba.mail.folderoptions.AbstractFolderOptionsPlugin
All known Subclasses: org.columba.mail.folderoptions.SortingOptionsPlugin, org.columba.mail.folderoptions.ColumnOptionsPlugin, org.columba.mail.folderoptions.ThreadedViewOptionsPlugin, org.columba.mail.folderoptions.SelectionOptionsPlugin,
AbstractFolderOptionsPlugin | abstract public class AbstractFolderOptionsPlugin implements IExtensionInterface(Code) | | AbstractMessageFolder options plugin abstract class.
Plugins implementing this abstract class can load/save their configuration
data. They don't need to take care if this data is applied globally or on a
per-folder basis.
The most interest methods which you need to implement are:
- createDefaultElement(boolean)
- loadOptionsFromXml(AbstractMessageFolder)
- saveOptionsToXml(AbstractMessageFolder)
Note, that every
MailFrameMediator keeps its own
FolderOptionsController , which makes sure that all plugins are
singletons.
author: fdietz |
AbstractFolderOptionsPlugin | public AbstractFolderOptionsPlugin(String name, String pluginId, MailFrameMediator mediator)(Code) | | Constructor
TODO (@author fdietz): pluginID is never used locally
Parameters: name - name of plugin Parameters: pluginId - id of plugin used by plugin handler Parameters: mediator - mail frame mediator |
createDefaultElement | public XmlElement createDefaultElement(boolean global)(Code) | | Create default node.
Overwrite this method to add plugin-specific information to the parent
node.
Parameters: global - true, if this is a global options. False, otherwise xml node |
getConfigNode | public XmlElement getConfigNode(IMailbox folder)(Code) | | Get configuration node.
Determine if this should be applied globally or on a per-folder basis.
This way, plugins don't have to know, if they work on global or local
options.
Example for the sorting plugin configuration node. This is how it can be
found in options.xml and tree.xml:
<sorting column="Date" order="true" />
Parameters: folder - currently selected folder xml node |
getName | public String getName()(Code) | | Get name of configuration node
config name |
loadOptionsFromXml | abstract public void loadOptionsFromXml(IMailbox folder)(Code) | | Load options of this plugin.
Parameters: folder - selected folder |
saveOptionsToXml | abstract public void saveOptionsToXml(IMailbox folder)(Code) | | Save configuration of this plugin.
Following a simple example of a toolbar configuration:
<toolbar enabled="true" show_icon="true" show_text="false">
<button name="Cut"/>
<button name="Copy"/>
<button name="Paste"/>
<button name="Delete"/>
</toolbar>
Parameters: folder - selected folder |
|
|