meTextBox.setValue(meLabel.getText());
meTextBox.addStyleName(resources.css().mePeInput());
TextBox peTextBox = new TextBox();
peTextBox.setValue(peLabel.getText());
peTextBox.addStyleName(resources.css().mePeInput());
final DecoratedPopupPanel editBlueprintInfoPopup = new DecoratedPopupPanel(true);
FlexTable editBlueprintInfoPopupFlexTable = new FlexTable();
editBlueprintInfoPopupFlexTable.setWidget(0, 0, new Label(messages.materialLevel() + ":"));
editBlueprintInfoPopupFlexTable.setWidget(0, 1, meTextBox);
editBlueprintInfoPopupFlexTable.setWidget(1, 0, new Label(messages.productivityLevel() + ":"));
editBlueprintInfoPopupFlexTable.setWidget(1, 1, peTextBox);
TextBox quantityTextBox = new TextBox();
quantityTextBox.setValue("1");
quantityTextBox.addStyleName(resources.css().quantityInput());
editBlueprintInfoPopupFlexTable.setWidget(2, 0, new Label(messages.quantity() + ":"));
editBlueprintInfoPopupFlexTable.setWidget(2, 1, quantityTextBox);
Button applyButton = new Button(messages.apply());
editBlueprintInfoPopupFlexTable.setWidget(3, 0, applyButton);
editBlueprintInfoPopupFlexTable.getFlexCellFormatter().setColSpan(3, 0, 2);
editBlueprintInfoPopup.setWidget(editBlueprintInfoPopupFlexTable);
handlerRegistrations.add(editButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Widget source = (Widget) event.getSource();
int left = source.getAbsoluteLeft() + 10;
int top = source.getAbsoluteTop() + 10;
editBlueprintInfoPopup.setPopupPosition(left, top);
editBlueprintInfoPopup.show();
}
}));
handlerRegistrations.add(applyButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
editBlueprintInfoPopup.hide();
}
}));
editableCalculation.setUseAllBlueprintsImage(useAllBlueprintsImage);
editableCalculation.setMeLabel(meLabel);