Tabnine Logo
Vocabulary.getResources
Code IndexAdd Tabnine to your IDE (free)

How to use
getResources
method
in
org.geotools.resources.i18n.Vocabulary

Best Java code snippets using org.geotools.resources.i18n.Vocabulary.getResources (Showing top 20 results out of 315)

origin: org.geotools/gt-metadata

/**
 * 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);
}
origin: org.geotools/gt2-coverage

  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));
  }
};
origin: org.geotools/gt2-metadata

/**
 * 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);
}
origin: org.geotools/gt-coverage

  public String toString(final Locale locale) {
    return Vocabulary.getResources(locale).getString(VocabularyKeys.DATA_TYPE_$2,
        Integer.valueOf(real ? 2 : signed ? 1 : 0), size);
  }
};
origin: org.geotools/gt2-metadata

/**
 * 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);
}
origin: org.geotools/gt-metadata

/**
 * 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);
}
origin: org.geotools/gt2-metadata

/**
 * 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);
}
origin: org.geotools/gt-metadata

/**
 * 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);
}
origin: org.geotools/gt2-coverage

/** 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));
}
origin: org.geotools/gt-coverage

/** 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));
}
origin: org.geotools/gt-swing

/**
 * 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);
}
origin: org.geotools/gt2-widgets-swing

/**
 * Returns the resources for the widget locale.
 */
final Vocabulary getResources() {
  Locale locale;
  try {
    locale = getLocale();
  } catch (IllegalComponentStateException exception) {
    locale = getDefaultLocale();
  }
  return Vocabulary.getResources(locale);
}
origin: org.geotools/gt2-widgets-swing

/**
 * Returns a localized string for the specified key.
 */
private String getString(final int key) {
  return Vocabulary.getResources(window.getLocale()).getString(key);
}
origin: org.geotools/gt2-coverage

/**
 * 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;
}
origin: org.geotools/gt-coverage

/**
 * 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);
}
origin: org.geotools/gt2-coverage

/**
 * 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);
  }
}
origin: org.geotools/gt2-widgets-swing

/**
 * 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;
}
origin: org.geotools/gt2-widgets-swing

/**
 * 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));
}
origin: org.geotools/gt2-widgets-swing

/**
 * 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);
}
origin: org.geotools/gt2-widgets-swing

/**
 * 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);
}
org.geotools.resources.i18nVocabularygetResources

Javadoc

Returns resources in the given locale.

Popular methods of Vocabulary

  • format
    Gets a string for the given key are replace all occurence of "{0}", "{1}", with values of arg0, arg1
  • formatInternational
    Gets an international string for the given key. This method does not check for the key validity. If
  • getString
  • getBundle
  • getLogRecord
  • getLabel
  • getMenuLabel

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JFrame (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now