Class InstalledPlugin

  • All Implemented Interfaces:
    IconProvider, java.lang.Comparable<InstalledBundleObject>

    public class InstalledPlugin
    extends AbstractInstalledPlugin
    An InstalledPlugin 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 Detail

      • isEnabled

        public boolean isEnabled()
        Returns true if this plug-in is disabled. This state is tracked in user Settings.
        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 by InstalledPlugin. 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 than ACTIVATED will always return null.
        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 if null.
        Parameters:
        ks - the accelerator to assign, or null
      • resetAcceleratorKey

        public void resetAcceleratorKey()
        Reset the plug-in's accelerator key to the default value.