|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdsto.dfc.swt.icons.ValueLabel
public class ValueLabel
A value/label struct for abstracting the information displayed on Button's, Label's, Item's etc. Can also have an optional icon.
| Field Summary | |
|---|---|
Icon |
icon
The (optional) icon. |
String |
label
The user-visible label. |
Object |
value
The value associated with this label. |
| Constructor Summary | |
|---|---|
ValueLabel(String label,
boolean value)
Shortcut to create a new instance with a boolean value. |
|
ValueLabel(String label,
Icon icon,
Object value)
Create a new instance. |
|
ValueLabel(String label,
int value)
Shortcut to create a new instance with an integer value. |
|
ValueLabel(String label,
Object value)
Create a new instance. |
|
| Method Summary | |
|---|---|
String |
getPlainLabel()
Get the plain label text, with any shortcut "&"'s removed. |
static String |
labelFor(ValueLabel[] valueLabels,
Object value)
Get the label associated with a value. |
static String |
plainLabelFor(ValueLabel[] valueLabels,
Object value)
Get the plain text label associated with a value (see getPlainLabel()). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final Object value
public final String label
public final Icon icon
| Constructor Detail |
|---|
public ValueLabel(String label,
int value)
ValueLabel(String, Icon, Object)
public ValueLabel(String label,
boolean value)
ValueLabel(String, Icon, Object)
public ValueLabel(String label,
Object value)
label - The label,value - The value associated with the label.
public ValueLabel(String label,
Icon icon,
Object value)
label - The label,icon - The icon (may be null).value - The value associated with the label.| Method Detail |
|---|
public String getPlainLabel()
public static String labelFor(ValueLabel[] valueLabels,
Object value)
throws IllegalArgumentException
valueLabels - The array of value/label's to search.value - The value to look for.
IllegalArgumentException - if there is no label for value.
public static String plainLabelFor(ValueLabel[] valueLabels,
Object value)
getPlainLabel()).
valueLabels - The array of value/label's to search.value - The value to look for.
IllegalArgumentException - if there is no label for value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||