Package javax.help

Examples of javax.help.HelpBroker


     * @param helpURL
     */
    public static void createHelp(JFrame frame, URL helpURL){
        ClassLoader loader = frame.getClass().getClassLoader();
        HelpSet hs;
        HelpBroker hb;
        try {
            hs = new HelpSet(loader, helpURL);
            hb = hs.createHelpBroker();
            hb.enableHelpKey(frame.getRootPane(), "Frame", hs);
            frame.getRootPane().putClientProperty("qq_HelpSet", hs);
            frame.getRootPane().putClientProperty("qq_HelpBroker", hb);
        }
        catch (Exception ex) {
            if (ex instanceof HelpSetException){
View Full Code Here


     * @param helpURL
     */
    public static void createHelp(JFrame frame, URL helpURL){
        ClassLoader loader = frame.getClass().getClassLoader();
        HelpSet hs;
        HelpBroker hb;
        try {
            hs = new HelpSet(loader, helpURL);
            hb = hs.createHelpBroker();
            hb.enableHelpKey(frame.getRootPane(), "Frame", hs);
            frame.getRootPane().putClientProperty("qq_HelpSet", hs);
            frame.getRootPane().putClientProperty("qq_HelpBroker", hb);
        }
        catch (Exception ex) {
            if (ex instanceof HelpSetException){
View Full Code Here

    final String helpHS = "org/freeplane/plugin/help/doc/freeplane.hs";
    try {
      final ClassLoader classLoader = this.getClass().getClassLoader();
      final URL hsURL = HelpSet.findHelpSet(classLoader, helpHS);
      final HelpSet hs = new HelpSet(classLoader, hsURL);
      final HelpBroker hb = hs.createHelpBroker();
      hb.initPresentation();
      hb.setDisplayed(true);
      hb.setViewDisplayed(true);
    }
    catch (final Exception ee) {
      LogUtils.severe("HelpSet " + helpHS + " not found", ee);
      return;
    }
View Full Code Here

    private void initHelp() {
        try {
            URL url = getClass().getResource("/help/jhelpset.hs");
            if (url == null) throw new NullPointerException("The help set could not be found");
            HelpSet helpSet = new HelpSet(null, url);
            HelpBroker helpBroker = helpSet.createHelpBroker();
            contentsMenuItem.addActionListener(new CSH.DisplayHelpFromSource(helpBroker));
            helpBroker.enableHelpKey(getRootPane(), "about", helpSet);        // for F1
        } catch (Throwable e) {
            final String[] message;
            if (e instanceof NullPointerException) {
                message = new String[] { "Help set not found" };
            } else if (e instanceof NoClassDefFoundError) {
View Full Code Here

    private void initHelp() {
        try {
            URL url = getClass().getResource("/help/jhelpset.hs");
            if (url == null) throw new NullPointerException("The help set could not be found");
            HelpSet helpSet = new HelpSet(null, url);
            HelpBroker helpBroker = helpSet.createHelpBroker();
            contentsMenuItem.addActionListener(new CSH.DisplayHelpFromSource(helpBroker));
            helpBroker.enableHelpKey(getRootPane(), "about", helpSet);        // for F1
        } catch (Throwable e) {
            final String[] message;
            if (e instanceof NullPointerException) {
                message = new String[] { "Help set not found" };
            } else if (e instanceof NoClassDefFoundError) {
View Full Code Here

    MZmineHelpSet hs = help.getHelpSet();
    if (hs == null)
      return;

    HelpBroker hb = hs.createHelpBroker();
    hs.setHomeID(aboutHelpID);

    hb.setDisplayed(true);
  }
View Full Code Here

    if (!map.isValidID(helpID, hs)) {
      setEnabled(false);
      return;
    }

    HelpBroker hb = hs.createHelpBroker();
    hs.setHomeID(helpID);

    this.addActionListener(new CSH.DisplayHelpFromSource(hb));

  }
View Full Code Here

        // 1. create HelpSet and HelpBroker objects
        try {
            SwingHelpUtilities.setContentViewerUI("uk.gov.nationalarchives.droid.gui.help.ExternalLinkContentViewerUI");

            HelpSet hs = getHelpSet("helpset.hs");
            HelpBroker hb = hs.createHelpBroker();

            // 2. assign help to components
            CSH.setHelpIDString(helpMenuItem, "Welcome to DROID");

            // 3. handle events
View Full Code Here

            final String pathFileHs = "/serveis/help/ButiHelp.hs";
            URL hsURL = Gui.class.getResource(pathFileHs);
            // Creem un objecte HelpSet referenciat
            HelpSet helpSet = new HelpSet(null, hsURL);
            // Creem un objecte HelpBroker referenciat  a paretir del HelpSet
            HelpBroker helpBroker = helpSet.createHelpBroker();
            //En el fitxer Map.jhm emprar el mapID target="Ajuda.Intro"
            final String stringID = "Ajuda.NormesBut";
            // Fem que l'objecte jmiAjuda dispari l'ajuda
            helpBroker.enableHelpOnButton(jmiAjuda, stringID, helpSet);
            // Per obrir l'ajuda amb la tecla de funcio F1
            JRootPane jRootPane = this.getRootPane();
            helpBroker.enableHelpKey(jRootPane, stringID, helpSet);
        } catch (Exception ee) {
            JOptionPane.showMessageDialog(this, "Fitxer HelpSet no trobat: " + ee.toString());
        }
    }
View Full Code Here

            final String pathFileHs = "/serveis/help/ButiHelp.hs";
            URL hsURL = Gui.class.getResource(pathFileHs);
            // Creem un objecte HelpSet referenciat
            HelpSet helpSet = new HelpSet(null, hsURL);
            // Creem un objecte HelpBroker referenciat  a paretir del HelpSet
            HelpBroker helpBroker = helpSet.createHelpBroker();
            //En el fitxer Map.jhm emprar el mapID target="Ajuda.Intro"
            final String stringID = "Ajuda.NormesBut";
            // Fem que l'objecte jmiAjuda dispari l'ajuda
            helpBroker.enableHelpOnButton(jmiAjuda, stringID, helpSet);
            // Per obrir l'ajuda amb la tecla de funcio F1
            JRootPane jRootPane = this.getRootPane();
            helpBroker.enableHelpKey(jRootPane, stringID, helpSet);
        } catch (Exception ee) {
            JOptionPane.showMessageDialog(this, "Fitxer HelpSet no trobat: " + ee.toString());
        }
    }
View Full Code Here

TOP

Related Classes of javax.help.HelpBroker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.