public class BooleanProperty extends Property
PropertiesList
.
BooleanPropertyGroup
then the value is displayed with a radio button.Property
Constructor and Description |
---|
BooleanProperty(java.lang.String name,
java.lang.String description)
Creates a new boolean property.
|
BooleanProperty(java.lang.String name,
java.lang.String description,
boolean initialValue)
Creates a new boolean property.
|
BooleanProperty(java.lang.String name,
java.lang.String description,
boolean initialValue,
BooleanPropertyGroup group)
Creates a new boolean property.
|
BooleanProperty(java.lang.String name,
java.lang.String description,
BooleanPropertyGroup group)
Creates a new boolean property.
|
Modifier and Type | Method and Description |
---|---|
protected javax.swing.table.TableCellEditor |
createEditor(java.lang.Object[] arguments)
Creates the editor of the property.
|
protected javax.swing.table.TableCellRenderer |
createRenderer(java.lang.Object[] arguments)
Creates the renderer of the property.
|
java.lang.Boolean |
getValue()
Gets the value of the property.
|
protected java.lang.Class<?> |
getValueClass()
Gets the class of the value.
|
protected java.lang.Object |
onEditStop(java.lang.Object value)
Checks if the committed value is valid.
|
void |
setValue(boolean value)
Sets the value of the boolean property.
|
void |
setValue(java.lang.Object value)
Sets the value of the property.
|
getDescription, getName, toString
public BooleanProperty(java.lang.String name, java.lang.String description) throws java.lang.IllegalArgumentException
name
- the name of the propertydescription
- the description of the property (the description can contain html tags to format the text)java.lang.IllegalArgumentException
- public BooleanProperty(java.lang.String name, java.lang.String description, BooleanPropertyGroup group) throws java.lang.IllegalArgumentException
name
- the name of the propertydescription
- the description of the property (the description can contain html tags to format the text)group
- the group to which this property belongs to or null
(in a boolean group there is only one property selected meaning that only one property has a value of true
)java.lang.IllegalArgumentException
- public BooleanProperty(java.lang.String name, java.lang.String description, boolean initialValue)
name
- the name of the propertydescription
- the description of the property (the description can contain html tags to format the text)initialValue
- the initial value of the propertyjava.lang.IllegalArgumentException
- public BooleanProperty(java.lang.String name, java.lang.String description, boolean initialValue, BooleanPropertyGroup group) throws java.lang.IllegalArgumentException
name
- the name of the propertydescription
- the description of the property (the description can contain html tags to format the text)initialValue
- the initial value of the propertygroup
- the group to which this property belongs to or null
(in a boolean group there is only one property selected meaning that only one property has a value of true
)java.lang.IllegalArgumentException
- public java.lang.Boolean getValue()
public void setValue(java.lang.Object value) throws java.lang.IllegalArgumentException
public void setValue(boolean value) throws java.lang.IllegalArgumentException
value
- the valuejava.lang.IllegalArgumentException
- protected javax.swing.table.TableCellEditor createEditor(java.lang.Object[] arguments)
Property
IllegalStateException
is thrown.createEditor
in class Property
arguments
- the arguments list which is committed by the constructor or null
DefaultCellEditor
,
ColorCellEditor
,
SliderCellEditor
protected javax.swing.table.TableCellRenderer createRenderer(java.lang.Object[] arguments)
Property
null
) the value class
(Property.getValueClass()
) is used to find a default cell renderer for this property (see DefaultTableCellRenderer
) .createRenderer
in class Property
arguments
- the arguments list which is committed by the constructor or null
null
if the default renderer should be usedprotected java.lang.Class<?> getValueClass()
Property
String.class
or if you have
a numeric property the return value should be Number.class
and so on.
Property.createRenderer(Object[])
returns null
) the value class is used to set the default cell renderer for this property.getValueClass
in class Property
protected java.lang.Object onEditStop(java.lang.Object value)
Property
onEditStop
in class Property
value
- the edit valueProperty.setValue(Object)