Changeset 8992


Ignore:
Timestamp:
2005-02-10T11:31:41+13:00 (19 years ago)
Author:
mdewsnip
Message:

Changed "Mirror" pane to "Download".

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
1 added
1 deleted
7 edited

Legend:

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

    r8813 r8992  
    241241
    242242        // also check for wget
    243         boolean mirror_workflow = Configuration.get(StaticStrings.WORKFLOW_MIRROR, false);
    244         if (mirror_workflow) {
     243        boolean download_workflow = Configuration.get("workflow.download", false);
     244        if (download_workflow) {
    245245        wget_version_str = StaticStrings.NO_WGET_STR;
    246246        // has the user specified a path?
  • trunk/gli/src/org/greenstone/gatherer/file/WorkspaceTreeModel.java

    r8787 r8992  
    8787    workspace_tree_root.add(FileSystem.getHomeFolderNode());
    8888
    89     // Add the "Downloaded Files" node, if Mirroring is enabled
    90     if (Gatherer.g_man.mirror_pane != null) {
     89    // Add the "Downloaded Files" node, if the Download pane is enabled
     90    if (Gatherer.g_man.download_pane != null) {
    9191        downloaded_files_node = FileSystem.getDownloadedFilesNode();
    9292        workspace_tree_root.add(downloaded_files_node);
  • trunk/gli/src/org/greenstone/gatherer/gems/GEMSPreferences.java

    r8971 r8992  
    5555    static final private Dimension SIZE = new Dimension(640, 345);
    5656
    57     //private EmailField email_field;
    5857    private JButton apply_button;
    5958    private JButton cancel_button;
    6059    private JButton ok_button;
    61 
    62     private JCheckBox use_proxy_checkbox;
    63     private JCheckBox workflow_create;
    64     private JCheckBox workflow_mirror;
    65     private JCheckBox workflow_gather;
    66     private JCheckBox workflow_enrich;
    67     private JCheckBox workflow_design;
    68     private JCheckBox workflow_export;
    6960
    7061    private JComboBox language_combobox;
     
    177168       
    178169    Dictionary.registerText(interface_language_label, "GEMS.Preferences.Selected_Languages_Tooltip");
    179     //email_field = new EmailField(Configuration.getColor("coloring.error_background", false));
    180     //email_field.setText(Configuration.getEmail());
    181     //Dictionary.registerTooltip(email_field, "GEMS.Preferences.Selected_Languages_Tooltip");
    182170
    183171    // Language
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r8813 r8992  
    6767    extends JFrame
    6868    implements ActionListener, ChangeListener {
    69     /** The mirror pane contains controls for mirroring internet sites. */
    70     public MirrorPane mirror_pane = null;
     69    /** The download pane contains controls for downloading internet sites. */
     70    public DownloadPane download_pane = null;
    7171    /** The gather pane is more like a file manager where you drag files from one tree to another. */
    7272    private GatherPane gather_pane = null;
     
    9393    /** The panel within the window that other components are placed on. */
    9494    private JPanel content_pane = null;
    95     /** The dummy export pane. */
    96     private JPanel export_pane = new JPanel();
    9795    /** The last view pane selected. */
    9896    private JPanel previous_pane;
     
    237235    // Help Options.
    238236    // *************
    239     else if(esrc == menu_bar.help_about) {
     237    else if (esrc == menu_bar.help_general) {
     238        HelpFrame.setView("introduction");
     239    }
     240    else if (esrc == menu_bar.help_download) {
     241        HelpFrame.setView("downloadingfiles");
     242    }
     243    else if (esrc == menu_bar.help_gather) {
     244        HelpFrame.setView("collectingfiles");
     245    }
     246    else if (esrc == menu_bar.help_enrich) {
     247        HelpFrame.setView("enrichingacollection");
     248    }
     249    else if (esrc == menu_bar.help_design) {
     250        HelpFrame.setView("designingacollection");
     251    }
     252    else if (esrc == menu_bar.help_create) {
     253        HelpFrame.setView("producingthecollection");
     254    }
     255    else if (esrc == menu_bar.help_about) {
    240256        new AboutDialog(this);
    241257    }
    242     else if(esrc == menu_bar.help_build) {
    243         HelpFrame.setView("producingthecollection");
    244     }
    245     else if(esrc == menu_bar.help_collect) {
    246         HelpFrame.setView("collectingfiles");
    247     }
    248     else if(esrc == menu_bar.help_design) {
    249         HelpFrame.setView("designingacollection");
    250     }
    251     else if(esrc == menu_bar.help_general) {
    252         HelpFrame.setView("introduction");
    253     }
    254     else if(esrc == menu_bar.help_metaedit) {
    255         HelpFrame.setView("enrichingacollection");
    256     }
    257     else if(esrc == menu_bar.help_mirror) {
    258         HelpFrame.setView("downloadingfiles");
    259     }
    260     else if(esrc == menu_bar.help_preview) {
    261         HelpFrame.setView("previewingthecollection");
    262     }
    263258    }
    264259
     
    267262     */
    268263    public void afterDisplay() {
    269     if (mirror_pane != null) {
    270         mirror_pane.afterDisplay();
     264    if (download_pane != null) {
     265        download_pane.afterDisplay();
    271266    }
    272267    enrich_pane.afterDisplay();
     
    330325        tab_pane.setFont(Configuration.getFont("general.font", false));
    331326
    332         if(Configuration.get(StaticStrings.WORKFLOW_MIRROR, true)) {
    333         mirror_pane = new MirrorPane();
    334         tab_pane.addTab("GUI.Mirror", Utility.getImage("mirroring.gif"), mirror_pane);
    335         tab_pane.setEnabledAt(tab_pane.indexOfComponent(mirror_pane), Configuration.get(StaticStrings.WORKFLOW_MIRROR, false));
     327        if(Configuration.get("workflow.download", true)) {
     328        download_pane = new DownloadPane();
     329        tab_pane.addTab("GUI.Download", Utility.getImage("mirroring.gif"), download_pane);
     330        tab_pane.setEnabledAt(tab_pane.indexOfComponent(download_pane), Configuration.get("workflow.download", false));
    336331        }
    337332
     
    355350        tab_pane.addTab("GUI.Design", Utility.getImage("build.gif"), design_pane);
    356351        tab_pane.setEnabledAt(tab_pane.indexOfComponent(design_pane), false);
    357         }
    358 
    359         if(Configuration.get("workflow.export", true)) {
    360         tab_pane.addTab("GUI.Export", Utility.getImage("export.gif"), export_pane);
    361         tab_pane.setEnabledAt(tab_pane.indexOfComponent(export_pane), false);
    362352        }
    363353
     
    442432    public void lockCollection(boolean import_stage, boolean lock) {
    443433    locked = lock;
    444     if(import_stage) {
    445         int collection_pos = tab_pane.indexOfComponent(gather_pane);
    446         int metaedit_pos = tab_pane.indexOfComponent(enrich_pane);
    447         int config_pos = tab_pane.indexOfComponent(design_pane);
    448         tab_pane.setEnabledAt(collection_pos, !lock);
    449         tab_pane.setEnabledAt(metaedit_pos, !lock);
    450         tab_pane.setEnabledAt(config_pos, !lock);
     434    if (import_stage) {
     435        int gather_pos = tab_pane.indexOfComponent(gather_pane);
     436        int enrich_pos = tab_pane.indexOfComponent(enrich_pane);
     437        int design_pos = tab_pane.indexOfComponent(design_pane);
     438        tab_pane.setEnabledAt(gather_pos, !lock);
     439        tab_pane.setEnabledAt(enrich_pos, !lock);
     440        tab_pane.setEnabledAt(design_pos, !lock);
    451441    }
    452442    else {
    453         int config_pos = tab_pane.indexOfComponent(design_pane);
    454         tab_pane.setEnabledAt(config_pos, !lock);
     443        int design_pos = tab_pane.indexOfComponent(design_pane);
     444        tab_pane.setEnabledAt(design_pos, !lock);
    455445    }
    456446    }
     
    470460    collection_name = null;
    471461    // Now pass on the message to anyone who cares
    472     if(gather_pane != null) {
     462    if (download_pane != null) {
     463        download_pane.modeChanged(mode);
     464    }
     465    if (gather_pane != null) {
    473466        gather_pane.modeChanged(mode);
    474467    }
    475     if(design_pane != null) {
     468    if (enrich_pane != null) {
     469        enrich_pane.modeChanged(mode);
     470    }
     471    if (design_pane != null) {
    476472        design_pane.modeChanged(mode);
    477473    }
    478     if(create_pane != null) {
     474    if (create_pane != null) {
    479475        create_pane.modeChanged(mode);
    480     }
    481     if(enrich_pane != null) {
    482         enrich_pane.modeChanged(mode);
    483     }
    484     if (mirror_pane != null) {
    485         mirror_pane.modeChanged(mode);
    486476    }
    487477    }
     
    503493
    504494    // Update the loaded panes
    505     if (mirror_pane != null) {
    506         mirror_pane.refresh(refresh_reason, collection_loaded);
     495    if (download_pane != null) {
     496        download_pane.refresh(refresh_reason, collection_loaded);
    507497    }
    508498    if (gather_pane != null) {
     
    566556        // Some tabs are also dependant on if a collection is ready
    567557        Component component = tab_pane.getComponentAt(index);
    568         if(component == enrich_pane || component == design_pane || component == export_pane || component == create_pane) {
     558        if(component == enrich_pane || component == design_pane || component == create_pane) {
    569559        tab_pane.setEnabledAt(index, state && Gatherer.c_man != null && Gatherer.c_man.ready());
    570560        }
     
    586576        }
    587577        }
    588     }
    589     // If the rawname was mirror then rebuild workspace tree to remove caches.
    590     if (rawname.equals("Mirror")) {
    591         // gather_pane.refreshWorkspaceTree(WorkspaceTree.FOLDER_SHORTCUTS_CHANGED);
    592578    }
    593579    }
     
    754740    menu_bar.tabSelected(tab_pane.getSelectedIndex());
    755741    int selected_index = tab_pane.getSelectedIndex();
    756     if (selected_index == tab_pane.indexOfComponent(mirror_pane)) {
    757         mirror_pane.gainFocus();
     742    if (selected_index == tab_pane.indexOfComponent(download_pane)) {
     743        download_pane.gainFocus();
    758744    }
    759745    else if (selected_index == tab_pane.indexOfComponent(gather_pane)) {
     
    781767    pane.updateUI();
    782768    // Also update all of the tabs according to workflow.
    783     workflowUpdate("Mirror", Configuration.get("workflow.mirror", false));
     769    workflowUpdate("Download", Configuration.get("workflow.download", false));
    784770    workflowUpdate("Gather", Configuration.get("workflow.gather", false));
    785771    workflowUpdate("Enrich", Configuration.get("workflow.enrich", false));
    786772    workflowUpdate("Design", Configuration.get("workflow.design", false));
    787     workflowUpdate("Export", Configuration.get("workflow.export", false));
    788773    workflowUpdate("Create", Configuration.get("workflow.create", false));
    789774    }
     
    852837    implements Runnable {
    853838    private boolean ready = false;
    854     private int mirror_pos = -1;
     839    private int download_pos = -1;
    855840    private int enrich_pos = -1;
    856841    private int design_pos = -1;
     
    862847        this.ready = ready;
    863848        this.tab_pane = tab_pane;
    864         mirror_pos = tab_pane.indexOfComponent(mirror_pane);
     849        download_pos = tab_pane.indexOfComponent(download_pane);
    865850        enrich_pos = tab_pane.indexOfComponent(enrich_pane);
    866851        design_pos = tab_pane.indexOfComponent(design_pane);
    867852        create_pos = tab_pane.indexOfComponent(create_pane);
    868         export_pos = tab_pane.indexOfComponent(export_pane);
    869853    }
    870854
    871855    public void run()
    872856    {
    873         if (mirror_pos != -1) {
     857        if (download_pos != -1) {
    874858        if (ready) {
    875             tab_pane.setEnabledAt(mirror_pos, Configuration.get("workflow.mirror", false));
     859            tab_pane.setEnabledAt(download_pos, Configuration.get("workflow.download", false));
    876860        }
    877861        else {
    878             tab_pane.setEnabledAt(mirror_pos, Configuration.get("workflow.mirror", true));
     862            tab_pane.setEnabledAt(download_pos, Configuration.get("workflow.download", true));
    879863        }
    880864        }
     
    887871        if (create_pos != -1) {
    888872        tab_pane.setEnabledAt(create_pos, ready && Configuration.get("workflow.create", false));
    889         }
    890         if (export_pos != -1) {
    891         tab_pane.setEnabledAt(export_pos, ready && Configuration.get("workflow.export", false));
    892873        }
    893874    }
  • trunk/gli/src/org/greenstone/gatherer/gui/MenuBar.java

    r8588 r8992  
    7070    public JMenuItem edit_cut;
    7171    public JMenuItem edit_paste;
     72    public JMenuItem help_general;
     73    public JMenuItem help_download;
     74    public JMenuItem help_gather;
     75    public JMenuItem help_enrich;
     76    public JMenuItem help_design;
     77    public JMenuItem help_create;
    7278    public JMenuItem help_about;
    73     public JMenuItem help_browse;
    74     public JMenuItem help_build;
    75     public JMenuItem help_collect;
    76     public JMenuItem help_design;
    77     public JMenuItem help_export;
    78     public JMenuItem help_general;
    79     public JMenuItem help_metaedit;
    80     public JMenuItem help_mirror ;
    81     public JMenuItem help_preview;
     79
    8280
    8381    public MenuBar(MenuListener menu_listener)
     
    178176    Dictionary.setText(help, "Menu.Help");
    179177
     178    help_general = new JMenuItem();
     179    help_general.addActionListener(Gatherer.g_man);
     180    Dictionary.registerText(help_general, "Source.General");
     181
     182    help_download = new JMenuItem(Utility.BLANK_ICON);
     183    help_download.addActionListener(Gatherer.g_man);
     184    Dictionary.registerText(help_download, "GUI.Download");
     185
     186    help_gather = new JMenuItem(Utility.BLANK_ICON);
     187    help_gather.addActionListener(Gatherer.g_man);
     188    Dictionary.registerText(help_gather, "GUI.Gather");
     189
     190    help_enrich = new JMenuItem(Utility.BLANK_ICON);
     191    help_enrich.addActionListener(Gatherer.g_man);
     192    Dictionary.registerText(help_enrich, "GUI.Enrich");
     193
     194    help_design = new JMenuItem(Utility.BLANK_ICON);
     195    help_design.addActionListener(Gatherer.g_man);
     196    Dictionary.registerText(help_design, "GUI.Design");
     197
     198    help_create = new JMenuItem(Utility.BLANK_ICON);
     199    help_create.addActionListener(Gatherer.g_man);
     200    Dictionary.registerText(help_create, "GUI.Create");
     201
    180202    help_about = new JMenuItem();
    181203    help_about.addActionListener(Gatherer.g_man);
    182204    Dictionary.registerText(help_about, "Menu.Help_About");
    183205
    184     help_browse = new JMenuItem(Utility.BLANK_ICON);
    185     help_browse.addActionListener(Gatherer.g_man);
    186     Dictionary.registerText(help_browse, "GUI.Hunt");
    187 
    188     help_build = new JMenuItem(Utility.BLANK_ICON);
    189     help_build.addActionListener(Gatherer.g_man);
    190     Dictionary.registerText(help_build, "GUI.Create");
    191 
    192     help_collect = new JMenuItem(Utility.BLANK_ICON);
    193     help_collect.addActionListener(Gatherer.g_man);
    194     Dictionary.registerText(help_collect, "GUI.Gather");
    195 
    196     help_design = new JMenuItem(Utility.BLANK_ICON);
    197     help_design.addActionListener(Gatherer.g_man);
    198     Dictionary.registerText(help_design, "GUI.Design");
    199 
    200     help_export = new JMenuItem(Utility.BLANK_ICON);
    201     help_export.addActionListener(Gatherer.g_man);
    202     Dictionary.registerText(help_export, "GUI.Export");
    203 
    204     help_general = new JMenuItem();
    205     help_general.addActionListener(Gatherer.g_man);
    206     Dictionary.registerText(help_general, "Source.General");
    207 
    208     help_metaedit = new JMenuItem(Utility.BLANK_ICON);
    209     help_metaedit.addActionListener(Gatherer.g_man);
    210     Dictionary.registerText(help_metaedit, "GUI.Enrich");
    211 
    212     help_mirror = new JMenuItem(Utility.BLANK_ICON);
    213     help_mirror.addActionListener(Gatherer.g_man);
    214     Dictionary.registerText(help_mirror, "GUI.Mirror");
    215 
    216     help_preview = new JMenuItem(Utility.BLANK_ICON);
    217     help_preview.addActionListener(Gatherer.g_man);
    218     Dictionary.registerText(help_preview, "GUI.Preview");
    219 
    220206    // Layout (help menu)
    221207    help.add(help_general);
    222208    help.add(new JSeparator());
    223     if (Configuration.get("workflow.browse", true)) {
    224         help.add(help_browse);
    225     }
    226     if (Configuration.get("workflow.mirror", true)) {
    227         help.add(help_mirror);
     209    if (Configuration.get("workflow.download", true)) {
     210        help.add(help_download);
    228211    }
    229212    if (Configuration.get("workflow.gather", true)) {
    230         help.add(help_collect);
     213        help.add(help_gather);
    231214    }
    232215    if (Configuration.get("workflow.enrich", true)) {
    233         help.add(help_metaedit);
     216        help.add(help_enrich);
    234217    }
    235218    if (Configuration.get("workflow.design", true)) {
    236219        help.add(help_design);
    237220    }
    238     if (Configuration.get("workflow.export", true)) {
    239         help.add(help_export);
    240     }
    241221    if (Configuration.get("workflow.create", true)) {
    242         help.add(help_build);
    243     }
    244     if (Configuration.get("workflow.preview", true)) {
    245         help.add(help_preview);
     222        help.add(help_create);
    246223    }
    247224    help.add(new JSeparator());
     
    291268    selected = null;
    292269    }
    293 
    294 
    295 //     public class MagicMenuItem
    296 //  extends JMenuItem {
    297 
    298 //  private boolean can_enable;
    299 //  private boolean should_enable;
    300 
    301 //  public MagicMenuItem(String title, int key_event) {
    302 //      super(title, key_event);
    303 //      super.setEnabled(false);
    304 //      can_enable = false;
    305 //      should_enable = false;
    306 //  }
    307 
    308 //  public void setCanEnable(boolean can_enable) {
    309 //      this.can_enable = can_enable;
    310 //      if (can_enable) {
    311 //      super.setEnabled(should_enable);
    312 //      }
    313 //      else {
    314 //      super.setEnabled(false);
    315 //      }
    316 //  }
    317 
    318 //  public void setEnabled(boolean should_enable) {
    319 //      this.should_enable = should_enable;
    320 //      if (can_enable) {
    321 //      super.setEnabled(should_enable);
    322 //      }
    323 //  }
    324 //     }
    325270}
  • trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java

    r8884 r8992  
    6969    private JCheckBox use_proxy_checkbox;
    7070    private JCheckBox view_extracted_metadata_checkbox;
    71     private JCheckBox workflow_mirror;
     71    private JCheckBox workflow_download;
    7272    private JCheckBox workflow_gather;
    7373    private JCheckBox workflow_enrich;
     
    533533    Dictionary.registerText(title_label, "Preferences.Workflow.Title");
    534534
    535     workflow_mirror = new JCheckBox();
    536     workflow_mirror.setSelected(Configuration.get("workflow.mirror", false));
    537     workflow_mirror.setPreferredSize(ROW_SIZE);
    538     Dictionary.registerText(workflow_mirror, "Preferences.Workflow.Mirror");
     535    workflow_download = new JCheckBox();
     536    workflow_download.setSelected(Configuration.get("workflow.download", false));
     537    workflow_download.setPreferredSize(ROW_SIZE);
     538    Dictionary.registerText(workflow_download, "Preferences.Workflow.Download");
    539539
    540540    workflow_gather = new JCheckBox();
     
    569569    checklist_pane.setLayout(new BoxLayout(checklist_pane, BoxLayout.Y_AXIS));
    570570    checklist_pane.add(title_label);
    571     if (Configuration.get("workflow.mirror", true)) {
    572         checklist_pane.add(workflow_mirror);
     571    if (Configuration.get("workflow.download", true)) {
     572        checklist_pane.add(workflow_download);
    573573    }
    574574    if (Configuration.get("workflow.gather", true)) {
     
    696696
    697697        // Workflow preferences
    698         Configuration.set("workflow.mirror", false, workflow_mirror.isSelected());
     698        Configuration.set("workflow.download", false, workflow_download.isSelected());
    699699        Configuration.set("workflow.gather", false, workflow_gather.isSelected());
    700700        Configuration.set("workflow.enrich", false, workflow_enrich.isSelected());
    701701        Configuration.set("workflow.design", false, workflow_design.isSelected());
    702702        Configuration.set("workflow.create", false, workflow_create.isSelected());
    703         Gatherer.g_man.workflowUpdate("Mirror", workflow_mirror.isSelected());
     703        Gatherer.g_man.workflowUpdate("Download", workflow_download.isSelected());
    704704        Gatherer.g_man.workflowUpdate("Gather", workflow_gather.isSelected());
    705705        Gatherer.g_man.workflowUpdate("Enrich", workflow_enrich.isSelected());
     
    795795        }
    796796        public void run() {
    797         workflow_mirror.setSelected(element.getEnabled("mirror"));
     797        workflow_download.setSelected(element.getEnabled("download"));
    798798        workflow_gather.setSelected(element.getEnabled("gather"));
    799799        workflow_enrich.setSelected(element.getEnabled("enrich"));
  • trunk/gli/src/org/greenstone/gatherer/util/StaticStrings.java

    r8978 r8992  
    242242    static final public String WIN_9X_OPEN_COMMAND                        = "command.com /c start \"%1\"";
    243243    static final public String WIN_OPEN_COMMAND                           = "cmd.exe /c start \"\" \"%1\"";
    244     static final public String WORKFLOW_MIRROR                            = "workflow.mirror";
    245244    static final public String YES_STR                                    = "yes";
    246245    static final public String ZERO_CHARACTER                             = "0";
Note: See TracChangeset for help on using the changeset viewer.