Class InstalledPlugin
- java.lang.Object
-
- ca.cgjennings.apps.arkham.plugins.InstalledBundleObject
-
- ca.cgjennings.apps.arkham.plugins.AbstractInstalledPlugin
-
- ca.cgjennings.apps.arkham.plugins.InstalledPlugin
-
- All Implemented Interfaces:
IconProvider,java.lang.Comparable<InstalledBundleObject>
public class InstalledPlugin extends AbstractInstalledPlugin
AnInstalledPluginbridges the gap between a plug-in bundle and the plug-ins that it contains. It is not the plug-in itself, but it creates and manages instances of the plug-in on demand. When a plug-in bundle is installed, an instance is created for each plug-in listed in the bundle's root file.- Since:
- 3.0
- Author:
- Chris Jennings
- See Also:
BundleInstaller.getInstalledPlugins()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcollectPluginInfo(Plugin p)Called to allow subclasses to collect additional information about a plug-in while an information probe is being conducted.javax.swing.KeyStrokegetAcceleratorKey()Returns the accelerator key assigned to the plug-in.booleanisEnabled()Returnstrueif this plug-in is disabled.voidresetAcceleratorKey()Reset the plug-in's accelerator key to the default value.voidsetAcceleratorKey(javax.swing.KeyStroke ks)Sets the accelerator key for the plug-in, or assigns no accelerator ifnull.voidsetEnabled(boolean enable)Sets whether this plug-in is enabled.-
Methods inherited from class ca.cgjennings.apps.arkham.plugins.AbstractInstalledPlugin
equals, getDescription, getIcon, getName, getPlugin, getPluginClass, getPluginType, getSettingPrefix, getVersion, hashCode, isReloadable, isStarted, startPlugin, stopPlugin
-
Methods inherited from class ca.cgjennings.apps.arkham.plugins.InstalledBundleObject
compareTo, getBundle, getCatalogID, getPluginRoot, getPriority, getRepresentativeImage, isUninstallPending, isUpdatePending, markFailed, toString
-
-
-
-
Method Detail
-
collectPluginInfo
protected void collectPluginInfo(Plugin p)
Description copied from class:AbstractInstalledPluginCalled to allow subclasses to collect additional information about a plug-in while an information probe is being conducted. The base class does nothing.- Overrides:
collectPluginInfoin classAbstractInstalledPlugin
-
isEnabled
public boolean isEnabled()
Returnstrueif this plug-in is disabled. This state is tracked in userSettings.- Returns:
trueif the plug-in is enabled (which it is by default)
-
setEnabled
public void setEnabled(boolean enable)
Sets whether this plug-in is enabled. Note that this state is not enforced byInstalledPlugin. Rather, higher level code is expected to check whether a plug-in is enabled before starting it.- Parameters:
enable-trueto enable the plug-in
-
getAcceleratorKey
public javax.swing.KeyStroke getAcceleratorKey()
Returns the accelerator key assigned to the plug-in. Types other thanACTIVATEDwill always returnnull.- Returns:
- the accelerator key for the plug-in, or
nullif none
-
setAcceleratorKey
public void setAcceleratorKey(javax.swing.KeyStroke ks)
Sets the accelerator key for the plug-in, or assigns no accelerator ifnull.- Parameters:
ks- the accelerator to assign, ornull
-
resetAcceleratorKey
public void resetAcceleratorKey()
Reset the plug-in's accelerator key to the default value.
-
-