private static void debug(Object msg1, Object msg2) { debug(msg1,msg2,""); }
/** * Versions with an explicit locale. */ static public String getString(Locale l, String key) { ResourceBundle bundle = getBundle(l); try { return bundle.getString(key); } catch (MissingResourceException ex) { throw new Error("Fatal: Localization data for JavaHelp is broken. Missing "+key+" key."); } }
/** * Default for the search engine. */ protected String getDefaultQueryEngine() { return HelpUtilities.getDefaultQueryEngine(); }
public CutAction(){ super(HelpUtilities.getString(locale,"favorites.cut")); }
/** * @param s1 The first parameter of a string. A null is valid for s1. * @param s2 The first parameter of a string. A null is valid for s2. */ static public String getText(Locale l, String key, String s1, String s2) { return getText(l, key, s1, s2, null); }
locale = HelpUtilities.localeFromLang(lang); factory.reportMessage(HelpUtilities.getText("favorites.invalidFavoritesFormat"), false); if (version != null && version.compareTo("2.0") != 0) { factory.reportMessage(HelpUtilities.getText("favorites.unknownVersion", version), false); factory.reportMessage(HelpUtilities.getText("favorites.invalidFavoritesFormat"), false);
boolean tryRead) { URL url; for (Enumeration tails = getCandidates(locale); tails.hasMoreElements(); ) { String tail = (String) tails.nextElement();
public SearchTOCItem(SearchItem item) { super (null, null, null, HelpUtilities.localeFromLang(item.getLang())); inTOC = false; setName(item.getTitle()); try { this.url = new URL(item.getBase(), item.getFilename()); } catch (MalformedURLException me) { this.url = null; } sivec = new Vector(); SearchHit info = new SearchHit(item.getConfidence(), item.getBegin(), item.getEnd()); confidence = item.getConfidence(); sivec.addElement(info); }
/** * Locate a resource relative to a given classloader CL. * The name of the resource is composed by using FRONT, * adding _LANG _COUNTRY _VARIANT (with the usual rules) * and ending with BACK, which will usually be an extension * like ".hs" for a HelpSet, or ".class" for a class * * This method is a convenience method for getLocalizedResource() with * a tryRead parameter set to false. * * This functionality should likely be exposed as part of JDK1.2 * @param cl The ClassLoader to get the resource from. If cl is null the default * ClassLoader is used. * @returns the URL to the localized resource or null if not found. */ public static URL getLocalizedResource(ClassLoader cl, String front, String back, Locale locale) { return getLocalizedResource(cl, front, back, locale, false); }
public void installUI(JComponent c) { debug("installUI"); locale = HelpUtilities.getLocale(c); addAction = new AddAction(); removeAction = new RemoveAction();
itemName = itemName.toLowerCase(); if (HelpUtilities.isStringInString(rbc, name, itemName)) { return node;
public PasteAction(){ super(HelpUtilities.getString(locale,"favorites.paste")); }
/** * @param s1 The first parameter of a string. A null is valid for s1. * @param s2 The first parameter of a string. A null is valid for s2. * @param s3 The first parameter of a string. A null is valid for s3. */ static public String getText(Locale l, String key) { return getText(l, key, null, null, null); }
locale = HelpUtilities.localeFromLang(lang); factory.reportMessage(HelpUtilities.getText("index.invalidIndexFormat"), false); (version.compareTo("1.0") != 0 && version.compareTo("2.0") != 0 )) { factory.reportMessage(HelpUtilities.getText("index.unknownVersion", version), false); factory.reportMessage(HelpUtilities.getText("index.invalidIndexFormat"), false);
URL url; for (@SuppressWarnings("unchecked") Enumeration<String> candidateLocales = HelpUtilities.getCandidates(locale); candidateLocales.hasMoreElements();) { String candidateLocale = candidateLocales.nextElement(); String resource = (new StringBuilder(packageName)).append(candidateLocale)
locale = HelpUtilities.localeFromLang(lang); viewMergeType = attr.getProperty("mergetype"); helpActionImage = attr.getProperty("image");
/** * Locates a HelpSet file and return its URL. * Applies localization conventions. * * @param cl The classloader to use when searching for the resource * with the appropriate name. If cl is null the default * ClassLoader is used. * @param shortName The shortname of the resource. * @param extension The extension of the resource. * @param locale The desired Locale * @see javax.help.HelpUtilities */ public static URL findHelpSet(ClassLoader cl, String shortName, String extension, Locale locale) { // Test for whether URL can be opened! - workaround Browser bugs return HelpUtilities.getLocalizedResource(cl, shortName, extension, locale, true); }
toolbar = createToolBar(HelpUtilities.getLocale(c)); if (toolbar != null) { toolbar.setFloatable(false);