public class PlatformControlCenter
extends java.lang.Object
implements jadex.base.gui.plugin.IControlCenter, jadex.commons.IPropertiesProvider
Modifier and Type | Field and Description |
---|---|
protected ControlCenter |
controlcenter
The global control center.
|
protected jadex.bridge.service.types.library.ILibraryService |
libservice
The library service.
|
protected PlatformControlCenterPanel |
pccpanel
The single platform control center panel.
|
protected jadex.bridge.IExternalAccess |
platformaccess
The platform access.
|
protected java.util.List<jadex.commons.Tuple2<jadex.base.gui.plugin.IControlCenterPlugin,javax.swing.JComponent>> |
plugins
The plugins (plugin->panel).
|
protected jadex.commons.Properties |
props
The settings of the control center and all plugins.
|
protected java.util.Map<jadex.base.gui.plugin.IControlCenterPlugin,java.lang.Boolean> |
toolbarvis
The plugin toolbar visibility.
|
Constructor and Description |
---|
PlatformControlCenter() |
Modifier and Type | Method and Description |
---|---|
jadex.commons.future.IFuture<java.lang.Void> |
activatePlugin(jadex.base.gui.plugin.IControlCenterPlugin plugin)
Activate a plugin.
|
protected jadex.commons.future.IFuture<jadex.base.gui.plugin.IControlCenterPlugin> |
addPlugin(java.lang.Class<?> plclass) |
protected jadex.commons.future.IFuture<jadex.base.gui.plugin.IControlCenterPlugin> |
addPlugin(java.lang.String clname,
java.lang.ClassLoader cl) |
protected void |
addPluginComponent(jadex.base.gui.plugin.IControlCenterPlugin pl,
javax.swing.JComponent comp) |
void |
addStatusComponent(java.lang.Object id,
javax.swing.JComponent comp)
Add a component to the status bar.
|
void |
displayError(java.lang.String errortitle,
java.lang.String errormessage,
java.lang.Exception exception)
Display an error dialog.
|
jadex.commons.future.IFuture<java.lang.Void> |
dispose()
Close all active plugins.
|
jadex.commons.future.IFuture<java.lang.ClassLoader> |
getClassLoader(jadex.bridge.IResourceIdentifier rid)
Get the resource identifier.
|
jadex.base.gui.CMSUpdateHandler |
getCMSHandler()
Get the cms update handler shared by all tools.
|
ControlCenter |
getControlCenter()
Get the global control center.
|
jadex.base.gui.componenttree.ComponentIconCache |
getIconCache()
Get the component icon cache shared by all tools.
|
jadex.bridge.IExternalAccess |
getJCCAccess()
Get the jcc access.
|
PlatformControlCenterPanel |
getPanel()
Get the control center panel.
|
jadex.bridge.IExternalAccess |
getPlatformAccess()
Get the platform access.
|
protected javax.swing.JComponent |
getPluginComponent(jadex.base.gui.plugin.IControlCenterPlugin pl) |
jadex.base.gui.plugin.IControlCenterPlugin |
getPluginForName(java.lang.String name)
Find a plugin by name.
|
protected int |
getPluginIndex(jadex.base.gui.plugin.IControlCenterPlugin pl) |
jadex.base.gui.plugin.IControlCenterPlugin[] |
getPlugins()
Get all plugins.
|
protected jadex.commons.Tuple2<jadex.base.gui.plugin.IControlCenterPlugin,javax.swing.JComponent> |
getPluginTuple(jadex.base.gui.plugin.IControlCenterPlugin pl) |
jadex.commons.future.IFuture<jadex.commons.Properties> |
getProperties()
Get the current state as properties.
|
jadex.base.gui.PropertyUpdateHandler |
getPropertyHandler()
Get the property update handler shared by all tools.
|
javax.swing.JComponent |
getStatusComponent(java.lang.Object id)
Get a component from the status bar.
|
jadex.base.gui.plugin.IControlCenterPlugin[] |
getToolbarPlugins(boolean vis)
Get the toolbar plugins that are visible or not visible.
|
jadex.commons.future.IFuture<java.lang.Void> |
init(jadex.bridge.IExternalAccess platformaccess,
ControlCenter controlcenter,
java.lang.String[] plugin_classes)
Initialize a control center.
|
protected jadex.commons.future.IFuture<java.lang.Void> |
initPlugin(jadex.base.gui.plugin.IControlCenterPlugin plugin) |
boolean |
isPluginVisible(jadex.base.gui.plugin.IControlCenterPlugin pl)
Test if a plugin is visible in the toolbar.
|
protected jadex.commons.future.IFuture<java.lang.Void> |
loadPlugins(jadex.commons.Property[] ps,
int i,
java.util.List<jadex.commons.Tuple2<jadex.base.gui.plugin.IControlCenterPlugin,javax.swing.JComponent>> newpls,
java.lang.ClassLoader cl)
Load plugins iteratively.
|
protected void |
moveLeftPlugin(jadex.base.gui.plugin.IControlCenterPlugin pl) |
protected void |
moveRightPlugin(jadex.base.gui.plugin.IControlCenterPlugin pl) |
protected void |
removePluginComponent(jadex.base.gui.plugin.IControlCenterPlugin pl) |
void |
removeStatusComponent(java.lang.Object id)
Remove a previously added component from the status bar.
|
jadex.commons.future.IFuture<java.lang.Void> |
savePlatformProperties()
Push plugin settings to platform and save platform properties.
|
void |
setPluginVisible(jadex.base.gui.plugin.IControlCenterPlugin pl,
boolean vis)
Set the visible state of a plugin.
|
jadex.commons.future.IFuture<java.lang.Void> |
setProperties(jadex.commons.Properties props)
Set state from given properties.
|
void |
setStatusText(java.lang.String text)
Set a text to be displayed in the status bar.
|
void |
showPlatform(jadex.bridge.IExternalAccess platformaccess)
Add a new platform control center
or switch to tab if already exists.
|
void |
showPlugin(java.lang.String name)
Switch to a plugin.
|
protected jadex.bridge.IExternalAccess platformaccess
protected java.util.List<jadex.commons.Tuple2<jadex.base.gui.plugin.IControlCenterPlugin,javax.swing.JComponent>> plugins
protected java.util.Map<jadex.base.gui.plugin.IControlCenterPlugin,java.lang.Boolean> toolbarvis
protected ControlCenter controlcenter
protected PlatformControlCenterPanel pccpanel
protected jadex.commons.Properties props
protected jadex.bridge.service.types.library.ILibraryService libservice
public jadex.commons.future.IFuture<java.lang.Void> init(jadex.bridge.IExternalAccess platformaccess, ControlCenter controlcenter, java.lang.String[] plugin_classes)
protected jadex.commons.future.IFuture<jadex.base.gui.plugin.IControlCenterPlugin> addPlugin(java.lang.String clname, java.lang.ClassLoader cl)
protected jadex.commons.future.IFuture<jadex.base.gui.plugin.IControlCenterPlugin> addPlugin(java.lang.Class<?> plclass)
protected javax.swing.JComponent getPluginComponent(jadex.base.gui.plugin.IControlCenterPlugin pl)
protected jadex.commons.Tuple2<jadex.base.gui.plugin.IControlCenterPlugin,javax.swing.JComponent> getPluginTuple(jadex.base.gui.plugin.IControlCenterPlugin pl)
protected void addPluginComponent(jadex.base.gui.plugin.IControlCenterPlugin pl, javax.swing.JComponent comp)
protected void removePluginComponent(jadex.base.gui.plugin.IControlCenterPlugin pl)
protected void moveLeftPlugin(jadex.base.gui.plugin.IControlCenterPlugin pl)
protected void moveRightPlugin(jadex.base.gui.plugin.IControlCenterPlugin pl)
protected int getPluginIndex(jadex.base.gui.plugin.IControlCenterPlugin pl)
public jadex.commons.future.IFuture<java.lang.Void> dispose()
public jadex.commons.future.IFuture<java.lang.ClassLoader> getClassLoader(jadex.bridge.IResourceIdentifier rid)
getClassLoader
in interface jadex.base.gui.plugin.IControlCenter
public PlatformControlCenterPanel getPanel()
public jadex.commons.future.IFuture<java.lang.Void> savePlatformProperties()
public boolean isPluginVisible(jadex.base.gui.plugin.IControlCenterPlugin pl)
pl
- The plugin.public void setPluginVisible(jadex.base.gui.plugin.IControlCenterPlugin pl, boolean vis)
public jadex.base.gui.plugin.IControlCenterPlugin[] getToolbarPlugins(boolean vis)
public ControlCenter getControlCenter()
public jadex.base.gui.plugin.IControlCenterPlugin[] getPlugins()
public jadex.base.gui.plugin.IControlCenterPlugin getPluginForName(java.lang.String name)
public jadex.commons.future.IFuture<java.lang.Void> activatePlugin(jadex.base.gui.plugin.IControlCenterPlugin plugin)
protected jadex.commons.future.IFuture<java.lang.Void> initPlugin(jadex.base.gui.plugin.IControlCenterPlugin plugin)
public jadex.commons.future.IFuture<java.lang.Void> setProperties(jadex.commons.Properties props)
setProperties
in interface jadex.commons.IPropertiesProvider
protected jadex.commons.future.IFuture<java.lang.Void> loadPlugins(jadex.commons.Property[] ps, int i, java.util.List<jadex.commons.Tuple2<jadex.base.gui.plugin.IControlCenterPlugin,javax.swing.JComponent>> newpls, java.lang.ClassLoader cl)
public jadex.commons.future.IFuture<jadex.commons.Properties> getProperties()
getProperties
in interface jadex.commons.IPropertiesProvider
public void showPlatform(jadex.bridge.IExternalAccess platformaccess)
showPlatform
in interface jadex.base.gui.plugin.IControlCenter
public void showPlugin(java.lang.String name)
showPlugin
in interface jadex.base.gui.plugin.IControlCenter
public void setStatusText(java.lang.String text)
setStatusText
in interface jadex.base.gui.plugin.IControlCenter
public javax.swing.JComponent getStatusComponent(java.lang.Object id)
getStatusComponent
in interface jadex.base.gui.plugin.IControlCenter
id
- Id used for adding a component.public void addStatusComponent(java.lang.Object id, javax.swing.JComponent comp)
addStatusComponent
in interface jadex.base.gui.plugin.IControlCenter
id
- An id for later reference.comp
- An id for later reference.public void removeStatusComponent(java.lang.Object id)
removeStatusComponent
in interface jadex.base.gui.plugin.IControlCenter
id
- The id used for adding the component.public void displayError(java.lang.String errortitle, java.lang.String errormessage, java.lang.Exception exception)
displayError
in interface jadex.base.gui.plugin.IControlCenter
errortitle
- The title to use for an error dialog (required).errormessage
- An optional error message displayed before the exception.exception
- The exception (if any).public jadex.bridge.IExternalAccess getPlatformAccess()
getPlatformAccess
in interface jadex.base.gui.plugin.IControlCenter
public jadex.bridge.IExternalAccess getJCCAccess()
getJCCAccess
in interface jadex.base.gui.plugin.IControlCenter
public jadex.base.gui.CMSUpdateHandler getCMSHandler()
getCMSHandler
in interface jadex.base.gui.plugin.IControlCenter
public jadex.base.gui.PropertyUpdateHandler getPropertyHandler()
getPropertyHandler
in interface jadex.base.gui.plugin.IControlCenter
public jadex.base.gui.componenttree.ComponentIconCache getIconCache()
getIconCache
in interface jadex.base.gui.plugin.IControlCenter