/** * Returns the column name for the given index. */ public String getColumnName(final int column) { final int key; switch (column) { case 0: key=VocabularyKeys.NAME; break; case 1: key=VocabularyKeys.VALUE; break; default: throw new IndexOutOfBoundsException(String.valueOf(column)); } return resources.getString(key); }
/** * Dmarre le thread. */ public synchronized void start() { if (worker == null) { worker = new Thread(this, resources.getString(VocabularyKeys.ABOUT)); worker.setPriority(Thread.MIN_PRIORITY); worker.setDaemon(true); worker.start(); } }
/** * Gets a string for the given key from this resource bundle or one of its parents. * * @param key The key for the desired string. * @return The string for the given key. * @throws MissingResourceException If no object for the given key can be found. */ public static String format(final int key) throws MissingResourceException { return getResources(null).getString(key); }
public String toString(final Locale locale) { return Vocabulary.getResources(locale).getString(VocabularyKeys.DATA_TYPE_$2, new Integer(real ? 2 : signed ? 1 : 0), new Integer(size)); } };
/** * Gets a string for the given key from this resource bundle or one of its parents. * * @param key The key for the desired string. * @return The string for the given key. * @throws MissingResourceException If no object for the given key can be found. */ public static String format(final int key) throws MissingResourceException { return getResources(null).getString(key); }
public String toString(final Locale locale) { return Vocabulary.getResources(locale).getString(VocabularyKeys.DATA_TYPE_$2, Integer.valueOf(real ? 2 : signed ? 1 : 0), size); } };
/** * Convenience method returning a string for the specified resource keys. */ private String getString(final int key) { return getResources().getString(key); }
/** * Gets a string for the given key are replace all occurence of "{0}", * "{1}", with values of {@code arg0}, {@code arg1}. * * @param key The key for the desired string. * @param arg0 Value to substitute to "{0}". * @param arg1 Value to substitute to "{1}". * @return The formatted string for the given key. * @throws MissingResourceException If no object for the given key can be found. */ public static String format(final int key, final Object arg0, final Object arg1) throws MissingResourceException { return getResources(null).getString(key, arg0, arg1); }
/** * Gets a string for the given key are replace all occurence of "{0}" * with values of {@code arg0}. * * @param key The key for the desired string. * @param arg0 Value to substitute to "{0}". * @return The formatted string for the given key. * @throws MissingResourceException If no object for the given key can be found. */ public static String format(final int key, final Object arg0) throws MissingResourceException { return getResources(null).getString(key, arg0); }
/** * Gets a string for the given key are replace all occurence of "{0}" * with values of {@code arg0}. * * @param key The key for the desired string. * @param arg0 Value to substitute to "{0}". * @return The formatted string for the given key. * @throws MissingResourceException If no object for the given key can be found. */ public static String format(final int key, final Object arg0) throws MissingResourceException { return getResources(null).getString(key, arg0); }
/** * Gets a string for the given key are replace all occurence of "{0}", * "{1}", with values of {@code arg0}, {@code arg1}. * * @param key The key for the desired string. * @param arg0 Value to substitute to "{0}". * @param arg1 Value to substitute to "{1}". * @return The formatted string for the given key. * @throws MissingResourceException If no object for the given key can be found. */ public static String format(final int key, final Object arg0, final Object arg1) throws MissingResourceException { return getResources(null).getString(key, arg0, arg1); }
/** * Removes all kernels and categories. * * @see KernelEditor#removeAllKernels */ public void removeAllKernels() { final int size = kernels.size(); kernels.clear(); categories.clear(); names = null; fireListChanged(ListDataEvent.INTERVAL_REMOVED, 0, size-1); categorySelector.removeAllItems(); categorySelector.addItem(getResources().getString(VocabularyKeys.ALL)); }
/** Returns the name in the specified locale. */ public String toString(final Locale locale) { final StringBuffer buffer = new StringBuffer(30); if (main != null) { buffer.append(main.getName().toString(locale)); } else { buffer.append('('); buffer.append(Vocabulary.getResources(locale).getString(VocabularyKeys.UNTITLED)); buffer.append(')'); } buffer.append(' '); return String.valueOf(geophysics(true).formatRange(buffer, locale)); }
/** Returns the name in the specified locale. */ public String toString(final Locale locale) { final StringBuffer buffer = new StringBuffer(30); if (main != null) { buffer.append(main.getName().toString(locale)); } else { buffer.append('('); buffer.append(Vocabulary.getResources(locale).getString(VocabularyKeys.UNTITLED)); buffer.append(')'); } buffer.append(' '); return String.valueOf(geophysics(true).formatRange(buffer, locale)); }
/** * Returns a localized string for the specified key. * @param key an integer key * @return the associated string */ private String getString(final int key) { return Vocabulary.getResources(window.getLocale()).getString(key); }
/** * Returns a localized string for the specified key. */ private String getString(final int key) { return Vocabulary.getResources(window.getLocale()).getString(key); }
/** * Returns the coverage name in the specified locale. */ private static String getName(final Coverage coverage, final Locale locale) { if (coverage instanceof AbstractCoverage) { final InternationalString name = ((AbstractCoverage) coverage).getName(); if (name != null) { return name.toString(locale); } } return Vocabulary.getResources(locale).getString(VocabularyKeys.UNTITLED); }
/** * Returns the coverage name in the specified locale. */ private static String getName(final Coverage coverage, final Locale locale) { if (coverage instanceof AbstractCoverage) { return ((AbstractCoverage) coverage).getName().toString(locale); } else { return Vocabulary.getResources(locale).getString(VocabularyKeys.UNTITLED); } }
/** * Shows a dialog box requesting input from the user. The dialog box will be * parented to {@code owner}. If {@code owner} is contained into a * {@link javax.swing.JDesktopPane}, the dialog box will appears as an internal * frame. This method can be invoked from any thread (may or may not be the * <cite>Swing</cite> thread). * * @param owner The parent component for the dialog box, or {@code null} if there is no parent. * @return {@code true} if user pressed the "Ok" button, or {@code false} otherwise * (e.g. pressing "Cancel" or closing the dialog box from the title bar). */ public boolean showDialog(final Component owner) { return showDialog(owner, Vocabulary.getResources(getLocale()). getString(VocabularyKeys.COORDINATES_SELECTION)); }
/** * Show the operation chain in the given owner. * * @param owner The owner widget, or {@code null} if none. * @param title The widget title, or {@code null} for a default one. * @return {@code true} if the user clicked on the "Ok" button. */ public boolean showDialog(final Component owner, String title) { if (title == null) { title = Vocabulary.getResources(getLocale()).getString(VocabularyKeys.OPERATIONS); } if (SwingUtilities.showOptionDialog(owner, this, title)) { // TODO: User clicked on "Ok". return true; } return false; }