Tabnine Logo
ResourceBundleSupport
Code IndexAdd Tabnine to your IDE (free)

How to use
ResourceBundleSupport
in
org.jfree.util

Best Java code snippets using org.jfree.util.ResourceBundleSupport (Showing top 20 results out of 315)

origin: org.jfree/com.springsource.org.jfree

/**
 * Returns an unscaled icon.
 *
 * @param key the name of the resource bundle key
 * @return the icon.
 */
public Icon getIcon(final String key)
{
 final String name = getString(key);
 return createIcon(name, false, false);
}
origin: org.jfree/com.springsource.org.jfree

public Integer getOptionalMnemonic(final String key)
{
 final String name = getString(key);
 if (name != null && name.length() > 0)
 {
  return createMnemonic(name);
 }
 return null;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Creates a transparent icon. The Icon can be used for aligning menu
 * items.
 *
 * @param width  the width of the new icon
 * @param height the height of the new icon
 * @return the created transparent icon.
 */
public Icon createTransparentIcon(final int width, final int height)
{
 return new ImageIcon(createTransparentImage(width, height));
}
origin: org.jfree/jcommon

/**
 * Returns an optional key stroke.
 *
 * @param key  the key.
 *
 * @return The key stroke.
 */
public KeyStroke getOptionalKeyStroke(final String key)
{
 return getOptionalKeyStroke(key, getMenuKeyMask());
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Formats the message stored in the resource bundle (using a
 * MessageFormat).
 *
 * @param key        the resourcebundle key
 * @param parameters the parameter collection for the message
 * @return the formated string
 */
public String formatMessage(final String key, final Object[] parameters)
{
 final MessageFormat format = new MessageFormat(getString(key));
 format.setLocale(getLocale());
 return format.format(parameters);
}
origin: jfree/jcommon

/**
 * Returns the keystroke stored at the given resourcebundle key.
 * <p/>
 * The keystroke will be composed of a simple key press and the plattform's
 * MenuKeyMask.
 * <p/>
 * The keystrokes character key should be either the symbolic name of one of
 * the KeyEvent.VK_* constants or the character for that key.
 * <p/>
 * For the 'A' key, the resource bundle would therefore either contain
 * "VK_A" or "a".
 * <pre>
 * a.resourcebundle.key=VK_A
 * an.other.resourcebundle.key=a
 * </pre>
 *
 * @param key the resourcebundle key
 * @return the mnemonic
 * @see Toolkit#getMenuShortcutKeyMask()
 */
public KeyStroke getKeyStroke(final String key)
{
 return getKeyStroke(key, getMenuKeyMask());
}
origin: org.jfree/jcommon

/**
 * Returns a JMenu created from a resource bundle definition.
 * <p>
 * The menu definition consists of two keys, the name of the menu and the
 * mnemonic for that menu. Both keys share a common prefix, which is
 * extended by ".name" for the name of the menu and ".mnemonic" for the
 * mnemonic.</p>
 * 
 * <pre>
 * # define the file menu
 * menu.file.name=File
 * menu.file.mnemonic=F
 * </pre>
 * The menu definition above can be used to create the menu by calling
 * <code>createMenu ("menu.file")</code>.
 *
 * @param keyPrefix the common prefix for that menu
 * @return the created menu
 */
public JMenu createMenu(final String keyPrefix)
{
 final JMenu retval = new JMenu();
 retval.setText(getString(keyPrefix + ".name"));
 retval.setMnemonic(getMnemonic(keyPrefix + ".mnemonic").intValue());
 return retval;
}
origin: org.jfree/com.springsource.org.jfree

    getResourceBase(), this.lookupPath.toString());
   ("Invalid format for global lookup key.", getResourceBase(), key);
   ("Error during global lookup", getResourceBase(), key);
final String retval = internalGetString(newKey);
origin: org.jfree/jcommon

/**
 * Formats the message stored in the resource bundle (using a
 * MessageFormat).
 *
 * @param key       the resourcebundle key
 * @param parameter the parameter for the message
 * @return the formated string
 */
public String formatMessage(final String key, final Object parameter)
{
 return formatMessage(key, new Object[]{parameter});
}
origin: jfree/jcommon

/**
 * Returns an optional key stroke.
 *
 * @param key  the key.
 *
 * @return The key stroke.
 */
public KeyStroke getOptionalKeyStroke(final String key)
{
 return getOptionalKeyStroke(key, getMenuKeyMask());
}
origin: jfree/jcommon

/**
 * Formats the message stored in the resource bundle (using a
 * MessageFormat).
 *
 * @param key        the resourcebundle key
 * @param parameters the parameter collection for the message
 * @return the formated string
 */
public String formatMessage(final String key, final Object[] parameters)
{
 final MessageFormat format = new MessageFormat(getString(key));
 format.setLocale(getLocale());
 return format.format(parameters);
}
origin: org.jfree/jcommon

/**
 * Returns the keystroke stored at the given resourcebundle key.
 * <p>
 * The keystroke will be composed of a simple key press and the platform's
 * MenuKeyMask.</p>
 * <p>
 * The keystrokes character key should be either the symbolic name of one of
 * the KeyEvent.VK_* constants or the character for that key.</p>
 * <p>
 * For the 'A' key, the resource bundle would therefore either contain
 * "VK_A" or "a".</p>
 * <pre>
 * a.resourcebundle.key=VK_A
 * an.other.resourcebundle.key=a
 * </pre>
 *
 * @param key the resourcebundle key
 * @return the mnemonic
 * @see Toolkit#getMenuShortcutKeyMask()
 */
public KeyStroke getKeyStroke(final String key)
{
 return getKeyStroke(key, getMenuKeyMask());
}
origin: jfree/jcommon

/**
 * Returns a JMenu created from a resource bundle definition.
 * <p/>
 * The menu definition consists of two keys, the name of the menu and the
 * mnemonic for that menu. Both keys share a common prefix, which is
 * extended by ".name" for the name of the menu and ".mnemonic" for the
 * mnemonic.
 * <p/>
 * <pre>
 * # define the file menu
 * menu.file.name=File
 * menu.file.mnemonic=F
 * </pre>
 * The menu definition above can be used to create the menu by calling
 * <code>createMenu ("menu.file")</code>.
 *
 * @param keyPrefix the common prefix for that menu
 * @return the created menu
 */
public JMenu createMenu(final String keyPrefix)
{
 final JMenu retval = new JMenu();
 retval.setText(getString(keyPrefix + ".name"));
 retval.setMnemonic(getMnemonic(keyPrefix + ".mnemonic").intValue());
 return retval;
}
origin: jfree/jcommon

    getResourceBase(), this.lookupPath.toString());
   ("Invalid format for global lookup key.", getResourceBase(), key);
   ("Error during global lookup", getResourceBase(), key);
final String retval = internalGetString(newKey);
origin: jfree/jcommon

/**
 * Formats the message stored in the resource bundle (using a
 * MessageFormat).
 *
 * @param key       the resourcebundle key
 * @param parameter the parameter for the message
 * @return the formated string
 */
public String formatMessage(final String key, final Object parameter)
{
 return formatMessage(key, new Object[]{parameter});
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns the mnemonic stored at the given resourcebundle key. The mnemonic
 * should be either the symbolic name of one of the KeyEvent.VK_* constants
 * (without the 'VK_') or the character for that key.
 * <p/>
 * For the enter key, the resource bundle would therefore either contain
 * "ENTER" or "\n".
 * <pre>
 * a.resourcebundle.key=ENTER
 * an.other.resourcebundle.key=\n
 * </pre>
 *
 * @param key the resourcebundle key
 * @return the mnemonic
 */
public Integer getMnemonic(final String key)
{
 final String name = getString(key);
 return createMnemonic(name);
}
origin: jfree/jcommon

/**
 * Returns an unscaled icon.
 *
 * @param key the name of the resource bundle key
 * @return the icon.
 */
public Icon getIcon(final String key)
{
 final String name = getString(key);
 return createIcon(name, false, false);
}
origin: org.jfree/com.springsource.org.jfree

public KeyStroke getOptionalKeyStroke(final String key)
{
 return getOptionalKeyStroke(key, getMenuKeyMask());
}
origin: org.jfree/jcommon

/**
 * Formats the message stored in the resource bundle (using a
 * MessageFormat).
 *
 * @param key        the resourcebundle key
 * @param parameters the parameter collection for the message
 * @return the formated string
 */
public String formatMessage(final String key, final Object[] parameters)
{
 final MessageFormat format = new MessageFormat(getString(key));
 format.setLocale(getLocale());
 return format.format(parameters);
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns the keystroke stored at the given resourcebundle key.
 * <p/>
 * The keystroke will be composed of a simple key press and the plattform's
 * MenuKeyMask.
 * <p/>
 * The keystrokes character key should be either the symbolic name of one of
 * the KeyEvent.VK_* constants or the character for that key.
 * <p/>
 * For the 'A' key, the resource bundle would therefore either contain
 * "VK_A" or "a".
 * <pre>
 * a.resourcebundle.key=VK_A
 * an.other.resourcebundle.key=a
 * </pre>
 *
 * @param key the resourcebundle key
 * @return the mnemonic
 * @see Toolkit#getMenuShortcutKeyMask()
 */
public KeyStroke getKeyStroke(final String key)
{
 return getKeyStroke(key, getMenuKeyMask());
}
org.jfree.utilResourceBundleSupport

Javadoc

An utility class to ease up using property-file resource bundles.

The class support references within the resource bundle set to minimize the occurence of duplicate keys. References are given in the format:

 
a.key.name=@referenced.key 

A lookup to a key in an other resource bundle should be written by

 
a.key.name=@@resourcebundle_name@referenced.key 

Most used methods

  • createIcon
    Attempts to load an image from classpath. If this fails, an empty image icon is returned.
  • createMnemonic
    Creates the Mnemonic from the given String. The String consists of the name of the VK constants of t
  • createTransparentImage
    Creates a transparent image. These can be used for aligning menu items.
  • formatMessage
    Formats the message stored in the resource bundle (using a MessageFormat).
  • getKeyStroke
    Returns the keystroke stored at the given resourcebundle key. The keystroke will be composed of a si
  • getLocale
    Returns the current locale for this resource bundle.
  • getMenuKeyMask
    Returns the plattforms default menu shortcut keymask.
  • getMnemonic
    Returns the mnemonic stored at the given resourcebundle key. The mnemonic should be either the symbo
  • getOptionalKeyStroke
    Returns an optional key stroke.
  • getResourceBase
    The base name of the resource bundle.
  • getString
    Gets a string for the given key from this resource bundle or one of its parents. If the key is a lin
  • internalGetString
    Performs the lookup for the given key. If the key points to a link the link is resolved and that key
  • getString,
  • internalGetString

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • BoxLayout (javax.swing)
  • Option (scala)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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