/** * Initializes the presentation. * This method allows the presentation to be initialized but not displayed. * Typically this would be done in a separate thread to reduce the * intialization time. */ public void initPresentation() { mw.createHelpWindow(); }
/** * Determines which ID is displayed (if any). */ public ID getCurrentID() { return mw.getCurrentID(); }
/** * Determines which URL is displayed. */ public URL getCurrentURL() { return mw.getCurrentURL(); }
/** * Creates a new MainWindow for a given HelpSet and * HelpSet.Presentation "name". If the "name"d HelpSet.Presentation * does not exist in HelpSet then the default HelpSet.Presentation * is used. * * @param hs The HelpSet used in this presentation * @param name The name of the Presentation to create - also the name * of the HelpSet.Presentation to use. * @returns Presentation A unique MainWindow. */ static public Presentation getPresentation(HelpSet hs, String name) { MainWindow mwp = new MainWindow(hs); if (hs != null) { HelpSet.Presentation presentation = null; // get a named presentation if one exists if (name != null) { presentation = hs.getPresentation(name); } // get the default presentation if one exits if (presentation == null) { presentation = hs.getDefaultPresentation(); } // set the presentation // a null is ok here as it will just return. mwp.setHelpSetPresentation(presentation); } return mwp; }
/** * Returns the default HelpSet */ public HelpSet getHelpSet() { return mw.getHelpSet(); }
/** * Zero-argument constructor. * It should be followed by a setHelpSet() invocation. */ public DefaultHelpBroker() { mw = (MainWindow) MainWindow.getPresentation(null, null); }
/** * Gets the font for this HelpBroker. */ public Font getFont () { return mw.getFont(); }
/** * Requests the location of the presentation. * @returns Point the location of the presentation. */ public Point getLocation() { return mw.getLocation(); }
/** * Gets the locale of this component. * @return This component's locale. If this component does not * have a locale, the defaultLocale is returned. * @see #setLocale */ public Locale getLocale() { return mw.getLocale(); }
/** * Determines the current navigator. */ public String getCurrentView() { return mw.getCurrentView(); }
Presentation pres; HelpSet hs = mw.getHelpSet();
/** * Constructor */ public DefaultHelpBroker(HelpSet hs) { mw = (MainWindow) MainWindow.getPresentation(hs, null); }