|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.meta.PropertyInfo
public class PropertyInfo
Describes the characteristics of a single property. This provides additional info that is useful to all or most forms of rendering/editing.
Field Summary | |
---|---|
static int |
ALIGN_CENTER
|
static int |
ALIGN_LEFT
|
static int |
ALIGN_RIGHT
|
Constructor Summary | |
---|---|
PropertyInfo()
Creates an empty and unfixed property info suitable for bean-like property loading. |
|
PropertyInfo(PropertyInfo info,
PropertyType type)
|
|
PropertyInfo(java.lang.String propertyName,
PropertyInfo info)
|
|
PropertyInfo(java.lang.String propertyName,
java.lang.String name,
PropertyType type)
|
|
PropertyInfo(java.lang.String propertyName,
java.lang.String name,
java.lang.String shortName,
PropertyType type)
|
|
PropertyInfo(java.lang.String propertyName,
java.lang.String name,
java.lang.String shortName,
java.lang.String description,
PropertyType type,
int alignment,
boolean writable)
|
|
PropertyInfo(java.lang.String propertyName,
java.lang.String name,
java.lang.String shortName,
java.lang.String description,
PropertyType type,
int alignment,
boolean writable,
boolean readable)
|
|
PropertyInfo(java.lang.String propertyName,
java.lang.String name,
java.lang.String shortName,
java.lang.String description,
PropertyType type,
java.lang.Object defaultValue,
int alignment,
boolean writable,
boolean readable)
|
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object obj)
|
boolean |
equals(PropertyInfo obj)
|
java.lang.Object |
getDefaultValue()
Returns the default value for this property or null if no default value has been defined. |
java.lang.String |
getDescription()
Returns a short description of the property. |
java.lang.String |
getName()
Returns a name that can be used in normal sized UI components or renderers. |
int |
getPropertyAlignment()
Returns the preferred alignment for this property. |
java.lang.String |
getPropertyName()
Returns the name of this property as would be used to access the actual value in the meta-object. |
PropertyType |
getPropertyType()
Returns the type of this property. |
java.lang.String |
getShortName()
Returns a name that can be used in limited-space situations like table headers, etc.. |
static java.lang.String |
getSplitName(java.lang.String name)
Attempts to break up a property name up based on letter case and runs of upper case letters. |
int |
hashCode()
|
boolean |
isFixed()
Returns true if this object cannot be modified. |
boolean |
isReadable()
Returns true if this property can be read. |
boolean |
isWritable()
Returns true if this property can be updated. |
PropertyInfo |
replacePropertyName(java.lang.String name)
Clones this property info, replacing the property name with the name specified. |
PropertyInfo |
replacePropertyType(PropertyType type)
Clones this property info, replacing the property type with the type specified. |
void |
setDefaultValue(java.lang.Object defaultValue)
Sets the default value for this property. |
void |
setDescription(java.lang.String description)
Sets the short description of the property. |
void |
setFixed(boolean fixed)
Sets the mutable/immutable state of this object. |
void |
setName(java.lang.String name)
Sets the displayable version of the property name. |
void |
setPropertyAlignment(int alignment)
Sets the alignment of this property. |
void |
setPropertyName(java.lang.String name)
Sets the property name this PropertyInfo represents. |
void |
setPropertyType(PropertyType type)
Sets the type of this property. |
void |
setReadable(boolean readable)
Sets the redability of this property. |
void |
setShortName(java.lang.String name)
Sets the short displayable version of the property name. |
void |
setWritable(boolean writable)
Sets the writability of this property. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ALIGN_CENTER
public static final int ALIGN_LEFT
public static final int ALIGN_RIGHT
Constructor Detail |
---|
public PropertyInfo()
public PropertyInfo(java.lang.String propertyName, java.lang.String name, java.lang.String shortName, java.lang.String description, PropertyType type, int alignment, boolean writable, boolean readable)
public PropertyInfo(java.lang.String propertyName, java.lang.String name, java.lang.String shortName, java.lang.String description, PropertyType type, java.lang.Object defaultValue, int alignment, boolean writable, boolean readable)
public PropertyInfo(java.lang.String propertyName, java.lang.String name, java.lang.String shortName, java.lang.String description, PropertyType type, int alignment, boolean writable)
public PropertyInfo(java.lang.String propertyName, java.lang.String name, PropertyType type)
public PropertyInfo(java.lang.String propertyName, java.lang.String name, java.lang.String shortName, PropertyType type)
public PropertyInfo(PropertyInfo info, PropertyType type)
public PropertyInfo(java.lang.String propertyName, PropertyInfo info)
Method Detail |
---|
public PropertyInfo replacePropertyType(PropertyType type)
public PropertyInfo replacePropertyName(java.lang.String name)
public void setFixed(boolean fixed) throws IllegalModificationException
setFixed
in interface Fixable
IllegalModificationException
- if the object does not support a specific
mutability shift. For example, most immutable objects
will not allow setFixed( false ).public boolean isFixed()
isFixed
in interface Fixable
public static java.lang.String getSplitName(java.lang.String name)
public void setPropertyName(java.lang.String name)
public java.lang.String getPropertyName()
public void setShortName(java.lang.String name)
public java.lang.String getShortName()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setPropertyType(PropertyType type)
public PropertyType getPropertyType()
public void setDefaultValue(java.lang.Object defaultValue)
public java.lang.Object getDefaultValue()
public void setPropertyAlignment(int alignment)
public int getPropertyAlignment()
public void setReadable(boolean readable)
public boolean isReadable()
public void setWritable(boolean writable)
public boolean isWritable()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(PropertyInfo obj)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |