本文整理汇总了Java中org.gwtbootstrap3.client.ui.FormGroup类的典型用法代码示例。如果您正苦于以下问题:Java FormGroup类的具体用法?Java FormGroup怎么用?Java FormGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormGroup类属于org.gwtbootstrap3.client.ui包,在下文中一共展示了FormGroup类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getFormValues
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
public void getFormValues(List<FormGroup> controlGroups) {
formValues = new HashMap();
for (FormGroup groupControl : controlGroups) {
if (groupControl.getWidget(1) instanceof TextBox) {
formValues.put(((TextBox) groupControl.getWidget(1)).getName(),
((TextBox) groupControl.getWidget(1)).getValue());
} else if (groupControl.getWidget(1) instanceof ListBox) {
ListBox listBox = (ListBox) groupControl.getWidget(1);
List<String> selectedValues = new ArrayList<String>();
for (int i = 0; i < listBox.getItemCount(); i++) {
if (listBox.isItemSelected(i)) {
selectedValues.add(listBox.getValue(i));
}
}
formValues.put(listBox.getName(),
selectedValues);
}
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:NewFilterPopup.java
示例2: addTextBoxToFilter
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
public void addTextBoxToFilter(String label,
String fieldName,
String defaultValue) {
FormGroup controlGroup = new FormGroup();
FormLabel controlLabel = new FormLabel();
controlLabel.setTitle(label);
HTML lab = new HTML("<span style=\"margin-right:10px\">" + label + "</span>");
controlLabel.setHTML(lab.getHTML());
TextBox textBox = new TextBox();
textBox.setName(fieldName);
if (defaultValue != null && defaultValue.trim().length() > 0) {
textBox.setText(defaultValue);
}
controlGroup.add(controlLabel);
controlGroup.add(textBox);
filterControlGroups.add(controlGroup);
horizontalForm.add(controlGroup);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:NewFilterPopup.java
示例3: addTextBoxToFilter
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
public void addTextBoxToFilter(String label,
String fieldName,
String defaultValue) {
FormGroup controlGroup = new FormGroup();
FormLabel controlLabel = new FormLabel();
controlLabel.setTitle(label);
HTML lab = new HTML("<span style=\"margin-right:10px\">" + label + "</span>");
controlLabel.setHTML(lab.getHTML());
TextBox textBox = new TextBox();
textBox.setName(fieldName);
if (defaultValue != null && defaultValue.trim().length() > 0) {
textBox.setText(defaultValue);
}
controlGroup.add(controlLabel);
controlGroup.add(textBox);
filterControlGroups.add(controlGroup);
filterForm.add(controlGroup);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:NewTabFilterPopup.java
示例4: init
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
public void init() {
horizontalForm.clear();
filterControlGroups.clear();
FormGroup controlGroup = new FormGroup();
FormLabel controlLabel = new FormLabel();
controlLabel.setTitle(CommonConstants.INSTANCE.Filter_Name());
HTML lab = new HTML("<span style=\"color:red\"> * </span>" + "<span style=\"margin-right:10px\">" + CommonConstants.INSTANCE.Filter_Name() + "</span>");
controlLabel.setHTML(lab.getHTML());
TextBox fieldTextBox = new TextBox();
fieldTextBox.setName(FILTER_NAME_PARAM);
controlGroup.add(controlLabel);
controlGroup.add(fieldTextBox);
filterControlGroups.add(controlGroup);
horizontalForm.add(controlGroup);
existingFiltersPanel.clear();
existingFiltersPanel.add(existingFiltersGrid);
existingFiltersGrid.loadPageSizePreferences();
existingFiltersGrid.setColumnPickerButtonVisible(false);
existingFiltersGrid.setEmptyTableCaption(CommonConstants.INSTANCE.NoCustomFilterAvailable());
}
开发者ID:kiegroup,项目名称:appformer,代码行数:28,代码来源:NewFilterPopup.java
示例5: cleanFormValues
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
public void cleanFormValues(List<FormGroup> controlGroups) {
formValues = new HashMap();
clearErrorMessages();
for (FormGroup groupControl : controlGroups) {
if (groupControl.getWidget(1) instanceof TextBox) {
((TextBox) groupControl.getWidget(1)).setText("");
} else if (groupControl.getWidget(1) instanceof ListBox) {
ListBox listBox = (ListBox) groupControl.getWidget(1);
listBox.setSelectedIndex(-1);
}
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:13,代码来源:NewFilterPopup.java
示例6: addListBoxToFilter
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
public void addListBoxToFilter(String label,
String fieldName,
boolean multiselect,
HashMap<String, String> listBoxInfo) {
FormGroup controlGroup = new FormGroup();
FormLabel controlLabel = new FormLabel();
controlLabel.setTitle(label);
HTML lab = new HTML("<span style=\"margin-right:10px\">" + label + "</span>");
controlLabel.setHTML(lab.getHTML());
ListBox listBox = new ListBox(multiselect);
if (listBoxInfo != null) {
Set listBoxKeys = listBoxInfo.keySet();
Iterator it = listBoxKeys.iterator();
String key;
while (it.hasNext()) {
key = (String) it.next();
listBox.addItem(listBoxInfo.get(key),
key);
}
}
listBox.setName(fieldName);
controlGroup.add(controlLabel);
controlGroup.add(listBox);
filterControlGroups.add(controlGroup);
horizontalForm.add(controlGroup);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:31,代码来源:NewFilterPopup.java
示例7: addListBoxToFilter
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
public void addListBoxToFilter(String label,
String fieldName,
boolean multiselect,
HashMap<String, String> listBoxInfo) {
FormGroup controlGroup = new FormGroup();
FormLabel controlLabel = new FormLabel();
controlLabel.setTitle(label);
HTML lab = new HTML("<span style=\"margin-right:10px\">" + label + "</span>");
controlLabel.setHTML(lab.getHTML());
ListBox listBox = new ListBox(multiselect);
if (listBoxInfo != null) {
Set listBoxKeys = listBoxInfo.keySet();
Iterator it = listBoxKeys.iterator();
String key;
while (it.hasNext()) {
key = (String) it.next();
listBox.addItem(listBoxInfo.get(key),
key);
}
}
listBox.setName(fieldName);
controlGroup.add(controlLabel);
controlGroup.add(listBox);
filterControlGroups.add(controlGroup);
filterForm.add(controlGroup);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:31,代码来源:NewTabFilterPopup.java
示例8: validateFieldInline
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
public boolean validateFieldInline(String value,
FormGroup field,
HelpBlock help) {
if (!isValid(value)) {
field.setValidationState(ValidationState.ERROR);
help.setText(getValidationError());
return false;
} else {
field.setValidationState(ValidationState.NONE);
help.setText("");
return true;
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:14,代码来源:RuleValidator.java
示例9: setup
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
@Before
public void setup() {
field = mock(FormGroup.class);
help = mock(HelpBlock.class);
validRuleValidator = new RuleValidator() {
@Override
public boolean isValid(final String value) {
return true;
}
@Override
public String getValidationError() {
return null;
}
};
invalidRuleValidator = new RuleValidator() {
@Override
public boolean isValid(final String value) {
return false;
}
@Override
public String getValidationError() {
return ERROR_MESSAGE;
}
};
}
开发者ID:kiegroup,项目名称:appformer,代码行数:30,代码来源:RuleValidatorTest.java
示例10: getFormGroup
import org.gwtbootstrap3.client.ui.FormGroup; //导入依赖的package包/类
public FormGroup getFormGroup() {
return this.formGroup;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:4,代码来源:FormStyleItem.java
注:本文中的org.gwtbootstrap3.client.ui.FormGroup类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论