Revision 20100 branches/v10/libraries/libIverUtiles/src/com/iver/utiles/swing/threads/Cancellable.java
Cancellable.java | ||
---|---|---|
43 | 43 |
import java.awt.Graphics; |
44 | 44 |
|
45 | 45 |
/** |
46 |
* <p>Most of the drawing task on {@link Graphics Graphics} can be canceled.</p> |
|
47 |
* <p>The <code>Cancellable</code> interface is designed for work with that kind of drawing tasks.</p> |
|
46 |
* <p><code>Cancellable</code> interface is designed for adding support to notify that a task must be cancelled.</p> |
|
47 |
* |
|
48 |
* <p>This is useful if a process is hung up, blocking, or simply if user wants cancel it, for instance, a |
|
49 |
* drawing process of a heavy layer.</p> |
|
50 |
* |
|
51 |
* <p>The classes which implement this interface are force to share the canceling information, in order to be |
|
52 |
* notified about the current status of it. This implies a synchronous canceling process, that could be implemented by |
|
53 |
* another object.</p> |
|
48 | 54 |
*/ |
49 | 55 |
public interface Cancellable { |
50 | 56 |
/** |
51 |
* <p>Determines if the task associated is canceled.</p>
|
|
57 |
* <p>Determines if the related task must be canceled.</p>
|
|
52 | 58 |
* |
53 |
* @return <code>true</code> if task has been canceled; otherwise returns <code>false</code>
|
|
59 |
* @return <code>true</code> if task must been canceled; otherwise <code>false</code>
|
|
54 | 60 |
* |
55 | 61 |
* @see #setCanceled(boolean) |
56 | 62 |
*/ |
57 | 63 |
boolean isCanceled(); |
58 | 64 |
|
59 | 65 |
/** |
60 |
* <p>Sets the status of the task associated to canceled or not</p>
|
|
66 |
* <p>Sets if the related task must be canceled.</p>
|
|
61 | 67 |
* |
62 |
* @param canceled <code>true</code> if the task has been canceled; otherwise <code>false</code>
|
|
68 |
* @param canceled <code>true</code> if the task must be canceled; otherwise <code>false</code>
|
|
63 | 69 |
* |
64 | 70 |
* @see #isCanceled() |
65 | 71 |
*/ |
Also available in: Unified diff