Module org.jcommon

Class TaskEvent

    • Field Detail

      • TASK_STARTED

        public static final int TASK_STARTED
        The task has started.
        See Also:
        Constant Field Values
      • TASK_PROGRESS

        public static final int TASK_PROGRESS
        The task has progressed.
        See Also:
        Constant Field Values
      • TASK_SUSPENDED

        public static final int TASK_SUSPENDED
        The task is suspended.
        See Also:
        Constant Field Values
      • TASK_FINISHED

        public static final int TASK_FINISHED
        The task has finished.
        See Also:
        Constant Field Values
      • TASK_WARNING

        public static final int TASK_WARNING
        The task has produced a warning.
        See Also:
        Constant Field Values
      • TASK_ERROR

        public static final int TASK_ERROR
        The task has produced an error.
        See Also:
        Constant Field Values
      • TASK_INFO

        public static final int TASK_INFO
        The task has produces an information.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TaskEvent

        public TaskEvent​(Object source,
                         int id)
        Create a new task event.
        Parameters:
        source - the source (task) of the event.
        id - the identifier of the task.
      • TaskEvent

        public TaskEvent​(AWTEvent event)
        Create a new task event.
        Parameters:
        event - the original event to copy.
      • TaskEvent

        public TaskEvent​(Object source,
                         int id,
                         String name)
        Create a new task event.
        Parameters:
        source - the source (task) of the event.
        id - the identifier of the task.
        name - the name of the task.
      • TaskEvent

        public TaskEvent​(Object source,
                         int id,
                         String name,
                         String description)
        Create a new task event.
        Parameters:
        source - the source (task) of the event.
        id - the identifier of the task.
        name - the name of the task.
        description - the description of the event.
      • TaskEvent

        public TaskEvent​(Object source,
                         int id,
                         int size)
        Create a new task event.
        Parameters:
        source - the source (task) of the event.
        id - the identifier of the task.
        size - the size of the event in case of progress monitoring. If the event is TASK_STARTED, the size is the size of the task. If the event is TASK_PROGRESS, the size is the actually accomplished part of the task.
      • TaskEvent

        public TaskEvent​(Object source,
                         int id,
                         String name,
                         int size)
        Create a new task event.
        Parameters:
        source - the source (task) of the event.
        id - the identifier of the task.
        name - the name of the task.
        size - the size of the event in case of progress monitoring. If the event is TASK_STARTED, the size is the size of the task. If the event is TASK_PROGRESS, the size is the actually accomplished part of the task.
      • TaskEvent

        public TaskEvent​(Object source,
                         int id,
                         String name,
                         String description,
                         int size)
        Create a new task event.
        Parameters:
        source - the source (task) of the event.
        id - the identifier of the task.
        name - the name of the task.
        description - the description of the event.
        size - the size of the event in case of progress monitoring. If the event is TASK_STARTED, the size is the size of the task. If the event is TASK_PROGRESS, the size is the actually accomplished part of the task.
    • Method Detail

      • getTaskName

        public String getTaskName()
        Get the name of the task attached to this event
        Returns:
        String the name of the task attached to this event
      • getDescription

        public String getDescription()
        Get the description of the task
        Returns:
        String the description of the task
      • getSize

        public int getSize()
        Get the size of the task.
        Returns:
        int the size of the task