本文整理了Java中org.gwtbootstrap3.extras.select.client.ui.Option
类的一些代码示例,展示了Option
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Option
类的具体详情如下:
包路径:org.gwtbootstrap3.extras.select.client.ui.Option
类名称:Option
[英]Select option widget.
[中]选择选项小部件。
代码示例来源:origin: org.guvnor/guvnor-structure-client
@Override
public void addBranch(final String branch) {
final Option option = new Option();
option.setText(branch);
option.setValue(branch);
branchesDropdown.add(option);
}
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3-extras
@Override
protected void setSelectedValue(String value) {
if (isAttached()) {
setValue(getElement(), value);
} else {
for (Entry<OptionElement, Option> entry : itemMap.entrySet()) {
Option opt = entry.getValue();
opt.setSelected(opt.getValue().equals(value));
}
}
}
代码示例来源:origin: stackoverflow.com
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && requestCode == PromptsActivity.RADIO_BUTTON_CODE) {
Option option = data.getParcelableExtra(RADIO_BUTTON_SELECTED);
Log.e("radio button result Ok", option.getText());
Toast.makeText(PromptsActivity.this, "Selected Radio button is: " + option.getText(), Toast.LENGTH_SHORT).show();
}
else{
Log.e("radio bttn result null", "failed");
}
}
代码示例来源:origin: kiegroup/drools-wb
Option makeRuleNameOption(final String simpleRuleName) {
final Option o = GWT.create(Option.class);
o.setText(simpleRuleName);
o.setValue(simpleRuleName);
return o;
}
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3-extras
private String getSelectedValue() {
for (Entry<OptionElement, Option> entry : itemMap.entrySet()) {
Option opt = entry.getValue();
if (opt.isSelected())
return opt.getValue();
}
return null;
}
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-server-ui-client
getIntervalTextBoxDataOriginalTitle());
Option ms = new Option();
ms.setText(translationService.format(Constants.ContainerRulesConfigView_Milliseconds));
ms.setValue(ContainerRulesConfigPresenter.MS);
ms.setSelected(true);
intervalTimeUnit.add(ms);
Option s = new Option();
s.setText(translationService.format(Constants.ContainerRulesConfigView_Seconds));
s.setValue(ContainerRulesConfigPresenter.S);
intervalTimeUnit.add(s);
Option m = new Option();
m.setText(translationService.format(Constants.ContainerRulesConfigView_Minutes));
m.setValue(ContainerRulesConfigPresenter.M);
intervalTimeUnit.add(m);
Option h = new Option();
h.setText(translationService.format(Constants.ContainerRulesConfigView_Hours));
h.setValue(ContainerRulesConfigPresenter.H);
intervalTimeUnit.add(h);
Option d = new Option();
d.setText(translationService.format(Constants.ContainerRulesConfigView_Days));
d.setValue(ContainerRulesConfigPresenter.D);
intervalTimeUnit.add(d);
代码示例来源:origin: org.guvnor/guvnor-structure-client
@Override
public void addOrganizationalUnitSelectEntry() {
final Option option = new Option();
option.setText(CoreConstants.INSTANCE.SelectEntry());
organizationalUnitDropdown.add(option);
organizationalUnitDropdown.refresh();
}
代码示例来源:origin: org.jbpm/jbpm-wb-forms-client
protected void createNewProcessInstance() {
final Option selectedItem = processDefinitionsListBox.getSelectedItem();
deploymentId = ((OptGroup) selectedItem.getParent()).getLabel();
processId = selectedItem.getValue();
processForm.setVisible(true);
basicForm.setVisible(false);
ProcessDisplayerConfig config = new ProcessDisplayerConfig(new ProcessDefinitionKey(serverTemplateId,
deploymentId,
processId),
processId,
false);
startProcessDisplayProvider.setup(config,
this);
}
代码示例来源:origin: kiegroup/drools-wb
@Override
public String getSelectedClassName() {
Option selectedItem = classNameSelect.getSelectedItem();
return selectedItem != null ? selectedItem.getValue() : null;
}
代码示例来源:origin: org.kie.workbench.widgets/kie-wb-common-ui
Option makeRuleNameOption(final String ruleName,
final String value) {
final Option o = GWT.create(Option.class);
final String simpleRuleName = getSimpleRuleName(ruleName);
o.setText(simpleRuleName);
o.setValue(value);
return o;
}
代码示例来源:origin: kiegroup/appformer
@Override
public void addOrganizationalUnitSelectEntry() {
final Option option = new Option();
option.setText(CoreConstants.INSTANCE.SelectEntry());
organizationalUnitDropdown.add(option);
organizationalUnitDropdown.refresh();
}
代码示例来源:origin: gwtbootstrap3/gwtbootstrap3-extras
private String getSelectedValue() {
for (Entry<OptionElement, Option> entry : itemMap.entrySet()) {
Option opt = entry.getValue();
if (opt.isSelected())
return opt.getValue();
}
return null;
}
代码示例来源:origin: kiegroup/jbpm-wb
protected void createNewProcessInstance() {
final Option selectedItem = processDefinitionsListBox.getSelectedItem();
deploymentId = ((OptGroup) selectedItem.getParent()).getLabel();
processId = selectedItem.getValue();
processForm.setVisible(true);
basicForm.setVisible(false);
ProcessDisplayerConfig config = new ProcessDisplayerConfig(new ProcessDefinitionKey(serverTemplateId,
deploymentId,
processId),
processId,
false);
startProcessDisplayProvider.setup(config,
this);
}
代码示例来源:origin: org.drools/drools-wb-globals-editor-client
@Override
public String getSelectedClassName() {
Option selectedItem = classNameSelect.getSelectedItem();
return selectedItem != null ? selectedItem.getValue() : null;
}
代码示例来源:origin: kiegroup/appformer
@Override
public void addBranch(final String branch) {
final Option option = new Option();
option.setText(branch);
option.setValue(branch);
branchesDropdown.add(option);
}
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-client
public void addServerTemplates(final Set<String> serverTemplateIds) {
for (final String id : serverTemplateIds) {
final Option option = GWT.create(Option.class);
option.setText(id);
option.setValue(id);
serverTemplateDropdown.add(option);
}
serverTemplateDropdown.refresh();
serverTemplateGroup.setVisible(true);
}
代码示例来源:origin: gwtbootstrap3/gwtbootstrap3-extras
@Override
protected void setSelectedValue(String value) {
if (isAttached()) {
setValue(getElement(), value);
} else {
for (Entry<OptionElement, Option> entry : itemMap.entrySet()) {
Option opt = entry.getValue();
opt.setSelected(opt.getValue().equals(value));
}
}
}
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3-extras
private List<String> getSelectedValues() {
final List<String> allSelected = new ArrayList<>(0);
for (Entry<OptionElement, Option> entry : itemMap.entrySet()) {
Option opt = entry.getValue();
if (opt.isSelected())
allSelected.add(opt.getValue());
}
return allSelected;
}
代码示例来源:origin: kiegroup/jbpm-wb
@Test
public void createNewProcessInstance() {
String deploymentId = "def_deploymentId";
String processDefinitionId = "def_Id";
OptGroup group = mock(OptGroup.class);
Option option = mock(Option.class);
when(option.getParent()).thenReturn(group);
when(group.getLabel()).thenReturn(deploymentId);
when(option.getValue()).thenReturn(processDefinitionId);
when(processDefinitionsListBox.getSelectedItem()).thenReturn(option);
quickNewProcessInstancePopup.createNewProcessInstance();
final ArgumentCaptor<ProcessDisplayerConfig> captor = ArgumentCaptor.forClass(ProcessDisplayerConfig.class);
verify(startProcessDisplayProvider).setup(captor.capture(),
eq(quickNewProcessInstancePopup));
assertEquals(processDefinitionId,
captor.getValue().getKey().getProcessDefName());
assertEquals(deploymentId,
captor.getValue().getKey().getDeploymentId());
}
}
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-server-ui-client
@Override
public String getIntervalTimeUnit() {
return intervalTimeUnit.getSelectedItem().getValue();
}
内容来源于网络,如有侵权,请联系作者删除!