gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.lib / src / main / java / org / gvsig / tools / task / SimpleTaskStatus.java @ 2497
History | View | Annotate | Download (4.12 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.tools.task; |
25 |
|
26 |
public interface SimpleTaskStatus extends TaskStatus { |
27 |
|
28 |
/**
|
29 |
* Used by the task to set the title associated to the task. It can't be
|
30 |
* changed.
|
31 |
*
|
32 |
* @param tittle
|
33 |
*
|
34 |
* @deprecated @see {@link SimpleTaskStatus#setTitle(String)}
|
35 |
*/
|
36 |
public void setTittle(String tittle); |
37 |
|
38 |
/**
|
39 |
* Used by the task to set the title associated to the task. It can't be
|
40 |
* changed.
|
41 |
*
|
42 |
* @param title
|
43 |
*/
|
44 |
public void setTitle(String title); |
45 |
|
46 |
/**
|
47 |
* Used by the task to set a message associated to the current action of the
|
48 |
* task
|
49 |
*
|
50 |
* @param message
|
51 |
*/
|
52 |
public void message(String message); |
53 |
|
54 |
/**
|
55 |
* Used by the task to set the value for min and max steps of the task.
|
56 |
* These are used with the "curvalue" to calculate the percentage of
|
57 |
* completion.
|
58 |
*
|
59 |
* @param min
|
60 |
* @param max
|
61 |
*/
|
62 |
public void setRangeOfValues(long min, long max); |
63 |
|
64 |
/**
|
65 |
* Used by the task to set the current step of the task.
|
66 |
*
|
67 |
* @param value
|
68 |
* @see setRangeOfValues
|
69 |
*
|
70 |
*/
|
71 |
public void setCurValue(long value); |
72 |
|
73 |
public void incrementCurrentValue(); |
74 |
|
75 |
/**
|
76 |
* Used by the task to inform that it has terminated without errors.
|
77 |
*/
|
78 |
public void terminate(); |
79 |
|
80 |
/**
|
81 |
* Used by the task to inform that it has terminated cancelled by the user
|
82 |
* or another task.
|
83 |
*/
|
84 |
public void cancel(); |
85 |
|
86 |
/**
|
87 |
* Used by the task to inform that it has terminated with errors.
|
88 |
*/
|
89 |
public void abort(); |
90 |
|
91 |
/**
|
92 |
* Remove this TaskStatus from the TaskStatusManager
|
93 |
*/
|
94 |
public void remove(); |
95 |
|
96 |
/**
|
97 |
* Add this TaskStatus to the TaskStatusManager. If TaskStatus already in
|
98 |
* the manager this is updated.
|
99 |
*/
|
100 |
public void add(); |
101 |
|
102 |
/**
|
103 |
* Used by the task to inform that this task es cacellable.
|
104 |
*
|
105 |
* @param cancellable
|
106 |
*/
|
107 |
public void setCancellable(boolean cancellable); |
108 |
|
109 |
/**
|
110 |
* Used by the task to inform that this TaskStatus is removed from the
|
111 |
* manager automatically when the task is terminated and the manager need.
|
112 |
*
|
113 |
* @param autoremove
|
114 |
*/
|
115 |
public void setAutoremove(boolean autoremove); |
116 |
|
117 |
/**
|
118 |
* Return the autoremove value of this TaskStatus.
|
119 |
*
|
120 |
* @return
|
121 |
*/
|
122 |
public boolean getAutoRemove(); |
123 |
|
124 |
/**
|
125 |
* Set the estatus of task to inteterminate. Reset values of range and
|
126 |
* current value.
|
127 |
*/
|
128 |
public void setIndeterminate(); |
129 |
|
130 |
/**
|
131 |
* Este metodo guarda los valores de progreso y el mensaje de la tarea para
|
132 |
* ser restaurados posteriormente invocando al metodo {@link #pop()}.
|
133 |
*
|
134 |
* Los metodos {@link #push()} y {@link #pop()} estan pensado para gestionar
|
135 |
* subtareas dentro de un tareas, de forma que las subtareas puedan tener su
|
136 |
* propio progreso y mensaje mientras se estan ejecutando.
|
137 |
*
|
138 |
* @see {@link #pop()}
|
139 |
*/
|
140 |
public void push(); |
141 |
|
142 |
/**
|
143 |
* Este metodo esta pensado para restaurar los ultimos valores de progreso y
|
144 |
* mensaje que se guardaron invocando al metodo {@link #push()}.
|
145 |
*
|
146 |
* @see {@link #push()}
|
147 |
*/
|
148 |
public void pop(); |
149 |
|
150 |
public void restart(); |
151 |
} |