com.l2fprod.common.propertysheet
Class DefaultProperty

java.lang.Object
  extended by com.l2fprod.common.propertysheet.AbstractProperty
      extended by com.l2fprod.common.propertysheet.DefaultProperty
All Implemented Interfaces:
Property, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
PropertySheetPage3.ColorComponentProperty, PropertySheetPage3.ColorProperty

public class DefaultProperty
extends AbstractProperty

DefaultProperty.

See Also:
Serialized Form

Constructor Summary
DefaultProperty()
           
 
Method Summary
 void addSubProperties(java.util.Collection subProperties)
           
 void addSubProperties(Property[] subProperties)
           
 void addSubProperty(Property subProperty)
           
 void clearSubProperties()
           
 boolean equals(java.lang.Object other)
          Compares two DefaultProperty objects.
 java.lang.String getCategory()
           
 java.lang.String getDisplayName()
           
 java.lang.String getName()
           
 Property getParentProperty()
           
 java.lang.String getShortDescription()
           
 Property[] getSubProperties()
           
 java.lang.Class getType()
           
 int hashCode()
           
 boolean isEditable()
           
 void readFromObject(java.lang.Object object)
          Reads the value of this Property from the given object.
 void setCategory(java.lang.String category)
           
 void setDisplayName(java.lang.String displayName)
           
 void setEditable(boolean editable)
           
 void setName(java.lang.String name)
           
 void setParentProperty(Property parent)
           
 void setShortDescription(java.lang.String shortDescription)
           
 void setType(java.lang.Class type)
           
 void setValue(java.lang.Object value)
           
 java.lang.String toString()
           
 void writeToObject(java.lang.Object object)
          Writes the value of the Property to the given object.
 
Methods inherited from class com.l2fprod.common.propertysheet.AbstractProperty
addPropertyChangeListener, clone, firePropertyChange, getValue, initializeValue, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultProperty

public DefaultProperty()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getDisplayName

public java.lang.String getDisplayName()

setDisplayName

public void setDisplayName(java.lang.String displayName)

getShortDescription

public java.lang.String getShortDescription()

setShortDescription

public void setShortDescription(java.lang.String shortDescription)

getType

public java.lang.Class getType()

setType

public void setType(java.lang.Class type)

isEditable

public boolean isEditable()

setEditable

public void setEditable(boolean editable)

getCategory

public java.lang.String getCategory()

setCategory

public void setCategory(java.lang.String category)

readFromObject

public void readFromObject(java.lang.Object object)
Reads the value of this Property from the given object. It uses reflection and looks for a method starting with "is" or "get" followed by the capitalized Property name.


writeToObject

public void writeToObject(java.lang.Object object)
Writes the value of the Property to the given object. It uses reflection and looks for a method starting with "set" followed by the capitalized Property name and with one parameter with the same type as the Property.


setValue

public void setValue(java.lang.Object value)
Specified by:
setValue in interface Property
Overrides:
setValue in class AbstractProperty

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Compares two DefaultProperty objects. Two DefaultProperty objects are equal if they are the same object or if their name, display name, short description, category, type and editable property are the same. Note the property value is not considered in the implementation.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getParentProperty

public Property getParentProperty()
Specified by:
getParentProperty in interface Property
Overrides:
getParentProperty in class AbstractProperty

setParentProperty

public void setParentProperty(Property parent)

getSubProperties

public Property[] getSubProperties()
Specified by:
getSubProperties in interface Property
Overrides:
getSubProperties in class AbstractProperty

clearSubProperties

public void clearSubProperties()

addSubProperties

public void addSubProperties(java.util.Collection subProperties)

addSubProperties

public void addSubProperties(Property[] subProperties)

addSubProperty

public void addSubProperty(Property subProperty)