Source:
public void constructor() { dynamicFormPanel.add(getDynamicForm()); dynamicFormPanel.setStyleName("displayInlineBlockMiddel"); viewPanel.add(getUiBinder()); viewPanel.setStyleName("displayInlineBlockMiddel"); viewPanel.setVisible(false); dataPanel.add(dynamicFormPanel); dataPanel.add(viewPanel); dataPanel.setStyleName("displayInlineBlockMiddel"); viewButtons.add(editLabel); editLabel.setStyleName("displayInlineBlockMiddel", true); editLabel.setStyleName("languageInputClickLabels", true); editLabel.setStyleName("complexLabelButton", true); viewButtons.add(removeLabel); removeLabel.setStyleName("displayInlineBlockMiddel", true); removeLabel.setStyleName("languageInputClickLabels", true); removeLabel.setStyleName("complexLabelButton", true); viewButtons.setStyleName("displayInlineBlockMiddel", true); editButtons.add(saveButton); saveButton.setStyleName("complexSaveButton"); editButtons.add(undoButton); undoButton.setStyleName("displayInlineBlockMiddel"); undoButton.setStyleName("complexUndoButton", true); editButtons.setStyleName("displayInlineBlockMiddel"); addButton.setStyleName("complexAddButton"); actionPanel.add(addButton); actionPanel.setStyleName("displayInlineBlockMiddel"); actionPanel.setStyleName("complexActionContainer", true); mainPanel.add(dataPanel); mainPanel.add(actionPanel); editLabel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { setEditDtate(); } }); removeLabel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { removeField(); } }); addButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { addField(); } }); saveButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { saveField(); } }); undoButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { setViewState(); } }); }

Target:
public void constructor() { messagePanel = new FlowPanel(); messageTable = new FlowPanel(); messageRow = new FlowPanel(); messageCell = new Label(); messageContainer = new FlowPanel(); messageContainer.add(messagePanel); messagePanel.setVisible(false); mainPanel.add(messagePanel); dynamicFormPanel.add(getDynamicForm()); dynamicFormPanel.setStyleName(displayInline); viewPanel.add(getUiBinder()); viewPanel.setStyleName(displayInline); viewPanel.setVisible(false); dataPanel.add(dynamicFormPanel); dataPanel.add(viewPanel); dataPanel.setStyleName(displayInline); viewButtons.add(editLabel); editLabel.setStyleName(displayInline, true); editLabel.setStyleName(languageInputClickLabels, true); editLabel.setStyleName(complexLabelButton, true); viewButtons.add(removeLabel); removeLabel.setStyleName(displayInline, true); removeLabel.setStyleName(languageInputClickLabels, true); removeLabel.setStyleName(complexLabelButton, true); viewButtons.setStyleName(displayInline, true); editButtons.add(saveButton); saveButton.setStyleName(complexSaveButton); editButtons.add(undoButton); undoButton.setStyleName(displayInline); undoButton.setStyleName(complexUndoButton, true); editButtons.setStyleName(displayInline); addButton.setStyleName(complexAddButton); actionPanel.add(addButton); actionPanel.setStyleName(displayInline); actionPanel.setStyleName(complexActionContainer, true); mainPanel.add(dataPanel); mainPanel.add(actionPanel); editLabel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { setEditDtate(); } }); removeLabel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { removeField(); } }); addButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { addField(); } }); saveButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { saveField(); } }); undoButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { setViewState(); } }); }