public class MappedValue extends Object implements StringValue, IconValue, BooleanValue
Quick hack around #590-swingx: LabelProvider should respect StringValue when formatting (instead of going clever with icons). Note: this will change!
CheckBoxProvider
,
Serialized FormIconValue.IconType
Modifier and Type | Field and Description |
---|---|
private BooleanValue |
booleanDelegate |
private IconValue |
iconDelegate |
private StringValue |
stringDelegate |
Constructor and Description |
---|
MappedValue(StringValue stringDelegate,
IconValue iconDelegate) |
MappedValue(StringValue stringDelegate,
IconValue iconDelegate,
BooleanValue booleanDelegate) |
Modifier and Type | Method and Description |
---|---|
boolean |
getBoolean(Object value)
This implementation delegates to the contained BooleanValue if available or
returns false, if not.
|
Icon |
getIcon(Object value)
Returns a icon representation of the given value.
|
String |
getString(Object value)
Returns a string representation of the given value.
|
private StringValue stringDelegate
private IconValue iconDelegate
private BooleanValue booleanDelegate
public MappedValue(StringValue stringDelegate, IconValue iconDelegate)
public MappedValue(StringValue stringDelegate, IconValue iconDelegate, BooleanValue booleanDelegate)
public String getString(Object 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.
getString
in interface StringValue
value
- the object to present as a stringpublic Icon getIcon(Object value)
This implementation delegates to the contained IconValue if available or returns null, if not.
public boolean getBoolean(Object value)
This implementation delegates to the contained BooleanValue if available or returns false, if not.
getBoolean
in interface BooleanValue
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses