Class PluginToolkitEvent

java.lang.Object
java.util.EventObject
java.awt.AWTEvent
org.jorigin.plugin.PluginToolkitEvent
All Implemented Interfaces:
Serializable

public class PluginToolkitEvent extends AWTEvent
An event launched by the plugin toolkit. This event enables to monitor the PluginToolkit work.
Since:
1.0.0
Version:
"1.0.14" - b202111241200L
Author:
Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jorigin/jcommon (contact@jorigin.org)
See Also:
  • Field Details

    • PLUGIN_DISCOVERING_START

      public static final int PLUGIN_DISCOVERING_START
      Flag used when the plugin discovery task has sarted.
      See Also:
    • PLUGIN_DISCOVERING_FINISHED

      public static final int PLUGIN_DISCOVERING_FINISHED
      Flag used when the plugin discovery task has finished.
      See Also:
    • PLUGIN_DISCOVERING_ARCHIVE

      public static final int PLUGIN_DISCOVERING_ARCHIVE
      Flag used when the plugin discovery task is working on an archive.
      See Also:
    • PLUGIN_DISCOVERING_DIR

      public static final int PLUGIN_DISCOVERING_DIR
      Flag used when the plugin discovery task is working on a directory.
      See Also:
    • PLUGIN_NO_DISCOVERY

      public static final int PLUGIN_NO_DISCOVERY
      Flag used when the plugin discovery task has found no plugin.
      See Also:
    • PLUGIN_LOADING_START

      public static final int PLUGIN_LOADING_START
      Flag used when the plugin loading task starts.
      See Also:
    • PLUGIN_LOADING_FINISHED

      public static final int PLUGIN_LOADING_FINISHED
      Flag used when the plugin loading task finishes.
      See Also:
    • PLUGIN_LOADING_LOADED

      public static final int PLUGIN_LOADING_LOADED
      Flag used when the plugin loading task has loaded a plugin.
      See Also:
    • PLUGIN_LOADING_ERROR

      public static final int PLUGIN_LOADING_ERROR
      Flag used when the plugin loading task has encountred an error.
      See Also:
  • Constructor Details

    • PluginToolkitEvent

      public PluginToolkitEvent(Object source, int id)
      Create a new event with the source and identifier given in parameter
      Parameters:
      source - the source of the event (should be an instance of PluginToolkit)
      id - the identifier of the event. See the static descriptors of this class
    • PluginToolkitEvent

      public PluginToolkitEvent(Object source, int id, String msg)
      Create a new event with the source and identifier given in parameter. A message is attached to the event.
      Parameters:
      source - the source of the event (should be an instance of PluginToolkit)
      id - the identifier of the event. See the static descriptors of this class
      msg - the message associated to the event
    • PluginToolkitEvent

      public PluginToolkitEvent(Object source, int id, String msg, double progress)
      Create a new event with the source and identifier given in parameter. A message is attached to the event.
      A progress is attached to the event, so if the event represents a task progress, the overall progress can be monitored.
      Parameters:
      source - the source of the event (should be an instance of PluginToolkit)
      id - the identifier of the event. See the static descriptors of this class
      msg - the message associated to the event
      progress - the progress associated to this event.
    • PluginToolkitEvent

      public PluginToolkitEvent(Object source, int id, String msg, double progress, double taskSize)
      Create a new event with the source and identifier given in parameter. A message is attached to the event.
      A progress is attached to the event, so if the event represents a task progress, the overall progress can be monitored. The overall task size is given by the parameter taskSize.
      Parameters:
      source - the source of the event (should be an instance of PluginToolkit)
      id - the identifier of the event. See the static descriptors of this class
      msg - the message associated to the event
      progress - the progress associated to this event.
      taskSize - the total size of the task which this event is attached.
    • PluginToolkitEvent

      public PluginToolkitEvent(Object source, int id, IPlugin plugin, double progress)
      Create a new event with the source and identifier given in parameter. The plugin thats lead to this event to be fired is given in parameter.
      A progress is attached to the event, so if the event represents a task progress, the overall progress can be monitored.
      Parameters:
      source - the source of the event (should be an instance of PluginToolkit)
      id - the identifier of the event. See the static descriptors of this class
      plugin - the plugin attached to this event
      progress - the progress associated to this event.
    • PluginToolkitEvent

      public PluginToolkitEvent(Object source, int id, IPlugin plugin, double progress, double taskSize)
      Create a new event with the source and identifier given in parameter. The plugin thats lead to this event to be fired is given in parameter.
      A progress is attached to the event, so if the event represents a task progress, the overall progress can be monitored. The overall task size is given by the parameter taskSize
      Parameters:
      source - the source of the event (should be an instance of PluginToolkit)
      id - the identifier of the event. See the static descriptors of this class
      plugin - the plugin attached to this event
      progress - the progress associated to this event.
      taskSize - the total size of the task which this event is attached.
  • Method Details

    • getMessage

      public String getMessage()
      Get the message attached to this event.
      Returns:
      the message attached to this event.
    • getProgress

      public double getProgress()
      Get the progress attached to this event.
      Returns:
      the message attached to this event.
    • getPlugin

      public IPlugin getPlugin()
      Get the plugin attached o this event.
      Returns:
      the plugin attached o this event.
    • getTaskSize

      public double getTaskSize()
      Get the size of the task within this event has been fired.
      Returns:
      the size of the task within this event has been fired.