public CutAction(){ super(HelpUtilities.getString(locale,"favorites.cut")); }
public PasteAction(){ super(HelpUtilities.getString(locale,"favorites.paste")); }
public CopyAction(){ super(HelpUtilities.getString(locale,"favorites.copy")); }
/** * Get the Text message for the default locale. * * The getString version does not involve a format. */ static public String getString(String key) { return getString(Locale.getDefault(), key); }
public AddAction(){ super(HelpUtilities.getString(locale, "favorites.add"), SwingHelpUtilities.getImageIcon(BasicFavoritesNavigatorUI.class,"images/addToFav.gif")); }
public FolderAction(){ super(HelpUtilities.getString(locale, "favorites.folder"), SwingHelpUtilities.getImageIcon(BasicFavoritesNavigatorUI.class,"images/folder.gif")); }
public RemoveAction(){ super(HelpUtilities.getString(locale, "favorites.remove"), SwingHelpUtilities.getImageIcon(BasicFavoritesNavigatorUI.class,"images/remove.gif")); }
String title = item.getHistoryName(); if (title == null) { title = HelpUtilities.getString(locale, "history.unknownTitle");
/** Creates new ReloadAction */ public ReloadAction(Object control) { super(control, NAME); putValue("icon", UIManager.getIcon(NAME + ".icon")); if (control instanceof JHelp) { JHelp help = (JHelp) control; Locale locale = null; try { locale = help.getModel().getHelpSet().getLocale(); } catch (NullPointerException npe) { locale = Locale.getDefault(); } putValue("tooltip", HelpUtilities.getString(locale, "tooltip." + NAME)); putValue("access", HelpUtilities.getString(locale, "access." + NAME)); } }
/** Creates new HomeAction */ public HomeAction(Object control) { super(control, NAME); putValue("icon", UIManager.getIcon(NAME + ".icon")); if (control instanceof JHelp) { JHelp help = (JHelp) control; Locale locale = null; try { locale = help.getModel().getHelpSet().getLocale(); } catch (NullPointerException npe) { locale = Locale.getDefault(); } putValue("tooltip", HelpUtilities.getString(locale, "tooltip." + NAME)); putValue("access", HelpUtilities.getString(locale, "access." + NAME)); } }
/** Creates new BackAction */ public PrintAction(Object control) { super(control, NAME); if (control instanceof JHelp) { JHelp help = (JHelp)control; handler = JHelpPrintHandler.getJHelpPrintHandler(help); handler.addPropertyChangeListener(this); Locale locale = null; try { locale = help.getModel().getHelpSet().getLocale(); } catch (NullPointerException npe) { locale = Locale.getDefault(); } putValue("tooltip", HelpUtilities.getString(locale, "tooltip." + NAME)); putValue("access", HelpUtilities.getString(locale, "access." + NAME)); } putValue("icon", UIManager.getIcon(NAME + ".icon")); }
/** Creates new FavoritesAction */ public FavoritesAction(Object control) { super(control, NAME); if (control instanceof JHelp) { JHelp help = (JHelp)control; for (Enumeration e = help.getHelpNavigators(); e.hasMoreElements();) { JHelpNavigator nav = (JHelpNavigator)e.nextElement(); if(nav instanceof JHelpFavoritesNavigator) { favorites = (JHelpFavoritesNavigator)nav; favoritesActionListener = favorites.getAddAction(); } } setEnabled(favoritesActionListener != null); putValue("icon", UIManager.getIcon(NAME + ".icon")); Locale locale = null; try { locale = help.getModel().getHelpSet().getLocale(); } catch (NullPointerException npe) { locale = Locale.getDefault(); } putValue("tooltip", HelpUtilities.getString(locale, "tooltip." + NAME)); putValue("access", HelpUtilities.getString(locale, "access." + NAME)); } }
/** Creates new BackAction */ public PrintSetupAction(Object control) { super(control, NAME); if (getControl() instanceof JHelp) { JHelp help = (JHelp)control; handler = JHelpPrintHandler.getJHelpPrintHandler(help); handler.addPropertyChangeListener(this); Locale locale = null; try { locale = help.getModel().getHelpSet().getLocale(); } catch (NullPointerException npe) { locale = Locale.getDefault(); } putValue("tooltip", HelpUtilities.getString(locale, "tooltip." + NAME)); putValue("access", HelpUtilities.getString(locale, "access." + NAME)); } putValue("icon", UIManager.getIcon(NAME + ".icon")); }
/** Creates new ForwardAction */ public ForwardAction(Object control) { super(control, NAME); if (control instanceof JHelp) { JHelp help = (JHelp)control; historyModel = help.getHistoryModel(); historyModel.addHelpHistoryModelListener(this); setEnabled(historyModel.getIndex() > 0); putValue("icon", UIManager.getIcon(NAME + ".icon")); Locale locale = null; try { locale = help.getModel().getHelpSet().getLocale(); } catch (NullPointerException npe) { locale = Locale.getDefault(); } putValue("tooltip", HelpUtilities.getString(locale, "tooltip." + NAME)); putValue("access", HelpUtilities.getString(locale, "access." + NAME)); } }
/** Creates new BackAction */ public BackAction(Object control) { super(control, NAME); if (control instanceof JHelp) { JHelp help = (JHelp)control; historyModel = help.getHistoryModel(); historyModel.addHelpHistoryModelListener(this); setEnabled(historyModel.getIndex() > 0); putValue("icon", UIManager.getIcon(NAME + ".icon")); Locale locale = null; try { locale = help.getModel().getHelpSet().getLocale(); } catch (NullPointerException npe) { locale = Locale.getDefault(); } putValue("tooltip", HelpUtilities.getString(locale, "tooltip." + NAME)); putValue("access", HelpUtilities.getString(locale, "access." + NAME)); } }
public void actionPerformed(java.awt.event.ActionEvent event) { try { JHelp help = (JHelp)getControl(); HelpSet hs = help.getModel().getHelpSet(); Map.ID homeID = hs.getHomeID(); Locale locale = hs.getLocale(); String string = HelpUtilities.getString(locale, "history.homePage"); help.setCurrentID(homeID, string, help.getCurrentNavigator()); } catch (Exception e) { } } }
public void actionPerformed(ActionEvent ev){ FavoritesItem favoriteFolder = new FavoritesItem(HelpUtilities.getString(locale, "favorites.folder")); favoriteFolder.setAsFolder(); FavoritesNode node = new FavoritesNode(favoriteFolder); TreePath nodePath = tree.getSelectionPath(); TreeNode parent = null; if(nodePath == null) parent = topNode; else{ FavoritesNode selNode = (FavoritesNode)nodePath.getLastPathComponent(); parent = selNode.getParent(); } DefaultTreeModel model = (DefaultTreeModel)tree.getModel(); model.insertNodeInto(node,(DefaultMutableTreeNode)parent,parent.getChildCount()); TreePath path = new TreePath(node.getPath()); tree.expandPath(path); tree.setSelectionPath(path); tree.scrollPathToVisible(path); saveFavorites(); } }
private void rebuild() { HelpModel hm = getModel(); if (hm == null) { return; } //hm.addHelpModelListener(changeListener); // Discard any history HelpHistoryModel historyModel = getHistoryModel(); if(historyModel != null) historyModel.discard(); try { Map.ID currentID = hm.getCurrentID(); if (currentID == null) { HelpSet hs = hm.getHelpSet(); Map.ID homeID = hs.getHomeID(); Locale locale = hs.getLocale(); String string = HelpUtilities.getString(locale, "history.homePage"); hm.setCurrentID(homeID, string, null); } } catch (Exception e) { // For example, a null HelpSet! return; } }
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"); }