|
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.tview.AgoColumnBase | +--com.sssw.rt.tview.AgoColumnText | +--com.sssw.rt.tview.AgoColumnComboBox
AgoColumnComboBox is a bound column that displays a list of values from which users can browse and select values. You can populate the list from an object that implements AgiRowCursor (like an AgcData) or from a string array.
When the column is bound to an AgiRowCursor column, the value in the database sets the initially selected item in the list. If the user makes a different selection from the ComboBox's list, the selection becomes the value associated with the current row. The selected value is saved to the database when updateRows() is called.
Field Summary | |
static String |
DISPLAY_VALUE
A constant whose value is "Msg". |
static String |
STORAGE_VALUE
A constant whose value is "Value". |
Fields inherited from class com.sssw.rt.tview.AgoColumnText |
MULTILINE |
Constructor Summary | |
AgoColumnComboBox()
|
Method Summary | |
boolean |
getEditable()
Returns the editable property for the column |
boolean |
getEditWhenSelected()
Returns the state of the edit when selected property. |
void |
initColumnComboProperty(String propertyName,
AgiRowCursor rc,
boolean editable)
Sets up a number of parameters for comobobox columns loaded from a database table or another AgiRowCursor implementation. |
void |
initColumnComboProperty(String propertyName,
String[] text,
Object[] values,
boolean editable)
Sets a number of parameters for combobox columns loaded from String Arrays. |
void |
setEditable(boolean editable)
Sets the columns editable property |
void |
setEditWhenSelected(boolean editWhenSelected)
Sets the state of the edit when selected property. |
void |
setListValues(AgiRowCursor rc)
Sets the AgiRowCursor that will provide the data for the list. |
void |
setListValues(String[] text,
Object[] values)
Set the arrays that will provide the data for the list. |
Methods inherited from class com.sssw.rt.tview.AgoColumnText |
applyFormat,
getAdjustWidthForContent,
getColor,
getColumnName,
getDatatype,
getFontIdentifier,
getFormatPattern,
getFormatStyle,
getMaxPointSize,
getMinPointSize,
getPropertyName,
initColumnTextHeader,
initColumnTextProperty,
setAdjustWidthForContent,
setColor,
setColumnName,
setFontIdentifier,
setFormatPattern,
setFormatStyle,
setMaxPointSize,
setMinPointSize,
setPropertyName |
Methods inherited from class com.sssw.rt.tview.AgoColumnBase |
getAlignment,
getBackgroundColor,
getBorderType,
getDisplayWidth,
getHidden,
getResizable,
getSelectable,
getTransparent,
getVisible,
getWidth,
isWidthFixed,
setAlignment,
setBackgroundColor,
setBorderType,
setFixedWidth,
setHidden,
setProportionalWidth,
setProportionalWidth,
setResizable,
setSelectable,
setTransparent,
setVisible,
setWidth |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final String STORAGE_VALUE
public static final String DISPLAY_VALUE
Constructor Detail |
public AgoColumnComboBox()
Method Detail |
public void initColumnComboProperty(String propertyName, AgiRowCursor rc, boolean editable)
propertyName
- the name of the database column to which this column is boundrc
- the name of the AgiRowCursor used to populate this column. This AgiRowCursor is not the same row cursor supplied in the AgcView.initView() method. It provides data whose only purpose is to supply the values for the combobox's list.editable
- the editable property for this column (when true the column can be edited)AgoColumnComboBox state; state = new AgoColumnComboBox(); state.initColumnComboProperty("state", agcState,false);
AgoColumnComboBox.initColumnComboProperty(String propertyName, String[] text, Object[] values, boolean editable)
,
AgoColumnComboBox.setListValues(AgiRowCursor rc)
,
AgoColumnComboBox.setEditable(boolean editable)
public void initColumnComboProperty(String propertyName, String[] text, Object[] values, boolean editable)
propertyName
- the name of the database column that the storage values are written totext
- the set of text values displayed in the columnvalues
- the set of values written to the database (the storage value). When not specified the text values are stored.editable
- specifies whether the combobox is editable (it is editable when true)String sStateNames[] = {"Mass", "Maine"}; String sStateAbbrevs[] = {"MA", "ME"}; AgoColumnComboBox state; state = new AgoColumnComboBox(); state.initColumnComboProperty("states", sStateNames, sStateAbbrevs, false);
AgoColumnComboBox.initColumnComboProperty(String propertyName, AgiRowCursor rc, boolean editable)
public boolean getEditWhenSelected()
The default is true.
If you are displaying a large data set, setting this to false can slow down the performance of this control.
boolean editOnSel = myColumn.getEditWhenSelected();
AgoColumnComboBox.setEditWhenSelected(boolean editWhenSelected)
public void setEditWhenSelected(boolean editWhenSelected)
editWhenSelected
- if set to true, cells in the column are displayed as text cells
except when selected by the user. Otherwise, cells are always displayed as combobox fields.The default is true.
If you are displaying more than a few rows of data, setting this to false can slow down the performance of this control.
myColumn.setEditWhenSelected(true);
AgoColumnComboBox.getEditWhenSelected()
public final void setListValues(AgiRowCursor rc)
rc
- the AgiRowCursor that will provide the data. This AgiRowCursor is not the same row cursor supplied in the AgcView.initView() method. It provides data whose only purpose is to supply the values for the combobox's list.AgoColumnComboBox.setListValues(String[] text, Object[] values)
public final void setListValues(String[] text, Object[] values)
text
- the String Array that provides the values to be displayed in the list (the display value)values
- the Object array that contains the values written to the database when the corresponding display value is selected (the storage value)String sStateNames[] = {"Mass", "New Hampshire"}; String sStateAbbrevs[] = {"MA", "NH"}; state.setListValues(sStateNames, sStateAbbrevs);
AgoColumnComboBox.setListValues(AgiRowCursor rc)
public final boolean getEditable()
AgoColumnComboBox.setEditable(boolean editable)
public final void setEditable(boolean editable)
editable
- when true, users can type in the text field portion of the comboboxAgoColumnComboBox.getEditable()
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |