Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.utils / src / main / java / org / gvsig / utils / swing / threads / IProgressMonitorIF.java @ 40561

History | View | Annotate | Download (3.15 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: IProgressMonitorIF.java 29631 2009-06-29 16:56:19Z jpiera $
27
* $Log$
28
* Revision 1.2  2006-03-20 16:04:11  azabala
29
* *** empty log message ***
30
*
31
* Revision 1.1  2006/03/14 19:23:42  azabala
32
* *** empty log message ***
33
*
34
*
35
*/
36
package org.gvsig.utils.swing.threads;
37
/**
38
 * IProgressMonitorIF must be all classes which
39
 * monitors the process of a long costly task.
40
 * <br>
41
 * It is designed to monitor defined tasks (those
42
 * which we know what number of steps have) and 
43
 * undefined tasks.
44
 * <br>
45
 * It must has associated a GUI component to show
46
 * progress of the task (usually a Progress Bar and
47
 * a cancel button).
48
 * 
49
 * @author azabala
50
 *
51
 */
52
public interface IProgressMonitorIF {
53
        /**
54
         * sets initial step number of the task
55
         * monitored
56
         * @param step
57
         */
58
        public void setInitialStep(int step);
59
        /**
60
         * sets final step number of the task
61
         * monitored
62
         * @param step
63
         */
64
        public void setLastStep(int step);
65
        /**
66
         * sets current step number of the task
67
         * monitored
68
         * @param step
69
         */
70
        public void setCurrentStep(int step);
71
        public int getInitialStep();
72
        public int getLastStep();
73
        public int getCurrentStep();
74
        /**
75
         * Sets if the monitored task is defined (known
76
         * number of steps) or undefined (unknown)
77
         * @param indeterminated
78
         */
79
        public void setIndeterminated(boolean indeterminated);
80
        public boolean isIndeterminated();
81
        /**
82
         * Sets if the progress bar associated to monitor
83
         * must draw a complementary text to progress bar
84
         * @param stringDrawed
85
         */
86
        public void setBarStringDrawed(boolean stringDrawed);
87
        /**
88
         * Sets complementary text to progress bar.
89
         * @param barString
90
         */
91
        public void setBarString(String barString);
92
        /**
93
         * Set main text of GUI component
94
         * @param text
95
         */
96
        public void setMainTitleLabel(String text);
97
        public void setNote(String note);
98
        /**
99
         * Sends cancel message to monitored task.
100
         *
101
         */
102
        public void cancel();
103
        /**
104
         * Returns if has received cancel message
105
         * @return
106
         */
107
        public boolean isCanceled();
108
        /**
109
         * Says if associated task is running in background
110
         *
111
         */
112
//        public void taskInBackground();
113
        /**
114
         * Closes associated GUI component
115
         *
116
         */
117
        public void close();
118
        /**
119
         * Sets associated gui component visible
120
         *
121
         */
122
        public void open();
123
        
124
}
125