Class GUIPluginSkeleton

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Plugin, org.apache.log4j.spi.OptionHandler
Direct Known Subclasses:
ZeroConfPlugin

public abstract class GUIPluginSkeleton extends JPanel implements Plugin
See Also:
  • Field Details

    • loggerRepository

      private org.apache.log4j.spi.LoggerRepository loggerRepository
    • active

      private boolean active
  • Constructor Details

    • GUIPluginSkeleton

      public GUIPluginSkeleton()
    • GUIPluginSkeleton

      public GUIPluginSkeleton(boolean isDoubleBuffered)
      Parameters:
      isDoubleBuffered -
    • GUIPluginSkeleton

      public GUIPluginSkeleton(LayoutManager layout)
      Parameters:
      layout -
    • GUIPluginSkeleton

      public GUIPluginSkeleton(LayoutManager layout, boolean isDoubleBuffered)
      Parameters:
      layout -
      isDoubleBuffered -
  • Method Details

    • getLoggerRepository

      public org.apache.log4j.spi.LoggerRepository getLoggerRepository()
      Description copied from interface: Plugin
      Gets the logger repository for this plugin.
      Specified by:
      getLoggerRepository in interface Plugin
      Returns:
      the logger repository to which this plugin is attached.
    • setLoggerRepository

      public void setLoggerRepository(org.apache.log4j.spi.LoggerRepository repository)
      Description copied from interface: Plugin
      Sets the logger repository used by this plugin. This repository will be used by the plugin functionality.
      Specified by:
      setLoggerRepository in interface Plugin
      Parameters:
      repository - the logger repository to attach this plugin to.
    • isActive

      public boolean isActive()
      Description copied from interface: Plugin
      True if the plugin is active and running.
      Specified by:
      isActive in interface Plugin
      Returns:
      boolean true if the plugin is currently active.
    • isEquivalent

      public boolean isEquivalent(Plugin testPlugin)
      Description copied from interface: Plugin
      Returns true if the testPlugin is considered to be "equivalent" to the this plugin.

      The equivalency test is at the discretion of the plugin implementation. The PluginRegistry will use this method when starting new plugins to see if a given plugin is considered equivalent to an already running plugin with the same name. If they are considered to be equivalent, the currently running plugin will be left in place, and the new plugin will not be started.

      It is possible to override the equals() method, however this has more meaning than is required for this simple test and would also require the overriding of the hashCode() method as well. All of this is more work than is needed, so this simple method is used instead.

      Specified by:
      isEquivalent in interface Plugin
      Parameters:
      testPlugin - The plugin to test equivalency against.
      Returns:
      Returns true if testPlugin is considered to be equivelent.
    • setActive

      public final void setActive(boolean active)
      Parameters:
      active - The active to set.