Package javax.help.Map

Examples of javax.help.Map.ID


            return null;
        }
        FavoritesItem item = (FavoritesItem) node.getUserObject();
        Map.ID  itemID = (Map.ID) dataMap.get(item);
        if (itemID != null) {
            ID testID = itemID;
            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


        FavoritesItem favItem = (FavoritesItem) node.getUserObject();
        // need to normalize this item so it looks like a real TreeItem
        try {
      String target = favItem.getTarget();
      if (target != null) {
          ID id = Map.ID.create(favItem.getTarget(), hs);
          favItem.setID(id);
      }
        } catch (BadIDException ee) {
        }
        items[i] = (TreeItem) favItem;
View Full Code Here

        // This doesn't seem right. But I'm not sure what to do for now
        return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
    }
   
    public void idChanged(HelpModelEvent e) {
        ID id = e.getID();
        URL url = e.getURL();
        TextHelpModel model = theViewer.getModel();
        debug("idChanged("+e+")");
        debug("  = " + id + " " + url);
        debug("  my helpModel: "+model);
View Full Code Here

                    //in case there is an anchor append it to the title
                    if(anchor != null)
                        title = title + "-" + anchor;
                    TextHelpModel model = theViewer.getModel();
                    model.setDocumentTitle(title);
                    ID id = model.getHelpSet().getCombinedMap().getIDFromURL(url);
                    if (id != null) {
                        try {
                            model.setCurrentID(id,title, (JHelpNavigator)null);
                        } catch (InvalidHelpSetContextException ex) {
                            model.setCurrentURL(url, title,(JHelpNavigator)null);
View Full Code Here

      setForeground(getTextNonSelectionColor());
  }

  ImageIcon icon = null;
  if (item != null) {
      ID id = item.getImageID();
      if (id != null) {
    try {
        URL url = map.getURLFromID(id);
        icon = new ImageIcon(url);
    } catch (Exception e) {
View Full Code Here

    }

    public Icon getLeafIcon() {
  Icon icon = null;
  if (view != null) {
      ID id = view.getTopicImageID();
      if (id != null) {
    try {
        URL url = map.getURLFromID(id);
        icon = new ImageIcon(url);
        return icon;
View Full Code Here

    }

    public Icon getOpenIcon() {
  Icon icon = null;
  if (view != null) {
      ID id = view.getCategoryOpenImageID();
      if (id != null) {
    try {
        URL url = map.getURLFromID(id);
        icon = new ImageIcon(url);
        return icon;
View Full Code Here

    }

    public Icon getClosedIcon() {
  Icon icon = null;
  if (view != null) {
      ID id = view.getCategoryClosedImageID();
      if (id != null) {
    try {
        URL url = map.getURLFromID(id);
        icon = new ImageIcon(url);
        return icon;
View Full Code Here

    }

    // Process and idChanged event
   
    public void idChanged(HelpModelEvent e) {
        ID id = e.getID();
        HelpModel helpModel = glossary.getModel();
        debug("idChanged("+e+")");
       
        if (e.getSource() != helpModel) {
            System.err.println("Internal inconsistency!");
            System.err.println("  "+e.getSource()+" != "+helpModel);
            throw new Error("Internal error");
        }
       
        if (id == null) {
            //return;
        }
        TreePath s = tree.getSelectionPath();
        if (s != null) {
            Object o = s.getLastPathComponent();
            // should require only a TreeNode
            if (o instanceof DefaultMutableTreeNode) {
                DefaultMutableTreeNode tn = (DefaultMutableTreeNode) o;
                IndexItem item = (IndexItem) 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;
        }
        IndexItem item = (IndexItem) 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

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.