Package javax.help

Examples of javax.help.HelpSet


     */
    private String getIconURL(NavigatorView view) {
  URL url = null;
  ID id = view.getImageID();
  if (id != null) {
      HelpSet hs = id.hs;
      Map map = hs.getLocalMap();
      try {
    url = map.getURLFromID(id);
      } catch (MalformedURLException e) {
    // just ignore
      }
View Full Code Here


      return;
  }
  topNode = view.getDataAsTree();

  String mergeType = view.getMergeType();
  HelpSet hs = view.getHelpSet();
        Locale locale = hs.getLocale();


  // Make sure the children are all handled correctly
  MergeHelpUtilities.mergeNodeChildren(mergeType, topNode);
       
View Full Code Here

     *
     * @param hs The HelpSet which subhelpsets will be added
     */
    private void addSubHelpSets(HelpSet hs){
        for( Enumeration e = hs.getHelpSets(); e.hasMoreElements(); ) {
      HelpSet ehs = (HelpSet) e.nextElement();
      if (ehs == null) {
    continue;
      }
            // merge views
            NavigatorView[] views = ehs.getNavigatorViews();
            for(int i = 0; i < views.length; i++){
    if (views[i] instanceof TOCView) {
        Merge mergeObject =
      Merge.DefaultMergeFactory.getMerge(view, views[i]);
        if (mergeObject != null) {
View Full Code Here

     */
    private String getContentURL(TOCItem item) {
  URL url = null;
  ID id = item.getID();
  if (id != null) {
      HelpSet hs = id.hs;
      Map map = hs.getLocalMap();
      try {
    url = map.getURLFromID(id);
      } catch (MalformedURLException e) {
    // just ignore
      }
View Full Code Here

        id = view.getCategoryOpenImageID();
    }
      }
  }
  if (id != null) {
      HelpSet hs = id.hs;
      Map map = hs.getLocalMap();
      try {
    url = map.getURLFromID(id);
      } catch (MalformedURLException e) {
    // just ignore
      }
View Full Code Here

      id = request.getParameter("id");
  }
    }

    private void validateHelpSet() {
  HelpSet tesths = helpBroker.getHelpSet();

  // If there is already a HelpSet and there isn't a hsName
  // return. Nothing to do
  if (tesths != null && hsName == null) {
      return;
  }

  // If there isn't a HelpSet and there isn't a hsName
  // then forward to the invalid page
  if (tesths == null && hsName == null) {
      try {
    pageContext.forward(invalidURLPath);
      } catch (Exception e) {
    // ignore it
    return;
      }
  }


  // If we don't have a helpset and there is a hsName
  // the create one and set the HelpBroker to this page
  if (tesths == null && hsName != null) {
      helpBroker.setHelpSet(createHelpSet());
      return;
  }

  // If we have a helpset and there is a hsname
  // and merging is turned on, merge the helpset
  if (tesths != null && hsName != null && merge) {
      tesths.add(createHelpSet());
  }
    }
View Full Code Here

      tesths.add(createHelpSet());
  }
    }

    private HelpSet createHelpSet() {
  HelpSet hs = null;
  ServletRequest request = pageContext.getRequest();
  if (!hsName.startsWith("/")) {
      hsName = "/" + hsName;
  }
  URL url = null;
  try {
      if (hsName.startsWith("http")) {
    url = new URL (hsName);
      } else {
    url = new URL(request.getScheme(),
            request.getServerName(),
            request.getServerPort(),
            hsName);
      }
      hs = new HelpSet(null, url);
  } catch (MalformedURLException e) {
      // ignore
  } catch (HelpSetException hse) {
      // this is a serious error
      throw new RuntimeException(hse.getMessage());
View Full Code Here

  }
  topNode = view.getDataAsTree();
  treeEnum = topNode.preorderEnumeration();

  String mergeType = view.getMergeType();
  HelpSet hs = view.getHelpSet();
        Locale locale = hs.getLocale();


  // Make sure the children are all handled correctly
  MergeHelpUtilities.mergeNodeChildren(mergeType, topNode);
       
View Full Code Here

     *
     * @param hs The HelpSet which subhelpsets will be added
     */
    private void addSubHelpSets(HelpSet hs){
        for( Enumeration e = hs.getHelpSets(); e.hasMoreElements(); ) {
      HelpSet ehs = (HelpSet) e.nextElement();
      if (ehs == null) {
    continue;
      }
            // merge views
            NavigatorView[] views = ehs.getNavigatorViews();
            for(int i = 0; i < views.length; i++){
    if (views[i] instanceof IndexView) {
        Merge mergeObject =
      Merge.DefaultMergeFactory.getMerge(view, views[i]);
        if (mergeObject != null) {
View Full Code Here

     */
    private String getContentURL(IndexItem item) {
  URL url = null;
  ID id = item.getID();
  if (id != null) {
      HelpSet hs = id.hs;
      Map map = hs.getLocalMap();
      try {
    url = map.getURLFromID(id);
      } catch (MalformedURLException e) {
    // just ignore
      }
View Full Code Here

TOP

Related Classes of javax.help.HelpSet

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.