| java.lang.Object jaxx.runtime.swing.Item
Item | public class Item (Code) | | An item in a component such as JComboBox or JTree . The Item
class corresponds to the <item> tag in JAXX source files.
|
LABEL_PROPERTY | final public static String LABEL_PROPERTY(Code) | | |
SELECTED_PROPERTY | final public static String SELECTED_PROPERTY(Code) | | |
VALUE_PROPERTY | final public static String VALUE_PROPERTY(Code) | | |
Item | public Item(String id, String label, Object value, boolean selected)(Code) | | Creates a new Item. This should only be called from compiled JAXX files.
Parameters: id - the item's ID Parameters: label - the string that should be used to represent the item visually Parameters: value - the item's actual value Parameters: selected - true if the item should be selected by default |
addChild | public void addChild(Item item)(Code) | | Adds a new child node (Items can be nested in trees).
Parameters: item - the new child item |
getChildren | public List getChildren()(Code) | | Returns a list of this item's children.
a list of all nested child nodes |
getId | public String getId()(Code) | | Returns this item's ID.
the JAXX ID attribute |
getLabel | public String getLabel()(Code) | | Returns the string that should be used to represent the item at display time. If null ,
String.valueOf(getValue()) will be used instead.
this item's display string See Also: Item.setLabel |
getParent | public Item getParent()(Code) | | Returns the Item containing this Item , or null for a top-level
Item .
|
getValue | public Object getValue()(Code) | | Returns the item's actual value as it appears in the component's model. The Item itself is not
visible from the model, only the value.
the item's value See Also: Item.setValue |
isSelected | public boolean isSelected()(Code) | | Returns true if this item is currently selected. This is a bound property.
See Also: Item.setSelected |
setLabel | public void setLabel(String label)(Code) | | Sets the item's display string. If null, String.valueOf(getValue()) will be used instead.
Parameters: label - the new display string See Also: Item.getLabel |
setSelected | public void setSelected(boolean selected)(Code) | | Sets the item's selection state. This is a bound property.
Parameters: selected - the new selection state See Also: Item.isSelected |
setValue | public void setValue(Object value)(Code) | | Sets the item's value as it appears in the component's model. The Item itself is not
visible from the model, only the value.
Parameters: value - the new value See Also: Item.getValue |
|
|