public abstract class UIResourceHandler
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
UIResourceHandler(java.lang.String id)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
fromValue(java.lang.Object value)
Get the string representation of a value.
|
abstract java.lang.Class<?> |
getHandledClass()
Get the class handled by this resource handler.
|
java.lang.String |
getID()
Get the id of this resource.
|
java.lang.String |
getValue(javax.swing.UIDefaults defaults)
Get the string representation of the value of the resource.
|
boolean |
setValue(UIResourceCollection uirc,
java.lang.String value)
Extract the value from a string representation,
|
protected abstract java.lang.Object |
toValue(java.lang.String text)
Convert a textual representation of a value to a value.
|
protected UIResourceHandler(java.lang.String id)
id
- ID of resourcepublic java.lang.String getID()
public java.lang.String getValue(javax.swing.UIDefaults defaults)
defaults
- the UI defaults from where the value is readpublic boolean setValue(UIResourceCollection uirc, java.lang.String value)
uirc
- UI resource collectionvalue
- value in textual formtrue
if it was possible to extract the value from the text,
false
otherwiseprotected abstract java.lang.Object toValue(java.lang.String text)
text
- textual representationnull
if the text cannot be convertedfromValue(Object)
protected java.lang.String fromValue(java.lang.Object value)
value
- the UI valuetoValue(String)
public abstract java.lang.Class<?> getHandledClass()