private void appendUnitTypeName(Row row, UnitType unitType) {
row.appendChild(new Label(unitType.getMeasure()));
}
private void appendOperations(Row row, final UnitType unitType) {
Hbox hbox = new Hbox();
hbox.appendChild(Util.createEditButton(new EventListener() {
@Override
public void onEvent(Event event) {
goToEditForm(unitType);
}
}));
Button removeButton = Util
.createRemoveButton(new EventListener() {
@Override
public void onEvent(Event event) {
confirmDelete(unitType);
}
});
removeButton.setDisabled(unitTypeModel
.isUnitTypeUsedInAnyMaterial(unitType));
hbox.appendChild(removeButton);
row.appendChild(hbox);
}
};
}