|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.noos.xing.mydoggy.plaf.PropertyChangeEventSource
org.noos.xing.mydoggy.plaf.ui.look.MyDoggyResourceManager
public class MyDoggyResourceManager
| Nested Class Summary | |
|---|---|
static class |
MyDoggyResourceManager.ParentOfQuestionInstanceCreator
|
| Nested classes/interfaces inherited from class org.noos.xing.mydoggy.plaf.PropertyChangeEventSource |
|---|
PropertyChangeEventSource.ExcludePropertyChangeListener |
| Field Summary | |
|---|---|
protected String |
bundlePath
|
protected ClassLoader |
classLoader
|
protected Map<String,ObjectCreator<Component>> |
cmpCreators
|
protected Map<String,ObjectCustomizer<Component>> |
cmpCustomizers
|
protected Map<String,ObjectCreator<ComponentUI>> |
cmpUiCreators
|
protected Map<Class,ObjectCreator> |
instanceCreators
|
protected ResourceBundle |
resourceBundle
|
protected Properties |
resources
|
protected TransparencyManager<Window> |
transparencyManager
|
protected ResourceBundle |
userResourceBundle
|
| Fields inherited from class org.noos.xing.mydoggy.plaf.PropertyChangeEventSource |
|---|
firePublicEventQuestion, plafChangeSupport, publicChangeSupport, publicEvent |
| Constructor Summary | |
|---|---|
MyDoggyResourceManager()
|
|
| Method Summary | ||
|---|---|---|
|
applyCustomization(String key,
T component,
Context context)
Apply the customization using the rule specified by the key param. |
|
|
createComponent(String key,
Context context)
Create the component using the rule specified by the key param. |
|
ComponentUI |
createComponentUI(String key,
Context context)
Create the component ui using the rule specified by the key param. |
|
|
createInstance(Class<T> clazz,
Context context)
Returns an instance of class clazz using passed args. |
|
boolean |
getBoolean(String name,
boolean defaultValue)
Searches for the property with the specified name in the property list. |
|
Color |
getColor(String id)
Returns the color to which this manager maps the specified id. |
|
List<String> |
getColors()
Returns the map that contains all colors definition. |
|
float |
getFloat(String name,
float defaultValue)
Searches for the property with the specified name in the property list. |
|
Icon |
getIcon(String id)
Returns the icon to which this manager maps the specified id. |
|
List<String> |
getIcons()
Returns the map that contains all icons definition. |
|
BufferedImage |
getImage(String id)
Returns the buffered image to which this manager maps the specified id. |
|
int |
getInt(String name,
int defaultValue)
Searches for the property with the specified name in the property list. |
|
|
getObject(Class<T> clazz,
T defaultValue)
Searches for the object with the specified class in the property list. |
|
String |
getProperty(String name)
Searches for the property with the specified name in the property list. |
|
ResourceBundle |
getResourceBundle()
Returns the resource bundle used for the internationalization of mydoggy. |
|
String |
getString(String key)
This method is equivalent to getResourceBundle().getString(key) |
|
TransparencyManager<Window> |
getTransparencyManager()
Returns the transparency manager for the windows used to manage transparency of toolwindows of FLOATING or FLOATING_FREE type. |
|
protected URL |
getUrl(String url)
|
|
ResourceBundle |
getUserResourceBundle()
Returns the resource bundle used for the internationalization of special strings like the the toolwindow id. |
|
String |
getUserString(String key)
This method is equivalent to getUserResourceBundle().getString(key) |
|
protected void |
initComponentCreators()
|
|
protected void |
initTransparencyManager()
|
|
protected boolean |
isAlreadyLoaded()
|
|
protected void |
loadBoolean(String name,
String value)
|
|
protected void |
loadColor(String name,
String colorDef)
|
|
protected void |
loadFloat(String name,
String value)
|
|
protected void |
loadIcon(String name,
String url)
|
|
protected void |
loadImage(String name,
String url)
|
|
protected void |
loadInt(String name,
String value)
|
|
protected void |
loadObjects()
|
|
protected void |
loadResource(String prefix,
String name,
String value)
|
|
protected ResourceBundle |
loadResourceBundle(Locale locale,
String bundle)
|
|
protected ResourceBundle |
loadResourceBundle(Locale locale,
String bundle,
ClassLoader classLoader)
|
|
protected void |
loadResourceBundles(String bundlePath)
|
|
protected void |
loadResources()
|
|
protected void |
loadString(String name,
String value)
|
|
void |
putBoolean(String name,
boolean value)
Associates a string representing the specified boolean value with the specified name. |
|
Color |
putColor(String id,
Color color)
Associates the specified color with the specified id. |
|
void |
putComponentCreator(String key,
ObjectCreator<Component> componentCreator)
|
|
void |
putComponentCustomizer(String key,
ObjectCustomizer<Component> componentCustomizer)
|
|
void |
putComponentUICreator(String key,
ObjectCreator<ComponentUI> componentUICreator)
|
|
void |
putFloat(String name,
float value)
Associates a string representing the specified float value with the specified name. |
|
Icon |
putIcon(String id,
Icon icon)
Associates the specified icon with the specified id. |
|
void |
putImage(String name,
BufferedImage bufferedImage)
|
|
void |
putInstanceCreator(Class aClass,
ObjectCreator instanceCreator)
|
|
void |
putInt(String name,
int value)
Associates a string representing the specified int value with the specified name. |
|
void |
putObject(Object key,
Object value)
Associates the specified value with the specified key. |
|
void |
putProperty(String name,
String value)
Associates the specified value with the specified property name. |
|
void |
setClassloader(ClassLoader classLoader)
|
|
void |
setLocale(Locale locale)
Sets the locale of this manager used for the internationalization of the relative toolwindow manager. |
|
void |
setTransparencyManager(TransparencyManager<Window> transparencyManager)
Sets the transparency manager for the windows used to manage transparency of toolwindows of FLOATING or FLOATING_FREE type. |
|
void |
setUserBundle(Locale locale,
String bundle,
ClassLoader classLoader)
Sets the bundle used for the internationalization of special strings like the the toolwindow id. |
|
void |
setUserBundle(ResourceBundle userBundle)
Sets the bundle used for the internationalization of special strings like the the toolwindow id. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.noos.xing.mydoggy.Observable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
protected ClassLoader classLoader
protected Properties resources
protected Map<String,ObjectCreator<Component>> cmpCreators
protected Map<String,ObjectCreator<ComponentUI>> cmpUiCreators
protected Map<String,ObjectCustomizer<Component>> cmpCustomizers
protected Map<Class,ObjectCreator> instanceCreators
protected String bundlePath
protected ResourceBundle resourceBundle
protected ResourceBundle userResourceBundle
protected TransparencyManager<Window> transparencyManager
| Constructor Detail |
|---|
public MyDoggyResourceManager()
| Method Detail |
|---|
public void setClassloader(ClassLoader classLoader)
setClassloader in interface ResourceManager
public <T> T createInstance(Class<T> clazz,
Context context)
ResourceManagerclazz using passed args.
createInstance in interface ResourceManagerclazz - the class of the instance to be returned.context - a context where retrieve arguments.
clazz using passed args.
public <T extends Component> T createComponent(String key,
Context context)
ResourceManager
createComponent in interface ResourceManagerkey - key whose associated rule is used to create the component.context - a context where retrieve arguments.
public ComponentUI createComponentUI(String key,
Context context)
ResourceManager
createComponentUI in interface ResourceManagerkey - key whose associated rule is used to create the component.context - a context where retrieve arguments.
public <T extends Component> T applyCustomization(String key,
T component,
Context context)
ResourceManager
applyCustomization in interface ResourceManagerkey - key whose associated rule is used to customize the component.component - the component to be customized.context - a context where retrieve arguments.
public Icon getIcon(String id)
ResourceManager
getIcon in interface ResourceManagerid - id whose associated icon is to be returned.
public Icon putIcon(String id,
Icon icon)
ResourceManager
putIcon in interface ResourceManagerid - id with which the specified icon is to be associated.icon - icon to be associated with the specified id.
public Color getColor(String id)
ResourceManager
getColor in interface ResourceManagerid - id whose associated color is to be returned.
public Color putColor(String id,
Color color)
ResourceManager
putColor in interface ResourceManagerid - id with which the specified color is to be associated.color - color to be associated with the specified id.
public void putImage(String name,
BufferedImage bufferedImage)
public BufferedImage getImage(String id)
ResourceManager
getImage in interface ResourceManagerid - id whose associated buffered image is to be returned.
public TransparencyManager<Window> getTransparencyManager()
ResourceManager
getTransparencyManager in interface ResourceManagerpublic void setTransparencyManager(TransparencyManager<Window> transparencyManager)
ResourceManager
setTransparencyManager in interface ResourceManagertransparencyManager - the transparency manager for the windows.public void setLocale(Locale locale)
ResourceManager
setLocale in interface ResourceManagerlocale - the locale to become this manager's locale
public void setUserBundle(Locale locale,
String bundle,
ClassLoader classLoader)
ResourceManager
setUserBundle in interface ResourceManagerlocale - the locale for which a resource bundle is desiredbundle - the base name of the resource bundle, a fully qualified class nameclassLoader - the class loader from which to load the resource bundleResourceManager.getUserResourceBundle()public void setUserBundle(ResourceBundle userBundle)
ResourceManager
setUserBundle in interface ResourceManageruserBundle - the ResourceBundlepublic ResourceBundle getResourceBundle()
ResourceManager
getResourceBundle in interface ResourceManagerpublic ResourceBundle getUserResourceBundle()
ResourceManager
getUserResourceBundle in interface ResourceManagerpublic String getString(String key)
ResourceManagergetResourceBundle().getString(key)
getString in interface ResourceManagerkey - the key for the desired string
public String getUserString(String key)
ResourceManagergetUserResourceBundle().getString(key)
getUserString in interface ResourceManagerkey - the key for the desired string
public List<String> getColors()
ResourceManager
getColors in interface ResourceManagerpublic List<String> getIcons()
ResourceManager
getIcons in interface ResourceManagerpublic String getProperty(String name)
ResourceManagernull if the property is not found.
getProperty in interface ResourceManagername - the property bame.
public void putProperty(String name,
String value)
ResourceManager
putProperty in interface ResourceManagername - property name with which the specified value is to be associated.value - value to be associated with the specified name.
public boolean getBoolean(String name,
boolean defaultValue)
ResourceManagerdefaultValue if the property is not found.
getBoolean in interface ResourceManagername - the property name.defaultValue - the default value if the property is not found.
public void putBoolean(String name,
boolean value)
ResourceManagerBoolean.toString(boolean).
putBoolean in interface ResourceManagername - name with which the string form of value is to be associated.value - value whose string form is to be associated with key.ResourceManager.getBoolean(String, boolean)
public float getFloat(String name,
float defaultValue)
ResourceManagerdefaultValue if the property is not found.
getFloat in interface ResourceManagername - the property name.defaultValue - the default value if the property is not found.
public void putFloat(String name,
float value)
ResourceManagerFloat.toString(float).
putFloat in interface ResourceManagername - name with which the string form of value is to be associated.value - value whose string form is to be associated with key.ResourceManager.getFloat(String, float)
public int getInt(String name,
int defaultValue)
ResourceManagerdefaultValue if the property is not found.
getInt in interface ResourceManagername - the property name.defaultValue - the default value if the property is not found.
public void putInt(String name,
int value)
ResourceManagerInteger.toString(int).
putInt in interface ResourceManagername - name with which the string form of value is to be associated.value - value whose string form is to be associated with key.ResourceManager.getInt(String, int)
public void putObject(Object key,
Object value)
ResourceManager
putObject in interface ResourceManagerkey - key with which the specified value is to be associated.value - value to be associated with the specified name.
public <T> T getObject(Class<T> clazz,
T defaultValue)
ResourceManagerdefaultValue if the object is not found.
getObject in interface ResourceManagerclazz - the object class.defaultValue - the default value if the object is not found.
public void putInstanceCreator(Class aClass,
ObjectCreator instanceCreator)
public void putComponentCreator(String key,
ObjectCreator<Component> componentCreator)
public void putComponentCustomizer(String key,
ObjectCustomizer<Component> componentCustomizer)
public void putComponentUICreator(String key,
ObjectCreator<ComponentUI> componentUICreator)
protected void loadResources()
protected void loadResource(String prefix,
String name,
String value)
protected void loadIcon(String name,
String url)
protected void loadImage(String name,
String url)
protected void loadColor(String name,
String colorDef)
protected void loadInt(String name,
String value)
protected void loadFloat(String name,
String value)
protected void loadString(String name,
String value)
protected void loadResourceBundles(String bundlePath)
protected void loadObjects()
protected void loadBoolean(String name,
String value)
protected boolean isAlreadyLoaded()
protected URL getUrl(String url)
protected void initComponentCreators()
protected ResourceBundle loadResourceBundle(Locale locale,
String bundle)
protected ResourceBundle loadResourceBundle(Locale locale,
String bundle,
ClassLoader classLoader)
protected void initTransparencyManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||