Changeset 6580


Ignore:
Timestamp:
2004-01-22T13:49:23+13:00 (20 years ago)
Author:
jmt12
Message:

Now looks for help files in the right place. Also replaced CalPane with JEditorPane.

File:
1 edited

Legend:

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

    r6565 r6580  
    3737package org.greenstone.gatherer.help;
    3838
    39 import calpa.html.*;
     39//import calpa.html.*;
    4040import java.awt.*;
    4141import java.io.*;
     
    4747import org.apache.xerces.parsers.DOMParser;
    4848import org.greenstone.gatherer.Dictionary;
     49import org.greenstone.gatherer.Gatherer;
    4950import org.greenstone.gatherer.util.StaticStrings;
    5051import org.greenstone.gatherer.util.Utility;
     
    6465
    6566    /** The HTML rendering pane */
    66     private CalHTMLPane view = null;
     67    private JEditorPane view = null;
    6768    /** The contents tree model */
    6869    private ContentsModel model = null;
     
    8081    Dictionary.registerText(this, "Help.Title");
    8182
    82     view = new CalHTMLPane(new CalHTMLPreferences(), new Observer(), "Help Pages");
     83    view = new JEditorPane(); //new CalHTMLPane(new CalHTMLPreferences(), new Observer(), "Help Pages");
    8384
    8485    HelpItem rootNode = new HelpItem(Dictionary.get("Help.Contents"), NULL_STRING);
     
    126127    URL url = node.getURL();
    127128    if (url != null) {
    128         view.showHTMLDocument(url);
     129        //view.showHTMLDocument(url);
     130        try {
     131        view.setPage(url);
     132        }
     133        catch (Exception exception) {
     134        Gatherer.printStackTrace(exception);
     135        }
    129136    }
    130137
     
    144151        try {
    145152        DOMParser parser = new DOMParser();
    146         parser.parse(Utility.getHelpIndex());
     153        parser.parse(Utility.getHelpFolder() + StaticStrings.HELP_INDEX_FILENAME);
    147154        Document document = parser.getDocument();
    148155
     
    229236        URL url = node.getURL();
    230237        if (url != null) {
    231         view.showHTMLDocument(url);
     238        //view.showHTMLDocument(url);
     239        try {
     240            view.setPage(url);
     241        }
     242        catch (Exception exception) {
     243            Gatherer.printStackTrace(exception);
     244        }
    232245        }
    233246    }
     
    265278        if (name != null && !name.equals(NULL_STRING)) {
    266279        try {
    267             File file = new File(Utility.HELP_DIR + name + StaticStrings.HTM_FILE_EXTENSION);
     280            File file = new File(Utility.getHelpFolder() + name + StaticStrings.HTM_FILE_EXTENSION);
    268281            return file.toURL();
    269282        }
     
    286299     * @author John Thompson
    287300     */
     301    /*
    288302    private class Observer
    289303    extends DefaultCalHTMLObserver {
     
    320334    }
    321335    }
     336    */
    322337}
     338
     339
     340
     341
     342
     343
Note: See TracChangeset for help on using the changeset viewer.