private void buildUI() {
setHeight(400);
Label title = new Label("RETIRE CLASS");
title.setStylePrimaryName("hierarchy-title");
add(title, new AnchorLayoutData("100% - 53"));
HTML explanationHtml = new HTML("Please select one or several <b>classes to retire</b> by clicking on " +
"the   <img src=\"../images/add.png\"></img>   icon in the <i>Classes to retire</i> field.<br />" +
"If the retired class has children, you have the option <b>to retire also all the children</b>, or <b>to move the children under a different parent</b>. " +
"Retired classes are not displayed in the class hierarchy.<br />" +
"Operations are performed after clicking on the <i>Retire</i> button.");
explanationHtml.setStylePrimaryName("explanation");
add(explanationHtml);
retiredClassesField = new ClassSelectionField(projectId, "Class(es) to retire");
add(retiredClassesField, new AnchorLayoutData("100% - 53"));
retireChildrenCheckbox = new Checkbox("Retire also all children of the selected class(es).");
add(retireChildrenCheckbox, new AnchorLayoutData("100% - 53"));
retireChildrenCheckbox.addListener(new CheckboxListenerAdapter() {
@Override
public void onCheck(Checkbox field, boolean checked) {
newParentField.setDisabled(checked);
}
});
newParentField = new ClassSelectionField(projectId, "New parent class of the children", false, null);
add(newParentField, new AnchorLayoutData("100% - 53"));
reasonField = new TextAreaField();
reasonField.setLabel("Reason for change:");
((TextArea)reasonField.getFieldComponent()).setHeight(120);
add(reasonField, new AnchorLayoutData("100% - 53"));
Button retireButton = new Button("Retire");
retireButton.addListener(new ButtonListenerAdapter() {
@Override
public void onClick(Button button, EventObject e) {