|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.lang.ObjectData
public class ObjectData
ObjectData is an implementation of ObjectDataInterface, a container for holding an Object. The ObjectData container has a bound objectData property, so the ObjectData object fires a PropertyChangeEvent when the object is changed with setObjectData(Object).
Creating an ObjectData Component
Usage
The ObjectData component stores object data. This class and the other *Data components in com.sas.lang provide a convenient means of storing your application data and keeping it separate from the user interface, allowing you to change the interface more easily. For example, instead of relying on the user interface components to hold your data and linking to properties of list boxes, etc., you can instead store your data in one or more ObjectData components. Then, link your UI components to the objectData property of the ObjectData object.
For example, link the selectedObjects property of a listbox to the objectData property of a ObjectData component named selections. The rest of the application that is interested in the array of selections should link to selections.objectData instead of the list box. Now, you are free to change the user interface (for example, from a ListBox to a ComboBox or a RadioBox or a Choice component) without impacting the rest of the application, because there are no other links to the ListBox which have to be recreated if you delete the ListBox and replace it with a different UI component. You only need to recreate the single link between the choice.selectedObjects and selections.objectData properties; the rest of the application will continue to work as before.
| Field Summary | |
|---|---|
static java.lang.String |
RB_KEY
|
| Constructor Summary | |
|---|---|
ObjectData()
Default Constructor |
|
ObjectData(java.lang.Object value)
Construct an object with an initial value. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates a copy of the current model |
boolean |
equals(java.lang.Object object)
Tests if this object equals another object |
boolean |
equals(ObjectData other)
Tests if this object equals another ObjectData object |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns the ExtendedBeanInfo for this class. |
java.lang.Object |
getObjectData()
Retrieves the Object stored in the Object model |
java.lang.String |
getText()
Retrieves the text value of the model. |
int |
hashCode()
Computes a hash code. |
void |
setObjectData(java.lang.Object value)
Sets the Object stored in the Object model. |
void |
setText(java.lang.String string)
Assigns the value of the object from a string value. |
java.lang.String |
toString()
Returns a String representation of the data. |
static java.lang.String |
toString(java.lang.Object object)
Convert an object to a string, using localized number formats for Double and Float values. |
| Field Detail |
|---|
public static final java.lang.String RB_KEY
| Constructor Detail |
|---|
public ObjectData()
public ObjectData(java.lang.Object value)
value - the initial value| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public static java.lang.String toString(java.lang.Object object)
object - an object
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface com.sas.PublicClonableclone in class Componentjava.lang.CloneNotSupportedException - if the
object cannot be clonedpublic boolean equals(ObjectData other)
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic java.lang.Object getObjectData()
getObjectData in interface com.sas.lang.ObjectDataInterfacepublic java.lang.String getText()
getText in interface com.sas.lang.StringDataInterfacepublic int hashCode()
hashCode in class java.lang.Objectpublic void setObjectData(java.lang.Object value)
setObjectData in interface com.sas.lang.ObjectDataInterfacevalue - new object datapublic void setText(java.lang.String string)
setObjectData(string)
setText in interface com.sas.lang.StringDataInterfacestring - a string representation of the text.public java.lang.String toString()
toString in class java.lang.Object
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||