Package javax.help.Map

Examples of javax.help.Map.ID


     */
    private String getMapID(SearchTOCItem item) {
  URL url = item.getURL();
  HelpSet hs = hb.getHelpSet();
  Map map = hs.getCombinedMap();
  ID id = map.getIDFromURL(url);
  if (id == null) {
      return "";
  }
  return id.id;
    }
View Full Code Here


     *
     * returns empty String if no content exists.
     */
    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);
View Full Code Here

     * the highlighting doesn't occur unless selected from the search
     * navigator.
     */

    public void idChanged(HelpModelEvent e) {
   ID id = e.getID();
  URL url = e.getURL();
  HelpModel helpModel = searchnav.getModel();
  debug("idChanged("+e+")");

  if (e.getSource() != helpModel) {
      debug("Internal inconsistency!");
      debug("  "+e.getSource()+" != "+helpModel);
      throw new Error("Internal error");
  }

  TreePath s = tree.getSelectionPath();
  if (s != null) {
      Object o = s.getLastPathComponent();
      // should require only a TreeNode
      if (o instanceof DefaultMutableTreeNode) {
    DefaultMutableTreeNode tn = (DefaultMutableTreeNode) o;
    SearchTOCItem item = (SearchTOCItem) tn.getUserObject();
    if (item != null) {
        ID nId = item.getID();
        if (nId != null && nId.equals(id)) {
      return;
        }
    }
      }
  }
View Full Code Here

    private DefaultMutableTreeNode findIDorURL(DefaultMutableTreeNode node,
                 ID id, URL url) {
  SearchTOCItem item = (SearchTOCItem) node.getUserObject();
  if (item != null) {
      ID testID = item.getID();
      if (testID != null && id != null && testID.equals(id)) {
    return node;
      } else {
    URL testURL = item.getURL();
    if (testURL != null && url != null && url.sameFile(testURL)) {
        return node;
View Full Code Here

  }

  Map map = helpset.getCombinedMap();
  currentID = ident;
  try {
      ID tmpID = ident;
      URL url;
      if (hs == helpset) {
    url = map.getURLFromID(ident);
      } else {
    Map hsmap = hs.getLocalMap();
View Full Code Here

            if (currentID != null) {
                currentID = null;
                fire = true;
            }
        } else {
            ID id = helpset.getCombinedMap().getIDFromURL(currentURL);
            if (currentID == null) {
                if (currentID != id) {
                    currentID = id;
                    fire = true;
                }
View Full Code Here

     
  setVisibility(topNode);

     
  if (toc.getModel() != null) {
      ID id = toc.getModel().getCurrentID();
      if (id != null) {
    DefaultMutableTreeNode selectedNode = findID(topNode, id);
    selectNode(selectedNode);
      }
  }
View Full Code Here

    /**
     * Processes an idChanged event.
     */

    public synchronized void idChanged(HelpModelEvent e) {
   ID id = e.getID();
  HelpModel helpModel = toc.getModel();
  debug("idChanged("+e+")");

  if (e.getSource() != helpModel) {
      debug("Internal inconsistency!");
      debug("  "+e.getSource()+" != "+helpModel);
      throw new Error("Internal error");
  }

  if (id == null) {
      id = helpModel.getHelpSet().getCombinedMap().getClosestID(e.getURL());
  }
  TreePath s = tree.getSelectionPath();
  if (s != null) {
      Object o = s.getLastPathComponent();
      // should require only a TreeNode
      if (o instanceof DefaultMutableTreeNode) {
    DefaultMutableTreeNode tn = (DefaultMutableTreeNode) o;
    TOCItem item = (TOCItem) tn.getUserObject();
    if (item != null) {
        ID nId = item.getID();
        if (nId != null && nId.equals(id)) {
      return;
        }
    }
      }
  }
View Full Code Here

  if (id == null) {
      return null;
  }
  TOCItem item = (TOCItem) node.getUserObject();
  if (item != null) {
      ID testID = item.getID();
      debug("  testID: "+testID);
      if (testID != null && testID.equals(id)) {
    return node;
      }
  }
  int size = node.getChildCount();
  for (int i=0; i<size ; i++) {
View Full Code Here

     *
     * returns an empty String if no content exists.
     */
    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);
View Full Code Here

TOP

Related Classes of javax.help.Map.ID

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.