Ignore:
Timestamp:
2006-01-20T10:52:24+13:00 (18 years ago)
Author:
mdewsnip
Message:

Renamed LongProgressBar to GProgressBar, and tidied up a great deal. Removed the BigInteger sillyness and used longs instead, so should be slightly more efficient. This will now be used for all progress bars in the GLI, as it sets indeterminate/string/value safely (should avoid NPEs when setting indeterminate).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r11049 r11073  
    3737import org.greenstone.gatherer.Gatherer;
    3838import org.greenstone.gatherer.collection.CollectionTreeNode;
    39 import org.greenstone.gatherer.gui.LongProgressBar;
     39import org.greenstone.gatherer.gui.GProgressBar;
    4040import org.greenstone.gatherer.gui.tree.DragTree;
    4141import org.greenstone.gatherer.metadata.MetadataValue;
     
    6464    private ArrayList queue = null;
    6565    /** A progress bar which shows how many bytes, out of the total size of bytes, has been moved. */
    66     private LongProgressBar progress = null;
     66    private GProgressBar progress = null;
    6767
    6868
     
    7474    file_status = new JLabel();
    7575    Dictionary.setText(file_status, "FileActions.No_Activity");
    76     progress = new LongProgressBar();
     76    progress = new GProgressBar();
    7777    progress.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    7878    progress.setForeground(Configuration.getColor("coloring.collection_tree_foreground", false));
     
    200200
    201201    /** Access to the progress bar. */
    202     public LongProgressBar getProgressBar() {
     202    public GProgressBar getProgressBar() {
    203203    return progress;
    204204    }
     
    210210     * @see org.greenstone.gatherer.file.FileJob
    211211     * @see org.greenstone.gatherer.file.FileNode
    212      * @see org.greenstone.gatherer.gui.LongProgressBar
     212     * @see org.greenstone.gatherer.gui.GProgressBar
    213213     * @see org.greenstone.gatherer.util.Utility
    214214     */
     
    583583     * @see org.greenstone.gatherer.Gatherer
    584584     */
    585     public void copyDirectoryContents(File source, File destination, LongProgressBar progress)
     585    public void copyDirectoryContents(File source, File destination, GProgressBar progress)
    586586    throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException
    587587    {
     
    610610     * @see org.greenstone.gatherer.Gatherer
    611611     */
    612     public void copyFile(File source, File destination, LongProgressBar progress)
     612    public void copyFile(File source, File destination, GProgressBar progress)
    613613    throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException {
    614614    if(source.isDirectory()) {
Note: See TracChangeset for help on using the changeset viewer.