Changeset 8258


Ignore:
Timestamp:
2004-10-08T16:18:18+13:00 (20 years ago)
Author:
mdewsnip
Message:

Made HelpFrame.setView static to remove another Gatherer class dependency.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
3 edited

Legend:

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

    r8256 r8258  
    8787
    8888    /** A reference to the currently instantiated help window, if any. */
    89     public HelpFrame help = null;
     89    private HelpFrame help = null;
    9090    /** The menu bar. */
    9191    public MenuBar menu_bar = null;
     
    278278    }
    279279    else if(esrc == menu_bar.help_build) {
    280         help.setView("producingthecollection");
     280        HelpFrame.setView("producingthecollection");
    281281    }
    282282    else if(esrc == menu_bar.help_collect) {
    283         help.setView("collectingfiles");
     283        HelpFrame.setView("collectingfiles");
    284284    }
    285285    else if(esrc == menu_bar.help_design) {
    286         help.setView("designingacollection");
     286        HelpFrame.setView("designingacollection");
    287287    }
    288288    else if(esrc == menu_bar.help_general) {
    289         help.setView("introduction");
     289        HelpFrame.setView("introduction");
    290290    }
    291291    else if(esrc == menu_bar.help_metaedit) {
    292         help.setView("enrichingacollection");
     292        HelpFrame.setView("enrichingacollection");
    293293    }
    294294    else if(esrc == menu_bar.help_mirror) {
    295         help.setView("downloadingfiles");
     295        HelpFrame.setView("downloadingfiles");
    296296    }
    297297    else if(esrc == menu_bar.help_preview) {
    298         help.setView("previewingthecollection");
     298        HelpFrame.setView("previewingthecollection");
    299299    }
    300300    }
  • trunk/gli/src/org/greenstone/gatherer/gui/SimpleMenuBar.java

    r8238 r8258  
    55import javax.swing.*;
    66import org.greenstone.gatherer.Dictionary;
    7 import org.greenstone.gatherer.Gatherer;
     7import org.greenstone.gatherer.help.HelpFrame;
    88import org.greenstone.gatherer.util.Utility;
    99
     
    2929    add(help);
    3030    }
    31      
     31
    3232    public void actionPerformed(ActionEvent event) {
    33     Gatherer.g_man.help.setView(page_name);
     33    HelpFrame.setView(page_name);
    3434    }
    3535}
  • trunk/gli/src/org/greenstone/gatherer/help/HelpFrame.java

    r8236 r8258  
    6363    static private final Dimension SIZE = new Dimension(760, 560);
    6464
     65    static private HelpFrame self = null;
     66
    6567    /** The HTML rendering pane */
    6668    private JEditorPane view = null;
     
    108110    // Pretty corner icon
    109111    this.setIconImage(Utility.getImage("gatherer_small.gif").getImage());
    110          
     112
     113    self = this;
    111114    }
    112115
     
    132135
    133136
    134     public void setView(String sectionName)
     137    static public void setView(String section_name)
     138    {
     139    self.setViewInternal(section_name);
     140    }
     141
     142
     143    public void setViewInternal(String sectionName)
    135144    {
    136145    // Find the node in the tree with the specified sectionName
Note: See TracChangeset for help on using the changeset viewer.