| java.lang.Object org.eclipse.ui.examples.propertysheet.Address
Address | public class Address implements IPropertySource(Code) | | Example IPropertySource who itself is NOT editable, but whose children are.
The values of the children determine the value of the address.
|
P_ID_POSTALCODE | final public static String P_ID_POSTALCODE(Code) | | |
Address | Address()(Code) | | Address Default Constructor
|
Address | public Address(StreetAddress street, String city, Integer province, String postalCode)(Code) | | Creates a new address.
Parameters: street - the street Parameters: city - the city Parameters: province - the province Parameters: postalCode - has the form XYXYXY: where X is a letter and Y is a digit exception: IllegalArgumentException - , if postalcode not in above form |
getPropertyValue | public Object getPropertyValue(Object propKey)(Code) | | The Address implementation of this
IPropertySource method returns the following properties
1) P_CITY returns java.lang.String
2) P_POSTALCODE returns java.lang.String
3) P_PROVINCE returns java.lang.String
4) P_STREET returns StreetAddress
|
isPropertySet | public boolean isPropertySet(Object property)(Code) | | |
resetPropertyValue | public void resetPropertyValue(Object property)(Code) | | |
setPropertyValue | public void setPropertyValue(Object name, Object value)(Code) | | The Address implementation of this
IPropertySource method
defines the following Setable properties
1) P_CITY expects java.lang.String
2) P_POSTALCODE expects java.lang.String
3) P_PROVINCE expects java.lang.String
P_ID_STREET is not set here since it is referenced
and set directly in StreetAddress.
According to IPropertySource, StreetAddress.getEditableValue
should return a String which will be passed to this method
as the value. A new StreetAddress object should then be
created from the string.
An alternative would be to return the StreetAddress
directly in StreetAddress.getEditableValue and define a
cell editor for the StreetAddress property.
This was ommitted for the sake of simplicity.
|
toString | public String toString()(Code) | | The value as displayed in the Property Sheet.
java.lang.String |
|
|