Changeset 11073

Show
Ignore:
Timestamp:
20.01.2006 10:52:24 (14 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).

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
1 added
1 removed
2 modified

Legend:

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

    r10726 r11073  
    4242import org.greenstone.gatherer.Gatherer; 
    4343import org.greenstone.gatherer.collection.CollectionTreeNode; 
    44 import org.greenstone.gatherer.gui.LongProgressBar; 
     44import org.greenstone.gatherer.gui.GProgressBar; 
    4545import org.greenstone.gatherer.gui.NewFolderOrFilePrompt; 
    4646import org.greenstone.gatherer.gui.tree.DragTree; 
     
    161161    { 
    162162        // Reset the progress bar and set it to indeterminate while calculating its size 
    163         LongProgressBar progress_bar = file_queue.getProgressBar(); 
     163        GProgressBar progress_bar = file_queue.getProgressBar(); 
    164164        progress_bar.reset(); 
    165165        progress_bar.setIndeterminate(true); 
  • 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()) {