public class ControlSetItem extends java.lang.Object implements java.io.Externalizable, Printable
| Modifier and Type | Field and Description |
|---|---|
private boolean |
enabled
Item is enabled for RADIO-SET
|
private java.lang.String |
format
The value's format.
|
private int |
itemId
Item id - required for correct restore of the selection after list modification.
|
private character |
label
Item label.
|
private BaseDataType |
value
Item value.
|
| Constructor and Description |
|---|
ControlSetItem()
Default constructor
|
ControlSetItem(character label,
BaseDataType value)
Constructor for the
ControlSetItem instances. |
ControlSetItem(int id,
character label,
BaseDataType value)
Constructor for the
ControlSetItem instances. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
character |
getCharacterValue()
Get the character representation of its value.
|
int |
getItemId()
Get item id.
|
character |
getLabel()
Get item label.
|
BaseDataType |
getValue()
Get item value.
|
int |
hashCode() |
boolean |
isEnabled()
Check if item is enabled.
|
void |
print(PrintHelper printer)
Print all class-specific fields.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
setEnabled(boolean enabled)
Set item 'enabled' flag.
|
void |
setFormat(java.lang.String format)
Set the value's format, as reported by
getCharacterValue(). |
void |
setItemId(int value)
Set item id.
|
void |
setLabel(character label)
Set item label.
|
void |
setValue(BaseDataType value)
Set item value.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
private int itemId
private character label
private BaseDataType value
private boolean enabled
private java.lang.String format
public ControlSetItem()
public ControlSetItem(int id,
character label,
BaseDataType value)
ControlSetItem instances.id - Item id.label - Item label.value - Item value.public ControlSetItem(character label, BaseDataType value)
ControlSetItem instances.label - Item label.value - Item value.public void setFormat(java.lang.String format)
getCharacterValue().format - The value's format.public character getLabel()
public void setLabel(character label)
label - New item label.public BaseDataType getValue()
public void setValue(BaseDataType value)
value - New item value.public int getItemId()
public void setItemId(int value)
value - New item id.public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - New value of item's 'enabled' flag.public character getCharacterValue()
format.public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - The output destination to which fields will be saved.java.io.IOException - In case of I/O errors.public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - The input source from which fields will be restored.java.io.IOException - In case of I/O errors.java.lang.ClassNotFoundException - If payload can't be instantiated.public java.lang.String toString()
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class java.lang.Objectpublic void print(PrintHelper printer)