本文整理了Java中org.gwtbootstrap3.extras.select.client.ui.Option.setValue()
方法的一些代码示例,展示了Option.setValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Option.setValue()
方法的具体详情如下:
包路径:org.gwtbootstrap3.extras.select.client.ui.Option
类名称:Option
方法名:setValue
暂无
代码示例来源: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.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: 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: 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: 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/kie-wb-common-dmn-client
Optional<Option> makeTypeSelector(final BuiltInType bit) {
final Option o = GWT.create(Option.class);
o.setText(bit.getName());
o.setValue(qNameConverter.toWidgetValue(normaliseBuiltInTypeTypeRef(bit.asQName())));
return Optional.of(o);
}
代码示例来源:origin: org.jbpm/jbpm-wb-forms-client
protected void loadFormValues(String serverTemplateId) {
this.serverTemplateId = serverTemplateId;
processDefinitionsListBox.clear();
processRuntimeDataService.call((List<ProcessSummary> processSummaries) -> {
//Skip case definitions (isDynamic == true)
Map<String, List<ProcessSummary>> defs = processSummaries.stream().filter(p -> p.isDynamic() == false).collect(groupingBy(ProcessSummary::getDeploymentId));
defs.keySet().stream().sorted().forEach(deploymentId -> {
final OptGroup group = GWT.create(OptGroup.class);
group.setLabel(deploymentId);
defs.get(deploymentId).stream().sorted().forEach(p -> {
final Option option = GWT.create(Option.class);
option.setText(p.getProcessDefId());
option.setValue(p.getProcessDefId());
group.add(option);
});
processDefinitionsListBox.add(group);
});
Scheduler.get().scheduleDeferred(() -> processDefinitionsListBox.refresh());
}).getProcesses(serverTemplateId,
0,
Integer.MAX_VALUE,
FIELD_ID_PROCESSNAME,
true);
}
代码示例来源:origin: kiegroup/jbpm-wb
protected void loadFormValues(String serverTemplateId) {
this.serverTemplateId = serverTemplateId;
processDefinitionsListBox.clear();
processRuntimeDataService.call((List<ProcessSummary> processSummaries) -> {
//Skip case definitions (isDynamic == true)
Map<String, List<ProcessSummary>> defs = processSummaries.stream().filter(p -> p.isDynamic() == false).collect(groupingBy(ProcessSummary::getDeploymentId));
defs.keySet().stream().sorted().forEach(deploymentId -> {
final OptGroup group = GWT.create(OptGroup.class);
group.setLabel(deploymentId);
defs.get(deploymentId).stream().sorted().forEach(p -> {
final Option option = GWT.create(Option.class);
option.setText(p.getProcessDefId());
option.setValue(p.getProcessDefId());
group.add(option);
});
processDefinitionsListBox.add(group);
});
Scheduler.get().scheduleDeferred(() -> processDefinitionsListBox.refresh());
}).getProcesses(serverTemplateId,
0,
Integer.MAX_VALUE,
FIELD_ID_PROCESSNAME,
true);
}
代码示例来源:origin: org.drools/drools-wb-globals-editor-client
@Override
public void setClassNames( List<String> classNames ) {
for ( String className : classNames ) {
Option option = new Option();
option.setText( className );
option.setValue( className );
classNameSelect.add( option );
}
classNameSelect.refresh();
}
代码示例来源:origin: org.kie.workbench/kie-wb-common-dmn-client
Optional<Option> makeTypeSelector(final ItemDefinition id) {
Option o = null;
if (id.getName() != null) {
final Name name = id.getName();
o = GWT.create(Option.class);
o.setText(name.getValue());
o.setValue(qNameConverter.toWidgetValue(new QName(QName.NULL_NS_URI,
name.getValue(),
QName.DEFAULT_NS_PREFIX)));
}
return Optional.ofNullable(o);
}
代码示例来源:origin: kiegroup/drools-wb
@Override
public void setClassNames( List<String> classNames ) {
for ( String className : classNames ) {
Option option = new Option();
option.setText( className );
option.setValue( className );
classNameSelect.add( option );
}
classNameSelect.refresh();
}
代码示例来源:origin: org.guvnor/guvnor-structure-client
@Override
public void addOrganizationalUnit(final OrganizationalUnit ou) {
final String text = ou.getName();
final String value = ou.getName();
final Option option = new Option();
option.setText(text);
option.setValue(value);
organizationalUnitDropdown.add(option);
organizationalUnitDropdown.refresh();
}
代码示例来源:origin: kiegroup/appformer
@Override
public void addOrganizationalUnit(final OrganizationalUnit ou) {
final String text = ou.getName();
final String value = ou.getName();
final Option option = new Option();
option.setText(text);
option.setValue(value);
organizationalUnitDropdown.add(option);
organizationalUnitDropdown.refresh();
}
代码示例来源:origin: org.uberfire/uberfire-asset-mgmt-client
@Override
public void initOrganizationalUnits(List<Pair<String, String>> organizationalUnits) {
organizationalUnitDropdown.clear();
final Option select = new Option();
select.setText(CoreConstants.INSTANCE.SelectEntry());
select.setValue(NOT_SELECTED);
organizationalUnitDropdown.add(select);
if (organizationalUnits != null) {
for (Pair<String, String> organizationalUnitInfo : organizationalUnits) {
final Option option = new Option();
option.setValue(organizationalUnitInfo.getK1());
option.setText(organizationalUnitInfo.getK2());
organizationalUnitDropdown.add(option);
}
}
organizationalUnitDropdown.refresh();
}
代码示例来源:origin: kiegroup/jbpm-wb
@Test
public void loadFormValuesTest() {
String serverTemplateId = "serverTemplateId";
String deploymentId = "def_deploymentId";
String processDefinitionId = "def_Id";
ProcessSummary processSummary = new ProcessSummary(processDefinitionId,
"def_name",
deploymentId,
"1.0",
false);
when(processRuntimeDataServiceMock.getProcesses(serverTemplateId,
0,
Integer.MAX_VALUE,
FIELD_ID_PROCESSNAME,
true)).thenReturn(Arrays.asList(processSummary));
quickNewProcessInstancePopup.loadFormValues(serverTemplateId);
verify(processDefinitionsListBox).clear();
verify(processRuntimeDataServiceMock).getProcesses(eq(serverTemplateId),
eq(0),
eq(Integer.MAX_VALUE),
eq(FIELD_ID_PROCESSNAME),
eq(true));
final ArgumentCaptor<OptGroup> captor = ArgumentCaptor.forClass(OptGroup.class);
verify(processDefinitionsListBox).add(captor.capture());
verify(captor.getValue()).setLabel(deploymentId);
final ArgumentCaptor<Option> captorOption = ArgumentCaptor.forClass(Option.class);
verify(captor.getValue()).add(captorOption.capture());
verify(captorOption.getValue()).setValue(processDefinitionId);
verify(captorOption.getValue()).setText(processDefinitionId);
}
代码示例来源:origin: org.jbpm/jbpm-console-ng-generic-client
private void generateTimeOptions(){
int numOptions = (int) (DAY / INTERVAL);
// we need to use times for formatting, but we don't keep
// them around. the purpose is only to generate text to
// insert into the textbox.
for (int i = 0; i < numOptions; i++) {
long offsetFromMidnight = i * INTERVAL;
final String value = generateTimeValue( offsetFromMidnight );
Option option = new Option();
option.setText( value );
option.setValue( value );
textbox.add( option );
}
Scheduler.get().scheduleDeferred( new Scheduler.ScheduledCommand() {
@Override
public void execute() {
textbox.refresh();
}
} );
}
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-server-ui-client
ms.setValue(ContainerRulesConfigPresenter.MS);
ms.setSelected(true);
intervalTimeUnit.add(ms);
s.setValue(ContainerRulesConfigPresenter.S);
intervalTimeUnit.add(s);
m.setValue(ContainerRulesConfigPresenter.M);
intervalTimeUnit.add(m);
h.setValue(ContainerRulesConfigPresenter.H);
intervalTimeUnit.add(h);
d.setValue(ContainerRulesConfigPresenter.D);
intervalTimeUnit.add(d);
代码示例来源:origin: kiegroup/jbpm-wb
@Override
public void init(TaskDetailsPresenter presenter) {
this.presenter = presenter;
for (int i = 0; i < priorities.length; i++) {
final Option option = new Option();
option.setText(priorities[i]);
option.setValue(String.valueOf(i));
taskPriorityListBox.add(option);
}
refreshPriorities();
taskStatusLabel.setText(constants.Status());
userLabel.setText(constants.User());
dueDateLabel.setText(constants.Due_On());
taskPriorityLabel.setText(constants.Priority());
taskDescriptionLabel.setText(constants.Description());
processInstanceIdLabel.setText(constants.Process_Instance_Id());
processIdLabel.setText(constants.Process_Definition_Id());
updateTaskButton.setText(constants.Update());
setDueDateEnabled(true);
initDateTimePicker();
}
代码示例来源:origin: org.jbpm/jbpm-wb-human-tasks-client
@Override
public void init(TaskDetailsPresenter presenter) {
this.presenter = presenter;
for (int i = 0; i < priorities.length; i++) {
final Option option = new Option();
option.setText(priorities[i]);
option.setValue(String.valueOf(i));
taskPriorityListBox.add(option);
}
refreshPriorities();
taskStatusLabel.setText(constants.Status());
userLabel.setText(constants.User());
dueDateLabel.setText(constants.Due_On());
taskPriorityLabel.setText(constants.Priority());
taskDescriptionLabel.setText(constants.Description());
processInstanceIdLabel.setText(constants.Process_Instance_Id());
processIdLabel.setText(constants.Process_Definition_Id());
updateTaskButton.setText(constants.Update());
setDueDateEnabled(true);
initDateTimePicker();
}
内容来源于网络,如有侵权,请联系作者删除!