Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.lib / src / main / java / org / gvsig / tools / task / SimpleTaskStatus.java @ 1666

History | View | Annotate | Download (4.07 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
    /**
74
     * Used by the task to inform that it has terminated without errors.
75
     */
76
    public void terminate();
77

    
78
    /**
79
     * Used by the task to inform that it has terminated cancelled by the user
80
     * or another task.
81
     */
82
    public void cancel();
83

    
84
    /**
85
     * Used by the task to inform that it has terminated with errors.
86
     */
87
    public void abort();
88

    
89
    /**
90
     * Remove this TaskStatus from the TaskStatusManager
91
     */
92
    public void remove();
93

    
94
    /**
95
     * Add this TaskStatus to the TaskStatusManager. If TaskStatus already in
96
     * the manager this is updated.
97
     */
98
    public void add();
99

    
100
    /**
101
     * Used by the task to inform that this task es cacellable.
102
     *
103
     * @param cancellable
104
     */
105
    public void setCancellable(boolean cancellable);
106

    
107
    /**
108
     * Used by the task to inform that this TaskStatus is removed from the
109
     * manager automatically when the task is terminated and the manager need.
110
     *
111
     * @param autoremove
112
     */
113
    public void setAutoremove(boolean autoremove);
114

    
115
    /**
116
     * Return the autoremove value of this TaskStatus.
117
     *
118
     * @return
119
     */
120
    public boolean getAutoRemove();
121

    
122
    /**
123
     * Set the estatus of task to inteterminate. Reset values of range and
124
     * current value.
125
     */
126
    public void setIndeterminate();
127

    
128
    /**
129
     * Este metodo guarda los valores de progreso y el mensaje de la tarea para
130
     * ser restaurados posteriormente invocando al metodo {@link #pop()}.
131
     *
132
     * Los metodos {@link #push()} y {@link #pop()} estan pensado para gestionar
133
     * subtareas dentro de un tareas, de forma que las subtareas puedan tener su
134
     * propio progreso y mensaje mientras se estan ejecutando.
135
     *
136
     * @see {@link #pop()}
137
     */
138
    public void push();
139

    
140
    /**
141
     * Este metodo esta pensado para restaurar los ultimos valores de progreso y
142
     * mensaje que se guardaron invocando al metodo {@link #push()}.
143
     *
144
     * @see {@link #push()}
145
     */
146
    public void pop();
147

    
148
    public void restart();
149
}