changeset 191:e1b7538273be

Fixed JavaDocs for WorkerStateEvent, corrected type param on constructor.
author rbair
date Fri, 23 Dec 2011 17:49:29 -0800
parents a761c95c1998
children 51cd78dc6b9b
files javafx-concurrent/src/javafx/concurrent/WorkerStateEvent.java
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-concurrent/src/javafx/concurrent/WorkerStateEvent.java	Fri Dec 23 17:46:08 2011 -0800
+++ b/javafx-concurrent/src/javafx/concurrent/WorkerStateEvent.java	Fri Dec 23 17:49:29 2011 -0800
@@ -7,12 +7,10 @@
 import javafx.event.Event;
 import javafx.event.EventTarget;
 import javafx.event.EventType;
-import javafx.scene.input.InputEvent;
-import javafx.scene.input.MouseEvent;
 
 /**
- *
- * @author Richard
+ * An event which occurs whenever the state changes on a Worker. Both
+ * {@link Task} and {@link Service} support listening to state events.
  */
 public class WorkerStateEvent extends Event {
     /**
@@ -63,7 +61,15 @@
     public static final EventType<WorkerStateEvent> WORKER_STATE_FAILED =
             new EventType<WorkerStateEvent>(WorkerStateEvent.ANY, "WORKER_STATE_FAILED");
 
-    public WorkerStateEvent(Worker worker, EventType<? extends Event> eventType) {
+    /**
+     * Create a new WorkerStateEvent. Specify the worker and the event type.
+     *
+     * @param worker The Worker which is firing the event. The Worker really
+     *               should be an EventTarget, otherwise the EventTarget
+     *               for the event will be null.
+     * @param eventType The type of event. This should not be null.
+     */
+    public WorkerStateEvent(Worker worker, EventType<? extends WorkerStateEvent> eventType) {
         super(worker, worker instanceof EventTarget ? (EventTarget) worker : null, eventType);
     }