Package net.infonode.properties.base
Interface Property
- All Known Implementing Classes:
AbstractProperty
,AlignmentProperty
,BooleanProperty
,BorderProperty
,ButtonFactoryProperty
,ColorProperty
,ComponentPainterProperty
,DimensionProviderProperty
,DirectionProperty
,DockingWindowActionProperty
,DockingWindowTitleProviderProperty
,DropFilterProperty
,EnumProperty
,FloatProperty
,FontProperty
,HoverListenerProperty
,IconProperty
,InsetsProperty
,IntegerProperty
,NumberProperty
,PropertyGroupProperty
,PropertyMapProperty
,StringProperty
,TabAreaVisiblePolicyProperty
,TabbedPanelHoverPolicyProperty
,TabDepthOrderPolicyProperty
,TabDropDownListVisiblePolicyProperty
,TabLayoutPolicyProperty
,TabSelectTriggerProperty
,TitledTabBorderSizePolicyProperty
,TitledTabSizePolicyProperty
,ValueHandlerProperty
public interface Property
A property is belongs to a
PropertyGroup
and contains name, description, type etc.
A property can have multiple values which can be stored in any type of object.-
Method Summary
Modifier and TypeMethodDescriptionboolean
canBeAssiged
(Object value) Returns true if the value can be assigned to this property.Returns a description of this property.getGroup()
Returns the property group that this property belongs to.getName()
Returns the property name.getType()
Returns the value type of this property.Returns the value of this property in a value container.boolean
Returns true if this property is mutable.void
removeValue
(Object valueContainer) Removes the value of this property from an valueContainer.void
Sets the value of this property in an object.boolean
valueIsRemovable
(Object valueContainer) Returns true if the value of this property can be removed from the valueContainer.boolean
valueIsSet
(Object valueContainer) Returns true if this property has a value in the valueContainer.
-
Method Details
-
getName
String getName()Returns the property name.- Returns:
- the property name
-
getDescription
String getDescription()Returns a description of this property.- Returns:
- a description of this property
-
getType
Class getType()Returns the value type of this property. The property can only be set to values that are of this class or a sub class of this class.- Returns:
- the value type of this property
-
getGroup
PropertyGroup getGroup()Returns the property group that this property belongs to.- Returns:
- the property group that this property belongs to
-
getValue
Returns the value of this property in a value container.- Parameters:
valueContainer
- the object containing the value- Returns:
- the value of this property in an valueContainer, null if the container doesn't contain the value
- Throws:
InvalidPropertyException
- if the property can not be read from the value container
-
setValue
void setValue(Object valueContainer, Object value) throws ImmutablePropertyException, InvalidPropertyException, InvalidPropertyValueException Sets the value of this property in an object.- Parameters:
valueContainer
- the object to set the property value invalue
- the value of the property- Throws:
ImmutablePropertyException
- if this property is immutableInvalidPropertyException
- if this property can't be set in the objectInvalidPropertyValueException
- if the property value is invalid
-
canBeAssiged
Returns true if the value can be assigned to this property.- Parameters:
value
- the value to assign- Returns:
- true if the value can be assigned to this property
-
isMutable
boolean isMutable()Returns true if this property is mutable.- Returns:
- true if this property is mutable
-
valueIsRemovable
Returns true if the value of this property can be removed from the valueContainer.- Parameters:
valueContainer
- the object from which to remove the value- Returns:
- true if the value of this property can be removed from the valueContainer
-
valueIsSet
Returns true if this property has a value in the valueContainer.- Parameters:
valueContainer
- the object that might contain the value- Returns:
- true if this property has a value in the valueContainer
-
removeValue
Removes the value of this property from an valueContainer.- Parameters:
valueContainer
- the object in which to remove the value- Throws:
ImmutablePropertyException
- if the property is immutableCantRemoveValueException
- if the property value can't be removed from the valueContainer
-