svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.utils / src / main / java / org / gvsig / utils / swing / threads / Monitorable.java @ 40561
History | View | Annotate | Download (2.81 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 3
|
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 |
/* CVS MESSAGES:
|
25 |
*
|
26 |
* $Id: Monitorable.java 29631 2009-06-29 16:56:19Z jpiera $
|
27 |
* $Log$
|
28 |
* Revision 1.1 2006-05-22 10:31:55 fjp
|
29 |
* Monitorable tasks easy
|
30 |
*
|
31 |
* Revision 1.3 2006/05/15 14:56:23 azabala
|
32 |
* A?adida la posibilidad de modificar el paso actual (para que en tareas que constan de varios pasos, para cada paso se pueda mostrar una barra llenandose)
|
33 |
*
|
34 |
* Revision 1.2 2006/03/09 18:43:29 azabala
|
35 |
* *** empty log message ***
|
36 |
*
|
37 |
* Revision 1.1 2006/03/09 18:26:19 azabala
|
38 |
* *** empty log message ***
|
39 |
*
|
40 |
*
|
41 |
*/
|
42 |
package org.gvsig.utils.swing.threads; |
43 |
/**
|
44 |
* Interface to monitorize a long process, which operates
|
45 |
* in many individual steps
|
46 |
* @author azabala
|
47 |
*
|
48 |
*/
|
49 |
public interface Monitorable { |
50 |
/**
|
51 |
* Report to monitor that an individual step
|
52 |
* was processed.
|
53 |
*
|
54 |
*/
|
55 |
public void reportStep(); |
56 |
/**
|
57 |
* Return the number of steps processed
|
58 |
* @return
|
59 |
*/
|
60 |
public int getCurrentStep(); |
61 |
/**
|
62 |
* Allows to modify current step.
|
63 |
*
|
64 |
*/
|
65 |
public void setCurrentStep(int currentStep); |
66 |
|
67 |
/**
|
68 |
* report monitor what number has the initial
|
69 |
* step of the process is monitoring
|
70 |
* @param step
|
71 |
*/
|
72 |
public void setInitialStep(int step); |
73 |
|
74 |
public int getInitialStep(); |
75 |
|
76 |
public int getFinalStep(); |
77 |
/**
|
78 |
* report monitor what number has the final
|
79 |
* step of the process is monitoring
|
80 |
* (no apply to undefined process)
|
81 |
* @param step
|
82 |
*/
|
83 |
public void setFinalStep(int step); |
84 |
/**
|
85 |
* Reports to the monitor that the process is
|
86 |
* monitoring is (or not) a defined process. A defined
|
87 |
* process is a process whose number of step is predefined
|
88 |
* (in front of not defined process, which may run in
|
89 |
* an unknown number of steps)
|
90 |
* @param defined
|
91 |
*/
|
92 |
public void setDeterminatedProcess(boolean defined); |
93 |
/**
|
94 |
* Tells if the process is monitoring is defined
|
95 |
* @return
|
96 |
*/
|
97 |
public boolean isDeterminatedProcess(); |
98 |
/**
|
99 |
* Sets initial default monitorization values
|
100 |
*/
|
101 |
public void reset(); |
102 |
|
103 |
} |
104 |
|