net.sf.borg.common
Class Resource

java.lang.Object
  extended by net.sf.borg.common.Resource

public class Resource
extends Object

Common logic for dealing with Resource Bundles. Resource strings are stored in a standard resource bundle, but may have extra keyboard shortcut information added which defines the keyboard shortcuts for manu items and buttons.


Nested Class Summary
static class Resource.ComponentParms
          ComponentParms contains the text and keyboard shortcut info for a resource string.
 
Constructor Summary
Resource()
           
 
Method Summary
static String getResourceString(String resourceKey)
          Get a resource string from the borg resource bundle.
static String getVersion()
          Gets the borg version, which is stored in its own properties file
static Resource.ComponentParms parseParms(String resourceKey)
          get a resource string and parse out the various parts - the text and the keyboard shortcut into
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Method Detail

getResourceString

public static String getResourceString(String resourceKey)
Get a resource string from the borg resource bundle. Translates escaped newlines to real newlines.

Parameters:
resourceKey - the resource key
Returns:
the resource string

getVersion

public static String getVersion()
Gets the borg version, which is stored in its own properties file

Returns:
the version

parseParms

public static Resource.ComponentParms parseParms(String resourceKey)
get a resource string and parse out the various parts - the text and the keyboard shortcut into

Parameters:
resourceKey - the resource key
Returns:
the ComponentParms object


Generated September 24 2010 by mbb using Apache Ant version 1.7.1 compiled on June 27 2008 and Java version 1.6.0_20 from Sun Microsystems Inc. on Linux i386 2.6.24-28-generic