|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.guir.lib.properties.PropertySchema
Specifies a single schema for a property in the FlexProperties class.
There are three methods you may want to override:
acceptValue(Object, Object)
onIllegalArgumentException(IllegalArgumentException, Object,
Object)
onPropertyVetoException(PropertyVetoException,Object,Object)
This software is distributed under the Berkeley Software License.
Revisions: - GUIRLib-v1.0-1.0.0, Jun 02 2000, JH Created class - GUIRLib-v1.2-1.0.0, Jun 22 2000, JH Touched for GUIRLib release - GUIRLib-v1.3-1.0.0, Aug 11 2000, JH Touched for GUIRLib release - GUIRLib-v1.4-1.0.0, Aug 31 2000, JH Touched for GUIRLib release
Fields inherited from interface edu.berkeley.guir.lib.properties.PropertyConstants |
PROPERTY_BOUND, PROPERTY_CONSTRAINED, PROPERTY_INDEXED, PROPERTY_SIMPLE |
Constructor Summary | |
PropertySchema(String newPropertyName)
|
|
PropertySchema(String newPropertyName,
int propertyType)
|
Method Summary | |
boolean |
acceptValue(Object oldVal,
Object newVal)
Check if this value acceptable for this property. |
String |
getPropertyName()
Get the name of this property. |
int |
getPropertyType()
|
boolean |
isBoundProperty()
|
boolean |
isConstrainedProperty()
|
boolean |
isIndexedProperty()
|
boolean |
isSimpleProperty()
|
void |
onIllegalArgumentException(IllegalArgumentException e,
Object oldVal,
Object newVal)
Occurs if acceptValue(Object, Object) fails. |
void |
onPropertyVetoException(PropertyVetoException e,
Object oldVal,
Object newVal)
Occurs if one of the veto change listeners throws a hissy fit. |
void |
setBoundProperty()
|
void |
setConstrainedProperty()
|
void |
setIndexedProperty()
|
void |
setPropertyName(String newPropertyName)
|
void |
setPropertyType(int type)
|
void |
setSimpleProperty()
|
String |
toString()
Get a String version of this schema. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PropertySchema(String newPropertyName)
public PropertySchema(String newPropertyName, int propertyType)
Method Detail |
public boolean acceptValue(Object oldVal, Object newVal)
Override this method to specify valid types and values.
public void onIllegalArgumentException(IllegalArgumentException e, Object oldVal, Object newVal)
acceptValue(Object, Object)
fails.
The current value of the property will still be oldVal.
Default behavior is to print exception to System.err.
Override this method to a new behavior for exception handling.
e
- is the exception thrown.oldVal
- is the original and current value.newVal
- is the proposed value that caused the exception.public void onPropertyVetoException(PropertyVetoException e, Object oldVal, Object newVal)
Override this method to a new behavior for exception handling.
e
- is the exception thrown.oldVal
- is the original and current value.newVal
- is the proposed value that caused the exception.public void setPropertyName(String newPropertyName)
public String getPropertyName()
public void setPropertyType(int type)
public int getPropertyType()
public void setSimpleProperty()
public boolean isSimpleProperty()
public void setBoundProperty()
public boolean isBoundProperty()
public void setConstrainedProperty()
public boolean isConstrainedProperty()
public void setIndexedProperty()
public boolean isIndexedProperty()
public String toString()
toString
in class Object
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |