new CalculationResolverFactory(new MaxCalculation()),
new FixedValueResolverFactory(new FixedValueResolver(
new Double(1), DataType.NUMBER)) };
resolverFactorySelector = new ListBoxControl<ViewItemResolverFactory>(
new ExtendedListBox(false),
new Converter<ViewItemResolverFactory, String>() {
@Override
public String convert(ViewItemResolverFactory value)
throws ConversionException {
return value.getDescription();
}
});
resolverFactorySelector.setValues(Arrays.asList(calculations));
// TODO lawl, hack
resolverFactorySelector.setSelectedValue(calculations[0]);
resolverFactorySelector.setChangeHandler(changeHandler);
// TODO I guessing that this is where the property should be selected as
// well, should possible alert user to selecting SUM without selectin
// gproperty?
// this should all be defined by the transformation UI classes
propertySelector = new ListBoxControl<String>(
new ExtendedListBox(false), new NullConverter<String>());
propertySelector.setChangeHandler(changeHandler);
panel = new VerticalPanel();
panel.add(resolverFactorySelector.asWidget());
panel.add(propertySelector.asWidget());