Module org.jcommon

Class PluginToolkitEvent

    • Field Detail

      • PLUGIN_DISCOVERING_START

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

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

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

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

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

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

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

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

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

      • 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 Detail

      • 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.