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
AnInstalledPlugin
bridges 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 void
collectPluginInfo(Plugin p)
Called to allow subclasses to collect additional information about a plug-in while an information probe is being conducted.javax.swing.KeyStroke
getAcceleratorKey()
Returns the accelerator key assigned to the plug-in.boolean
isEnabled()
Returnstrue
if this plug-in is disabled.void
resetAcceleratorKey()
Reset the plug-in's accelerator key to the default value.void
setAcceleratorKey(javax.swing.KeyStroke ks)
Sets the accelerator key for the plug-in, or assigns no accelerator ifnull
.void
setEnabled(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:AbstractInstalledPlugin
Called to allow subclasses to collect additional information about a plug-in while an information probe is being conducted. The base class does nothing.- Overrides:
collectPluginInfo
in classAbstractInstalledPlugin
-
isEnabled
public boolean isEnabled()
Returnstrue
if this plug-in is disabled. This state is tracked in userSettings
.- Returns:
true
if 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
-true
to enable the plug-in
-
getAcceleratorKey
public javax.swing.KeyStroke getAcceleratorKey()
Returns the accelerator key assigned to the plug-in. Types other thanACTIVATED
will always returnnull
.- Returns:
- the accelerator key for the plug-in, or
null
if 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.
-
-