public class PluginsMenuFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected GUIApplication |
app
The GUIApplication.
|
protected java.util.Map<java.lang.String,java.lang.Boolean> |
enabledPlugins |
protected PluginMenuHandler |
handler
The Plugins MenuHandler.
|
protected MDIAbout |
mdiAbout
The About component.
|
protected java.util.List<PluginsManager.PluginPeer> |
pluginsClazz
The Plugins peers.
|
protected java.util.Map<java.lang.String,PluginsManager.PluginPeer> |
pluginsList
The list of Plugin peers.
|
protected javax.swing.table.DefaultTableModel |
pluginsTableModel |
protected java.util.List<MDIPlugin<?>> |
pluginsVector
The list of Plugins.
|
protected MDISettings |
settingsAction
The settings component.
|
Constructor and Description |
---|
PluginsMenuFactory(GUIApplication app)
Create the factory.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.AbstractAction |
getAboutPluginsAction()
Return the About action for Plugins.
|
Plugin |
getCompatiblePlugin(java.lang.String menuKey,
MetaData meta)
Return the first Plugin compatible with some MetaData, for the selected menu Key.
|
java.util.List<java.lang.Object> |
getDynamicPluginsMenuItems(SwingFileProperties properties,
java.lang.String menuKey)
Return the plugins items that must appear under a dynamic menu, for the selected menu Key.
|
java.util.List<java.lang.Object> |
getPluginObjectsForKey(java.lang.String key)
Return a specific object associated with plugins.
|
javax.swing.JComponent |
getPluginsAboutPane()
Return the Plugins About pane.
|
java.util.List<javax.swing.AbstractButton> |
getPluginsToolBarButtons()
Return the list of Plugins toolbar buttons.
|
void |
registerMenus(java.util.Map<java.lang.String,javax.swing.JMenu> staticMenus)
Register the main application menu, and the plugins menu.
|
void |
registerPlugins(PluginsManager manager)
Register the list of Plugins.
|
void |
setMDIAbout(MDIAbout mdiAbout)
Set the about component for using the plugins about list.
|
void |
setMDISettings(MDISettings mdiSettings)
Set the settings component to use for plugins Settings.
|
void |
setPluginSettings(PluginsManager.PluginPeer pluginPeer)
Add nodes for the selected plugin to the Settings node.
|
void |
setPluginStaticMenu(javax.swing.JMenu menu,
java.lang.String menuKey,
PluginsManager.PluginPeer pluginPeer)
Add to a general menu the selected plugin static menu, for the selected menu key.
|
void |
setSettingsAction(MDISettings mdiSettings)
Deprecated.
|
void |
updateMenus(MDIPlugin plugin)
This method is used to tell to the Plugin that its menus may been modified.Do nothing by default.
|
protected java.util.Map<java.lang.String,PluginsManager.PluginPeer> pluginsList
protected java.util.List<MDIPlugin<?>> pluginsVector
protected javax.swing.table.DefaultTableModel pluginsTableModel
protected java.util.List<PluginsManager.PluginPeer> pluginsClazz
protected java.util.Map<java.lang.String,java.lang.Boolean> enabledPlugins
protected GUIApplication app
protected PluginMenuHandler handler
protected MDISettings settingsAction
protected MDIAbout mdiAbout
public PluginsMenuFactory(GUIApplication app)
app
- the Applicationpublic void setMDISettings(MDISettings mdiSettings)
mdiSettings
- the settings componentpublic void setMDIAbout(MDIAbout mdiAbout)
mdiAbout
- the about componentpublic void setSettingsAction(MDISettings mdiSettings)
setMDISettings(org.mdi.bootstrap.swing.MDISettings)
mdiSettings
- the settings componentpublic void updateMenus(MDIPlugin plugin)
plugin
- the Plugin which is at the origin of the updatepublic void registerPlugins(PluginsManager manager)
PluginsManager.PluginPeer
manager
- the Plugins Managerpublic void registerMenus(java.util.Map<java.lang.String,javax.swing.JMenu> staticMenus)
staticMenus
- the static menus, as a Map mapping menu names to JMenuspublic javax.swing.AbstractAction getAboutPluginsAction()
public javax.swing.JComponent getPluginsAboutPane()
public java.util.List<javax.swing.AbstractButton> getPluginsToolBarButtons()
public void setPluginSettings(PluginsManager.PluginPeer pluginPeer)
pluginPeer
- the plugin peer, where to look for the qtatic menupublic void setPluginStaticMenu(javax.swing.JMenu menu, java.lang.String menuKey, PluginsManager.PluginPeer pluginPeer)
menu
- the menu where to add the plugin static menumenuKey
- the menu keypluginPeer
- the plugin peer, where to look for the static menupublic Plugin getCompatiblePlugin(java.lang.String menuKey, MetaData meta)
menuKey
- the menu keymeta
- the MetaDatapublic java.util.List<java.lang.Object> getPluginObjectsForKey(java.lang.String key)
MDIPlugin.getStaticMenuElements(String)
.key
- the static menu keypublic java.util.List<java.lang.Object> getDynamicPluginsMenuItems(SwingFileProperties properties, java.lang.String menuKey)
properties
- the FilePropertiesmenuKey
- the menu keyJMenuItem
JMenu
AbstractAction