|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.widgets.form.fields.FormItem
com.smartgwt.client.widgets.form.fields.CanvasItem
com.smartgwt.client.widgets.form.fields.MultiComboBoxItem
public class MultiComboBoxItem
A MultiComboBoxItem is a combo box that allows the user to select multiple options. Each selected option is represented
as a button that can be clicked to deselect the option. The relative layout of the buttons to the combo box is specified
with the layoutStyle
attribute. The
buttons will be kept in the order that they were added, with the most recently added button being adjacent to the combo
box. MultiComboBoxItem uses the AutoChild pattern to construct the combo box and the buttons so that they can be easily
customized.
ComboBoxItem
Field Summary |
---|
Fields inherited from class com.smartgwt.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
MultiComboBoxItem()
|
|
MultiComboBoxItem(JavaScriptObject jsObj)
|
|
MultiComboBoxItem(String name)
|
|
MultiComboBoxItem(String name,
String title)
|
Method Summary | |
---|---|
Boolean |
getAutoFetchData()
Should the MultiComboBoxItem fetch data from the data source immediately or wait until the
user first opens the pickList. |
Boolean |
getAutoFitButtons()
Specifies whether to autofit the buttons in the MultiComboBoxItem. |
IButton |
getButtonDefaults()
Default properties to be used in creating each IButton . |
IButton |
getButtonProperties()
Properties to be used in creating each option button. |
ComboBoxItem |
getComboBoxDefaults()
Default properties for the ComboBoxItem in a MultiComboBoxItem. |
ComboBoxItem |
getComboBoxProperties()
Properties to be used in creating a ComboBoxItem . |
Integer |
getComboBoxWidth()
Specifies the size of the combo box field. |
String |
getDisplayField()
The displayField of the combo box. |
MultiComboBoxLayoutStyle |
getLayoutStyle()
Specifies the layout style of the combo box and the buttons in the MultiComboBoxItem. |
DataSource |
getOptionDataSource()
The optionDataSource of the combo box. |
static MultiComboBoxItem |
getOrCreateRef(JavaScriptObject jsObj)
|
Boolean |
getUseInsertionOrder()
Specifies whether to arrange the buttons of the MultiComboBoxItem in the order that they were selected (the default), or to sort the buttons by displayField . |
String |
getValueField()
The valueField of the combo box. |
void |
setAutoFetchData(Boolean autoFetchData)
Should the MultiComboBoxItem fetch data from the data source immediately or wait until the
user first opens the pickList. |
void |
setAutoFitButtons(Boolean autoFitButtons)
Specifies whether to autofit the buttons in the MultiComboBoxItem. |
void |
setButtonProperties(IButton buttonProperties)
Properties to be used in creating each option button. |
void |
setButtonProperties(JavaScriptObject buttonProperties)
Properties to be used in creating each option button. |
void |
setComboBoxProperties(ComboBoxItem comboBoxProperties)
Properties to be used in creating a ComboBoxItem . |
void |
setComboBoxProperties(JavaScriptObject comboBoxProperties)
Properties to be used in creating a ComboBoxItem . |
void |
setComboBoxWidth(Integer comboBoxWidth)
Specifies the size of the combo box field. |
void |
setDisplayField(String displayField)
The displayField of the combo box. |
void |
setJavaScriptObject(JavaScriptObject jsObj)
|
void |
setLayoutStyle(MultiComboBoxLayoutStyle layoutStyle)
Specifies the layout style of the combo box and the buttons in the MultiComboBoxItem. |
void |
setOptionDataSource(DataSource optionDataSource)
The optionDataSource of the combo box. |
void |
setUseInsertionOrder(Boolean useInsertionOrder)
Specifies whether to arrange the buttons of the MultiComboBoxItem in the order that they were selected (the default), or to sort the buttons by displayField . |
void |
setValueField(String valueField)
The valueField of the combo box. |
void |
showValue(Object displayValue,
Object dataValue,
DynamicForm form,
CanvasItem item)
This method will be called whenever this form item's value is being set via a programmatic call to e.g: DynamicForm.setValues or FormItem.setValue and may be overridden by CanvasItems
intended to support displaying data values to update the embedded Canvas to reflect the value passed in. |
Methods inherited from class com.smartgwt.client.widgets.form.fields.CanvasItem |
---|
addShowValueHandler, createCanvas, getApplyPromptToCanvas, getAutoDestroy, getCanvas, getEditCriteriaInInnerForm, getOverflow, getPrompt, getShouldSaveValue, hasAdvancedCriteria, setApplyPromptToCanvas, setAutoDestroy, setCanEditCriterionPredicate, setCanvas, setCriterionGetter, setCriterionSetter, setEditCriteriaInInnerForm, setOverflow, setPrompt, setShouldSaveValue, setupCanvasConstructor, storeValue, storeValue, storeValue |
Methods inherited from class com.smartgwt.client.core.RefDataClass |
---|
getRef, getRef |
Methods inherited from class com.smartgwt.client.core.DataClass |
---|
doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute |
Methods inherited from class com.smartgwt.client.core.JsObject |
---|
setJsObj |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public MultiComboBoxItem()
public MultiComboBoxItem(JavaScriptObject jsObj)
public MultiComboBoxItem(String name)
public MultiComboBoxItem(String name, String title)
Method Detail |
---|
public static MultiComboBoxItem getOrCreateRef(JavaScriptObject jsObj)
public void setJavaScriptObject(JavaScriptObject jsObj)
setJavaScriptObject
in class CanvasItem
public void setAutoFetchData(Boolean autoFetchData)
data source
immediately or wait until the
user first opens the pickList.
autoFetchData
- autoFetchData Default value is falseComboBoxItem.setAutoFetchData(java.lang.Boolean)
public Boolean getAutoFetchData()
data source
immediately or wait until the
user first opens the pickList.
ComboBoxItem.getAutoFetchData()
public void setAutoFitButtons(Boolean autoFitButtons)
layoutStyle
is "flow", but false for a
layoutStyle of "vertical" or "verticalReverse". If the layoutStyle
is "horizontal" or "horizontalReverse"
then the buttons will autofit regardless of the setting of this property.
autoFitButtons
property.
autoFitButtons
- whether to autofit the buttons. Default value is nullpublic Boolean getAutoFitButtons()
layoutStyle
is "flow", but false for a
layoutStyle of "vertical" or "verticalReverse". If the layoutStyle
is "horizontal" or "horizontalReverse"
then the buttons will autofit regardless of the setting of this property.
public void setComboBoxWidth(Integer comboBoxWidth)
Note that this attribute only has an effect in "flow", "horizontal", and
"horizontalReverse" modes
. In the
other modes, the combo box is as wide as the overall MultiComboBoxItem.
comboBoxWidth
- comboBoxWidth Default value is nullpublic Integer getComboBoxWidth()
Note that this attribute only has an effect in "flow", "horizontal", and
"horizontalReverse" modes
. In the
other modes, the combo box is as wide as the overall MultiComboBoxItem.
public void setDisplayField(String displayField)
displayField
of the combo box.
Note : This is an advanced setting
setDisplayField
in class FormItem
displayField
- . See String
. Default value is nullComboBoxItem.setDisplayField(java.lang.String)
public String getDisplayField()
displayField
of the combo box.
getDisplayField
in class FormItem
String
ComboBoxItem.getDisplayField()
public void setLayoutStyle(MultiComboBoxLayoutStyle layoutStyle)
layoutStyle
- the new layout style. Default value is "flow"public MultiComboBoxLayoutStyle getLayoutStyle()
public void setUseInsertionOrder(Boolean useInsertionOrder)
displayField
.
useInsertionOrder
- useInsertionOrder Default value is truepublic Boolean getUseInsertionOrder()
displayField
.
public void setValueField(String valueField)
valueField
of the combo box.
setValueField
in class FormItem
valueField
- . See String
. Default value is nullComboBoxItem.setValueField(java.lang.String)
public String getValueField()
valueField
of the combo box.
getValueField
in class FormItem
String
ComboBoxItem.getValueField()
public void showValue(Object displayValue, Object dataValue, DynamicForm form, CanvasItem item)
DynamicForm.setValues
or FormItem.setValue
and may be overridden by CanvasItems
intended to support displaying data values to update the embedded Canvas to reflect the value passed in.
displayValue
- new display-value for the item. This is the value after applying any custom formatter or valueMapdataValue
- underlying data value for the itemform
- the dynamicForm in which this item is containeditem
- the live form item instancepublic IButton getButtonDefaults()
IButton
.
public void setButtonProperties(JavaScriptObject buttonProperties)
Note : This is an advanced setting
buttonProperties
- buttonPropertiespublic void setButtonProperties(IButton buttonProperties)
Note : This is an advanced setting
buttonProperties
- buttonPropertiespublic IButton getButtonProperties()
public ComboBoxItem getComboBoxDefaults()
ComboBoxItem
in a MultiComboBoxItem.
public void setComboBoxProperties(JavaScriptObject comboBoxProperties)
ComboBoxItem
.
Note : This is an advanced setting
comboBoxProperties
- comboBoxProperties Default value is nullpublic void setComboBoxProperties(ComboBoxItem comboBoxProperties)
ComboBoxItem
.
Note : This is an advanced setting
comboBoxProperties
- comboBoxProperties Default value is nullpublic ComboBoxItem getComboBoxProperties()
ComboBoxItem
.
public void setOptionDataSource(DataSource optionDataSource)
optionDataSource
of the combo box.
setOptionDataSource
in class FormItem
optionDataSource
- optionDataSource Default value is nullComboBoxItem.setOptionDataSource(com.smartgwt.client.data.DataSource)
public DataSource getOptionDataSource()
optionDataSource
of the combo box.
ComboBoxItem.getOptionDataSource()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |