Changeset 7924


Ignore:
Timestamp:
2004-08-10T11:25:52+12:00 (20 years ago)
Author:
davidb
Message:

Function added to make it easy to display text on progress bar. For
messages such as "uploading file to server"

Location:
trunk/gli/src/org/greenstone/gatherer/shell
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/shell/GBasicProgressMonitor.java

    r6533 r7924  
    8787    }
    8888
     89    public void messageOnProgressBar(String message)
     90    {
     91    if ((message!=null) & (message!="")) {
     92        setString(message);
     93    }
     94    else {
     95        setString(null);
     96    }
     97    }
     98
     99
    89100    /** Method to determine the state of the stop flag, which may be set by the visual component that created this monitor.
    90101     * @return A <strong>boolean</strong> indicating if the process has been asked to stop.
  • trunk/gli/src/org/greenstone/gatherer/shell/GBuildProgressMonitor.java

    r6533 r7924  
    167167    }
    168168
     169    public void messageOnProgressBar(String message)
     170    {
     171    if ((message!=null) & (message!="")) {
     172        progress_bar.setString(message);
     173        shared_progress_bar.setString(message);
     174    }
     175    else {
     176        progress_bar.setString(null);
     177        shared_progress_bar.setString(null);
     178    }
     179    }
     180
    169181    /** Method to determine the state of the stop flag, which may be set by the visual component that created this monitor.
    170182     * @return A <strong>boolean</strong> indicating if the process has been asked to stop.
  • trunk/gli/src/org/greenstone/gatherer/shell/GImportProgressMonitor.java

    r7552 r7924  
    165165    }
    166166
     167    public void messageOnProgressBar(String message)
     168    {
     169    if ((message!=null) & (message!="")) {
     170        progress_bar.setString(message);
     171        shared_progress_bar.setString(message);
     172        showing_string = true;
     173    }
     174    else {
     175        progress_bar.setString(null);
     176        shared_progress_bar.setString(null);
     177        showing_string = false;
     178    }
     179    }
     180
    167181    /** Method to determine the state of the stop flag, which may be set by the visual component that created this monitor.
    168182     * @return A <strong>boolean</strong> indicating if the process has been asked to stop.
     
    190204    line = line.substring(line.indexOf(StaticStrings.GREATER_THAN_CHARACTER) + 1);
    191205    line = line.trim();
     206    System.err.println("**** line = " + line);
     207
    192208    ///ystem.err.println("Process: " + line);
    193209    if(line.startsWith(StaticStrings.LESS_THAN_CHARACTER) && line.endsWith(StaticStrings.GREATER_THAN_CHARACTER)) {
  • trunk/gli/src/org/greenstone/gatherer/shell/GShellProgressMonitor.java

    r6533 r7924  
    7373    public Component getProgress();
    7474
     75    public void messageOnProgressBar(String message);
     76
    7577    /** Method to determine the state of the stop flag, which may be set by the visual component that created this monitor.
    7678     * @return A <strong>boolean</strong> indicating if the process has been asked to stop.
Note: See TracChangeset for help on using the changeset viewer.