Class FileProgressMonitor
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.publication.metadata.FileProgressMonitor
-
public class FileProgressMonitor extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FileProgressMonitor(javax.swing.JProgressBar fileProgressBar, long max)
Constructs a graphic object that shows progress, typically by filling in a rectangular bar as the process nears completion.
-
Method Summary
Modifier and Type Method Description void
close()
Indicate that the operation is complete.long
getMaximum()
Returns the maximum value - the higher end of the progress value.void
setMaximum(int m)
Specifies the maximum value.void
setProgress(long newValue)
Indicate the progress of the operation being monitored.
-
-
-
Constructor Detail
-
FileProgressMonitor
public FileProgressMonitor(javax.swing.JProgressBar fileProgressBar, long max)
Constructs a graphic object that shows progress, typically by filling in a rectangular bar as the process nears completion.- Parameters:
fileProgressBar
- theJProgressBar
to monitormax
- the upper bound of the range
-
-
Method Detail
-
setProgress
public void setProgress(long newValue)
Indicate the progress of the operation being monitored. If the specified value is greater/equal than the maximum, the progress monitor is closed.- Parameters:
newValue
- the value specifying the current value, between the maximum and minimum specified for this component
-
close
public void close()
Indicate that the operation is complete. This happens automatically when the value set by setProgress is greater/equal than max, but it may be called earlier if the operation ends early.
-
getMaximum
public long getMaximum()
Returns the maximum value - the higher end of the progress value.- Returns:
- an int representing the maximum value
- See Also:
setMaximum(int)
-
setMaximum
public void setMaximum(int m)
Specifies the maximum value.- Parameters:
m
- an int specifying the maximum value- See Also:
getMaximum()
-
-