/** * Create a JHelp with a JHelpContentViewer and all Navigators * requested in the HelpSet. * * @param hs The HelpSet. If hs is null the JHelp is created with a * TextHelpModel with no HelpSet. */ public JHelp(HelpSet hs) { this(new DefaultHelpModel(hs), null, hs==null? null : hs.getDefaultPresentation()); }
/** * 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; }
/** * create a new Popup for a given HelpSet and HelpSet.Presentation * "name". If the "name"d HelpSet.Presentation does not exist in the * HelpSet then the defaultHelpSet.Presentation if used. * * @param hs The HelpSEt used in this presentation * @param name The name of the HelpSet.Presentation to use * @returns Presentation A Popup. */ static public Presentation getPresentation(HelpSet hs, String name) { Popup thePopup = new Popup(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. thePopup.setHelpSetPresentation(presentation); } return thePopup; }
hsPres = getPresentation(presentationName); } else { hsPres = getDefaultPresentation();
presentation = hs.getDefaultPresentation();