com.developmentontheedge.application.action
Class ActionInitializer

java.lang.Object
  extended bycom.developmentontheedge.application.action.ActionInitializer

public class ActionInitializer
extends java.lang.Object

This class contains common rutines to init actions by the data from the corresponding MessageBundle.


Field Summary
protected static java.lang.Class loader
           
protected static org.apache.log4j.Category log
           
protected static java.util.ResourceBundle resources
           
 
Constructor Summary
ActionInitializer()
           
 
Method Summary
static java.net.URL getResource(java.lang.String key)
          Get URL for the specified key using loader class.
protected static java.lang.Object getResourceObject(java.lang.String nm)
          Returns object with the specified key from the resource bundle.
static java.lang.String getResourcePath(java.lang.String name)
           
protected static java.lang.String getResourceString(java.lang.String nm)
          Returns string with the specified key from the resource bundle.
static void init(java.util.ResourceBundle r, java.lang.Class l)
          Inits ActionInitializer with the specified ResourceBundle and class, used for resource loading.
static void init(java.lang.String resourceBundleName, java.lang.Class l)
          Inits ActionInitializer with the specified ResourceBundle name and class, used for resource loading.
static void initAction(javax.swing.Action action)
          Init action by the data from the MessageBundle.
static void initAction(javax.swing.Action action, java.lang.String key)
          Init action by the data from the MessageBundle.
static void initActionValue(javax.swing.Action action, java.lang.String actionKey, java.lang.String resourceKey)
          Init action value with the specified actionKey by the string data from the message bundle with the corresponding key.
static void initResourceBundle(java.lang.String resourceBundlename, java.lang.Class l)
          Creates resourceBundle for the specified name and default locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

protected static java.util.ResourceBundle resources

loader

protected static java.lang.Class loader

log

protected static org.apache.log4j.Category log
Constructor Detail

ActionInitializer

public ActionInitializer()
Method Detail

init

public static void init(java.lang.String resourceBundleName,
                        java.lang.Class l)
Inits ActionInitializer with the specified ResourceBundle name and class, used for resource loading.


init

public static void init(java.util.ResourceBundle r,
                        java.lang.Class l)
Inits ActionInitializer with the specified ResourceBundle and class, used for resource loading.


initAction

public static void initAction(javax.swing.Action action)
Init action by the data from the MessageBundle. Action name is used as key to find corresponding items in the MessageBundle.


initAction

public static void initAction(javax.swing.Action action,
                              java.lang.String key)
Init action by the data from the MessageBundle.


initActionValue

public static void initActionValue(javax.swing.Action action,
                                   java.lang.String actionKey,
                                   java.lang.String resourceKey)
Init action value with the specified actionKey by the string data from the message bundle with the corresponding key.


initResourceBundle

public static void initResourceBundle(java.lang.String resourceBundlename,
                                      java.lang.Class l)
Creates resourceBundle for the specified name and default locale.


getResourceObject

protected static java.lang.Object getResourceObject(java.lang.String nm)
Returns object with the specified key from the resource bundle. If the MissingResourceException occurs, catch it and returns null.


getResourceString

protected static java.lang.String getResourceString(java.lang.String nm)
Returns string with the specified key from the resource bundle. If the MissingResourceException occurs, catch it and returns null.


getResourcePath

public static java.lang.String getResourcePath(java.lang.String name)

getResource

public static java.net.URL getResource(java.lang.String key)
Get URL for the specified key using loader class.



Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.