Package org.jdesktop.swingx.renderer
Class MappedValue
java.lang.Object
org.jdesktop.swingx.renderer.MappedValue
- All Implemented Interfaces:
Serializable
,BooleanValue
,IconValue
,StringValue
- Direct Known Subclasses:
MappedValues.MappedValueUIResource
Compound implementation of XXValue. Currently, XX stands for String,
Icon, Boolean.
Quick hack around #590-swingx: LabelProvider should respect StringValue when formatting (instead of going clever with icons). Note: this will change!
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jdesktop.swingx.renderer.IconValue
IconValue.IconType
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionMappedValue
(StringValue stringDelegate, IconValue iconDelegate) MappedValue
(StringValue stringDelegate, IconValue iconDelegate, BooleanValue booleanDelegate) -
Method Summary
-
Constructor Details
-
MappedValue
-
MappedValue
public MappedValue(StringValue stringDelegate, IconValue iconDelegate, BooleanValue booleanDelegate)
-
-
Method Details
-
getString
Returns a string representation of the given value.PENDING JW: forgot - why not null return guaranteed?
This implementation delegates to the contained StringValue if available or returns an empty String, if not.
- Specified by:
getString
in interfaceStringValue
- Parameters:
value
- the object to present as a string- Returns:
- a string representation of the given value, guaranteed to be not null
-
getIcon
Returns a icon representation of the given value.This implementation delegates to the contained IconValue if available or returns null, if not.
-
getBoolean
get boolean from objectThis implementation delegates to the contained BooleanValue if available or returns false, if not.
- Specified by:
getBoolean
in interfaceBooleanValue
- Parameters:
value
- as Object- Returns:
- boolean
-