de.matthiasmann.twl.model
Class SimplePropertyList

java.lang.Object
  extended by de.matthiasmann.twl.model.AbstractProperty<PropertyList>
      extended by de.matthiasmann.twl.model.SimplePropertyList
All Implemented Interfaces:
Property<PropertyList>, PropertyList

public class SimplePropertyList
extends AbstractProperty<PropertyList>
implements PropertyList

A simple property list property. Used to create sub properties in the PropertySheet.


Constructor Summary
SimplePropertyList(java.lang.String name)
           
SimplePropertyList(java.lang.String name, Property<?>... properties)
           
 
Method Summary
 void addProperty(int idx, Property<?> property)
           
 void addProperty(Property<?> property)
           
 boolean canBeNull()
          Returns true if this property can be set to null.
 java.lang.String getName()
          The property name as displayed in the UI
 int getNumProperties()
           
 Property<?> getProperty(int idx)
           
 PropertyList getPropertyValue()
          Retrieves the current property value
 java.lang.Class<PropertyList> getType()
          Returns the type of the property.
 boolean isReadOnly()
          Returns true if this property is read only.
 void removeAllProperties()
           
 void removeProperty(int idx)
           
 void setPropertyValue(PropertyList value)
          Changes the property value.
 
Methods inherited from class de.matthiasmann.twl.model.AbstractProperty
addValueChangedCallback, fireValueChangedCallback, hasValueChangedCallbacks, removeValueChangedCallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePropertyList

public SimplePropertyList(java.lang.String name)

SimplePropertyList

public SimplePropertyList(java.lang.String name,
                          Property<?>... properties)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Property
The property name as displayed in the UI

Specified by:
getName in interface Property<PropertyList>
Returns:
the property name

isReadOnly

public boolean isReadOnly()
Description copied from interface: Property
Returns true if this property is read only. Calling the setValue() method on a read only property is undefined.

Specified by:
isReadOnly in interface Property<PropertyList>
Returns:
true if this property is read only

canBeNull

public boolean canBeNull()
Description copied from interface: Property
Returns true if this property can be set to null. This is similar to a SQL null.

Specified by:
canBeNull in interface Property<PropertyList>
Returns:
true if this property can be null

getPropertyValue

public PropertyList getPropertyValue()
Description copied from interface: Property
Retrieves the current property value

Specified by:
getPropertyValue in interface Property<PropertyList>
Returns:
the current property value

setPropertyValue

public void setPropertyValue(PropertyList value)
                      throws java.lang.IllegalArgumentException
Description copied from interface: Property
Changes the property value. If the value is invalid then an IllegalArgumentException argument except should be thrown and the UI will indicate the invalid state of the input.

Specified by:
setPropertyValue in interface Property<PropertyList>
Parameters:
value - The new value
Throws:
java.lang.IllegalArgumentException - if the new value can't be accepted
See Also:
Property.canBeNull()

getType

public java.lang.Class<PropertyList> getType()
Description copied from interface: Property
Returns the type of the property. This is used to select an editor widget in the PropertySheet.

Specified by:
getType in interface Property<PropertyList>
Returns:
The class of the property values

getNumProperties

public int getNumProperties()
Specified by:
getNumProperties in interface PropertyList

getProperty

public Property<?> getProperty(int idx)
Specified by:
getProperty in interface PropertyList

addProperty

public void addProperty(Property<?> property)

addProperty

public void addProperty(int idx,
                        Property<?> property)

removeProperty

public void removeProperty(int idx)

removeAllProperties

public void removeAllProperties()