/** * 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); } };
/** * 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); }
/** * 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); }
/** 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 the resources for the widget locale. */ final Vocabulary getResources() { Locale locale; try { locale = getLocale(); } catch (IllegalComponentStateException exception) { locale = getDefaultLocale(); } return Vocabulary.getResources(locale); }
/** * Returns a localized string for the specified key. */ private String getString(final int key) { return Vocabulary.getResources(window.getLocale()).getString(key); }
/** * Prepares a log record about an image to be loaded, and put the log record in a stack. * The record will be effectively logged only when image loading really beging. */ private void logLoading(final int key, final Object[] parameters) { final Locale locale = null; final LogRecord record = Vocabulary.getResources(locale).getLogRecord(Level.INFO, key); record.setSourceClassName(CoverageStack.class.getName()); record.setSourceMethodName("evaluate"); record.setParameters(parameters); if (readListener == null) { readListener = new Listeners(); addIIOReadProgressListener(readListener); } readListener.record = record; }
/** * 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); } }
/** * 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; }
/** * 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)); }
/** * Adds a kernel to the list of available kernels. The widget list kernels in the same order * they were added, unless {@link #sortKernelNames} has been invoked. Each kernel can belong * to an optional category. Example of categories includes "Error filters" and "Gradient masks". * * @param category The kernel's category name, or {@code null} if none. * @param name The kernel name. Kernels will be displayed in alphabetic order. * @param kernel The kernel. If an other kernel was registered with the same * name, the previous kernel will be discarted. */ public void addKernel(String category, final String name, final KernelJAI kernel) { if (category == null) { category = Vocabulary.getResources(getLocale()).getString(VocabularyKeys.OTHERS); } model.addKernel(category, name, kernel); }
/** * Set the specified {@linkplain RenderableImage renderable image} as the properties source. * * @param image The image, or {@code null} if none. */ public void setImage(final RenderableImage image) { clear(); if (image != null) { final Vocabulary resources = Vocabulary.getResources(getLocale()); imageSize.setText(resources.getString(VocabularyKeys.SIZE_$2, new Float(image.getWidth()), new Float(image.getHeight()))); } setDescription(image); properties.setSource(image); viewer .setImage (image); samples .setImage ((RenderedImage) null); }