(new StringLabelProvider<>());
listBox.add(p.getValues());
listBox.setAllowBlank(false);
listBox.setForceSelection(true);
listBox.setEditable(false);
listBox.setTriggerAction(TriggerAction.ALL);
if (p.getDefaultValue() != null)
listBox.setValue(p.getDefaultValue());
HtmlLayoutContainer descr;
if (p.getDescription() == null) {
descr = new HtmlLayoutContainer("");
descr.addStyleName("workflow-fieldDescription");
} else {
//listBox.setToolTip(p.getDescription());
descr = new HtmlLayoutContainer(""
+ p.getDescription() + "
");
descr.addStyleName("workflow-fieldDescription");
}
horiz.add(listBox, new BoxLayoutData(new Margins()));
horiz.add(descr, new BoxLayoutData(new Margins()));
fieldContainer.add(horiz);
fieldContainer.forceLayout();
}
/**
*
*/
@Override
public String getValue() {
return listBox.getCurrentValue();
}
/**
*
*/
@Override
public Widget getWidget() {
return fieldContainer;
}
@Override
public boolean isValid() {
return listBox.isValid();
}
}