/** * Visits a given ID. Propagates down into the model. * * @param id The ID to visit. * @exception InvalidHelpSetContextException if id.hs is not contained in the * HelpSet of the current model. */ public void setCurrentID(ID id) throws InvalidHelpSetContextException { model.setCurrentID(id); }
/** * Visits a given ID. Propagates down into the model. * * @param id The ID to visit. Null id is valid for TextHelpModel.setCurrentID. * @exception InvalidHelpSetContextException if id.hs is not contained in getHelpSet() */ public void setCurrentID(ID id) throws InvalidHelpSetContextException { if (helpModel != null) { helpModel.setCurrentID(id); } }
/** * Visits a given ID. Propagates down into the model. * * @param id The ID to visit. Null id is valid for TextHelpModel.setCurrentID. * @param historyName The name for history entry * @param navigator The JHelpNavigator * @exception InvalidHelpSetContextException if id.hs is not contained in getHelpSet() */ public void setCurrentID(ID id, String historyName, JHelpNavigator navigator)throws InvalidHelpSetContextException{ if (helpModel != null) { helpModel.setCurrentID(id,historyName,navigator); } }
/** * Displays this ID--HelpVisitListeners are notified. * * @param id a Map.ID indicating the URL to display * @exception InvalidHelpSetContextException if the current helpset does not contain * id.helpset */ public void setCurrentID(ID id) throws InvalidHelpSetContextException { debug("setCurrentID - ID"); createHelpModel(); model.setCurrentID(id); }
/** * Visits a given ID. Propagates down into the model. * * @param id The String to visit. Relative to the HS of the current model. * @exception BadIDException The ID is not valid for the HelpSet for the current model. */ public void setCurrentID(String id) throws BadIDException { try { model.setCurrentID(ID.create(id, getModel().getHelpSet())); } catch (InvalidHelpSetContextException ex) { // cannot happen } }
/** * Convenience version of the above. The implicit HelpSet is * the current HelpSet. * * @param id The String to visit. Null id is valid for TextHelpModel.setCurrentID. * @exception BadIDException if the string is not in the map for the HelpSet. */ public void setCurrentID(String id) throws BadIDException { try { helpModel.setCurrentID(ID.create(id, getModel().getHelpSet())); } catch (InvalidHelpSetContextException ex) { // cannot happen } }
if (item != null && item.getID() != null) { try { getContentViewer().getModel().setCurrentID(item.getID(), item.getName(), navigator); } catch (InvalidHelpSetContextException ex) { System.err.println("BadID: "+item.getID());
if (id != null) { try { model.setCurrentID(id,title, (JHelpNavigator)null); } catch (InvalidHelpSetContextException ex) { model.setCurrentURL(url, title,(JHelpNavigator)null);
private void rebuild() { debug("rebuild"); TextHelpModel model = theViewer.getModel(); if (model == null) { debug("rebuild-end: model is null"); return; } /** * html future additions * if we were doing any highlighting the highlights would need * to be removed here */ HelpSet hs = model.getHelpSet(); // for glossary - not set homeID page - glossary is not synchronized if(theViewer.getSynch()){ try { Map.ID homeID = hs.getHomeID(); Locale locale = hs.getLocale(); String name = HelpUtilities.getString(locale, "history.homePage"); model.setCurrentID(homeID, name, (JHelpNavigator)null); html.setURL(model.getCurrentURL()); } catch (Exception e) { // ignore } } debug("rebuild-end"); }
private void rebuild() { debug("rebuild"); TextHelpModel model = theViewer.getModel(); if (model == null) { debug("rebuild-end: model is null"); return; } // The model has changed. I'll need to clear the HTML viewer and // put in the home page Highlighter h = html.getHighlighter(); debug("removeAllHighlights"); h.removeAllHighlights(); HelpSet hs = model.getHelpSet(); // for glossary - not set homeID page - glossary is not synchronized if(theViewer.getSynch()){ try { Map.ID homeID = hs.getHomeID(); Locale locale = hs.getLocale(); String name = HelpUtilities.getString(locale, "history.homePage"); model.setCurrentID(homeID, name, (JHelpNavigator)null); html.setPage(model.getCurrentURL()); } catch (Exception e) { // ignore } } debug("rebuild-end"); }