本文整理汇总了Java中com.extjs.gxt.ui.client.widget.form.SimpleComboBox类的典型用法代码示例。如果您正苦于以下问题:Java SimpleComboBox类的具体用法?Java SimpleComboBox怎么用?Java SimpleComboBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleComboBox类属于com.extjs.gxt.ui.client.widget.form包,在下文中一共展示了SimpleComboBox类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: simpleCombobox
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
/**
* Builds a {@link SimpleComboBox} with default
* {@link TriggerAction#ALL}.<br>
* Generated field is not editable by default.
*
* @param label
* The field label.
* @param mandatory
* <code>true</code> if the field doesn't allow blanks,
* <code>false</code> otherwise.
* @param emptyText
* The empty text. If blank, a default empty text is set.
* @param stylenames
* (optional) Style name(s) added to the field. Blank values are
* ignored.
* @return The field.
*/
public static <T> SimpleComboBox<T> simpleCombobox(String label, boolean mandatory, String emptyText,
String... stylenames) {
final SimpleComboBox<T> field = new SimpleComboBox<T>();
field.setTriggerAction(TriggerAction.ALL);
field.setEditable(false);
// Label.
if (ClientUtils.isNotBlank(label)) {
field.setFieldLabel(label);
}
if (ClientUtils.isNotBlank(emptyText)) {
field.setEmptyText(emptyText);
} else {
field.setEmptyText(I18N.CONSTANTS.formWindowListEmptyText());
}
// Constraints.
field.setAllowBlank(!mandatory);
return addStyles(field, stylenames);
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:41,代码来源:Forms.java
示例2: categoryTypeToolBar
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
/**
* Build the Category ToolBar
*
* @return ToolBar
*/
private ToolBar categoryTypeToolBar() {
ToolBar toolbar = new ToolBar();
categoryIcon = new SimpleComboBox<String>();
categoryIcon.setFieldLabel(I18N.CONSTANTS.adminCategoryTypeIcon());
categoryIcon.setWidth(75);
categoryIcon.setEditable(false);
categoryIcon.setAllowBlank(false);
categoryIcon.setTriggerAction(TriggerAction.ALL);
List<String> values = new ArrayList<String>();
for (CategoryIcon e : CategoryIcon.values()) {
values.add(CategoryIcon.getName(e));
}
categoryIcon.add(values);
toolbar.add(categoryIcon);
categoryName = new TextField<String>();
categoryName.setFieldLabel(I18N.CONSTANTS.adminCategoryTypeName());
toolbar.add(categoryName);
addCategoryTypeButton = new Button(I18N.CONSTANTS.addItem(), IconImageBundle.ICONS.add());
toolbar.add(addCategoryTypeButton);
deleteCategoryTypeButton = new Button(I18N.CONSTANTS.delete(), IconImageBundle.ICONS.delete());
toolbar.add(deleteCategoryTypeButton);
ImportCategoryTypeButton = new Button(I18N.CONSTANTS.importItem(), IconImageBundle.ICONS.up());
toolbar.add(ImportCategoryTypeButton);
return toolbar;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:39,代码来源:CategoriesAdminView.java
示例3: onBind
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void onBind() {
// --
// Integer fields.
// --
final List<IntegerModel> models = new ArrayList<IntegerModel>(LIMIT);
models.add(new IntegerModel(null)); // Unlimited option.
for (int i = 1; i < LIMIT; i++) {
models.add(new IntegerModel(i));
}
for (final ComboBox<IntegerModel> integerField : view.getIntegerFields().values()) {
integerField.getStore().add(models);
}
// --
// Boolean fields.
// --
for (final SimpleComboBox<Boolean> booleanField : view.getBooleanFields().values()) {
booleanField.add(Boolean.FALSE);
booleanField.add(Boolean.TRUE);
}
// --
// Save button action handler.
// --
view.getSaveButton().addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(final ButtonEvent ce) {
onSaveAction();
}
});
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:43,代码来源:LogFrameModelsAdminPresenter.java
示例4: getCategoryIcon
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
@Override
public SimpleComboBox<String> getCategoryIcon() {
return categoryIcon;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:5,代码来源:CategoriesAdminView.java
示例5: createPasswordExpirationManagementPanel
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
/**
* Creates the password expiration policy management panel.
*
* @return The password expiration policy management panel.
*/
private ContentPanel createPasswordExpirationManagementPanel() {
final ContentPanel panel = Panels.content(I18N.CONSTANTS.userPasswordSettings());
passwordExpirationManagementForm = Forms.panel(300);
resetNewUserPasswordCheckBox = Forms.checkbox(I18N.CONSTANTS.resetNewUserPasswords());
resetNewUserPasswordCheckBox.setFieldLabel(I18N.CONSTANTS.resetNewUserPasswords());
policyTypeCombo = new SimpleComboBox<ExpirationPolicy>();
policyTypeCombo.add(Arrays.asList(ExpirationPolicy.values()));
policyTypeCombo.setTriggerAction(ComboBox.TriggerAction.ALL);
policyTypeCombo.setEditable(false);
policyTypeCombo.setAllowBlank(false);
policyTypeCombo.setFieldLabel(I18N.CONSTANTS.automaticExpirationPolicy());
frequencyField = new SpinnerField();
frequencyField.setMinValue(0);
frequencyField.setValue(0);
frequencyField.setWidth(40);
frequencyField.setFormat(NumberFormat.getFormat("0"));
frequencyField.setIncrement(1);
frequencyField.setFieldLabel(I18N.CONSTANTS.every());
scheduledDateField = new DateField();
scheduledDateField.setMinValue(new Date());
scheduledDateField.setFieldLabel(I18N.CONSTANTS.at());
passwordExpirationManagementForm.add(resetNewUserPasswordCheckBox);
passwordExpirationManagementForm.add(policyTypeCombo);
passwordExpirationManagementForm.add(frequencyField);
passwordExpirationManagementForm.add(scheduledDateField);
// button
passwordExpirationSaveButton = Forms.button(I18N.CONSTANTS.saveExportConfiguration(), IconImageBundle.ICONS.save());
passwordExpirationManagementForm.addButton(passwordExpirationSaveButton);
panel.add(passwordExpirationManagementForm);
return panel;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:47,代码来源:ParametersAdminView.java
示例6: getBooleanFields
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Map<String, SimpleComboBox<Boolean>> getBooleanFields() {
return booleanFields;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:8,代码来源:LogFrameModelsAdminView.java
示例7: getRowField
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public SimpleComboBox<Integer> getRowField() {
return rowField;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:8,代码来源:EditLayoutGroupAdminView.java
示例8: getBooleanFields
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
/**
* Returns the fields manipulating a {@code Boolean} value (or unlimited) with their corresponding DTO key.
*
* @return The fields manipulating a {@code Boolean} value (or unlimited) with their corresponding DTO key.
*/
Map<String, SimpleComboBox<Boolean>> getBooleanFields();
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:7,代码来源:LogFrameModelsAdminPresenter.java
示例9: getSimpleValue
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
/**
* Safe access to the given {@code SimpleComboBox} <em>simple</em> value.<br>
* Indeed, GXT may throw a {@code ClassCastException} if the value of a {@code SimpleComboBox} is {@code null} and not
* of type {@code String}.
*
* @param field
* The {@code SimpleComboBox} field.
* @return The simple value or {@code null}.
*/
public static <T> T getSimpleValue(final SimpleComboBox<T> field) {
return field != null && field.getValue() != null ? field.getValue().getValue() : null;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:13,代码来源:ClientUtils.java
示例10: buildBooleanComboBox
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
/**
* Builds a new {@code Boolean} {@link SimpleComboBox} field.<br>
* The field is mandatory.
*
* @param fieldKey
* The field key referencing the DTO property.
* @param label
* The field label.
* @return The field.
*/
private SimpleComboBox<Boolean> buildBooleanComboBox(final String fieldKey, final String label) {
final SimpleComboBox<Boolean> field = Forms.simpleCombobox(label, true);
booleanFields.put(fieldKey, field);
return field;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:19,代码来源:LogFrameModelsAdminView.java
示例11: getCategoryIcon
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
SimpleComboBox<String> getCategoryIcon();
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:2,代码来源:CategoriesAdminPresenter.java
示例12: getBannerPositionField
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
SimpleComboBox<Integer> getBannerPositionField();
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:2,代码来源:EditFlexibleElementAdminPresenter.java
示例13: getRowField
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; //导入依赖的package包/类
SimpleComboBox<Integer> getRowField();
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:2,代码来源:EditLayoutGroupAdminPresenter.java
注:本文中的com.extjs.gxt.ui.client.widget.form.SimpleComboBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论