|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sssw.rt.jform.AgoDisplayValue
AgoDisplayValue is a wrapper class for values in AgcJList
,
AgcJComboBox
, and AgcJTree
. It combines a display value
(title
) and a storage value (userdata
). It
allows list items to have a display value that is different from their
underlying data value. For example, a list could display the text "East
Region" with an underlying data value of 4.
You don't usually need to work with the AgoDisplayValue class. The methods for list classes let you add items by specifying a title and a data value and an AgoDisplayValue object is created and added to the list. When you use Swing methods to get items from the control's data model, the Object returned is an AgoDisplayValue and you can use the methods in this class to get the title and underlying data value.
This code creates an AgoDisplayValue object with "East Region" as the text and a storage value of 4.
AgoDisplayValue item = new AgoDisplayValue( "East Region", new Integer(4) );
Constructor Summary | |
AgoDisplayValue(String title,
Object userdata)
Creates an AgoDisplayValue with the specified display text and userdata
storage value. |
Method Summary | |
static Object |
extractUserData(Object obj)
Static helper method that allows you to work with any object in a list, whether or not it is an AgoDisplayValue object. |
Object |
getUserData()
Gets the storage value for the AgoDisplayValue object. |
String |
toString()
Gets the text that the AgoDisplayValue object displays in a list. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public AgoDisplayValue(String title, Object userdata)
userdata
storage value. When the list is bound to a database column and this
AgoDisplayValue object is selected, the userdata
value is
stored in the database. If userdata
is null, then
title
is used for both the display and storage value.title
- a String specifying the text that is displayed for the item
in a list controluserdata
- an Object whose value is the storage value for the
list itemMethod Detail |
public String toString()
public Object getUserData()
public static Object extractUserData(Object obj)
extractUserData()
to get the "value" of the object, which
is either the underlying storage value for an AgoDisplayValue object or
the Object itself.obj
- an Object for which you want the storage value, if any
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |