示例#1
0
 public BasicSearchNavigatorUI(JHelpSearchNavigator b) {
   ImageIcon icon = getImageIcon(b.getNavigatorView());
   if (icon != null) {
     setIcon(icon);
   } else {
     setIcon(UIManager.getIcon("SearchNav.icon"));
   }
 }
示例#2
0
  /** 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));
    }
  }