shortNameTextBox.getText().trim()
);
}
private Widget createForm() {
FlexTable panel = new FlexTable();
int row = 0;
ChangeListener cl = null;
cl = new ChangeListener () {
public void onChange(Widget sender) {
formChanged();
}
};
authorityWidget = new FieldWithChoose(authorityAttrDef, cl, "130px");
shortNameTextBox = OrrUtil.createTextBoxBase(1, "200px", cl);
String label = authorityAttrDef.getLabel();
String tooltip = "<b>" +label+ "</b>:<br/>" +
authorityAttrDef.getTooltip() +
"<br/><br/><div align=\"right\">(" +authorityAttrDef.getUri()+ ")</div>";
panel.setWidget(row, 0, new TLabel(label, true, tooltip ));
panel.setWidget(row, 1, authorityWidget);
panel.getFlexCellFormatter().setWidth(row, 0, "250px");
panel.getFlexCellFormatter().setAlignment(row, 0,
HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
);
panel.getFlexCellFormatter().setAlignment(row, 1,
HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
);
row++;
String label2 = "Ontology short name";
String tooltip2 = "<b>" +label2+ "</b>:<br/>" +
"The short name of the ontology.";
panel.setWidget(row, 0, new TLabel(label2, true, tooltip2 ));
panel.setWidget(row, 1, shortNameTextBox);
panel.getFlexCellFormatter().setAlignment(row, 0,
HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
);
row++;
String label3 = "URI";
String tooltip3 = "<b>" +label3+ "</b>:<br/>" +
"The resulting URI for your ontology";
panel.setWidget(row, 0, new TLabel(label3, false, tooltip3 ));
panel.getFlexCellFormatter().setAlignment(row, 0,
HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
);
panel.setWidget(row, 1, resultingUri);
panel.getFlexCellFormatter().setAlignment(row, 1,
HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
);
row++;
panel.setWidget(row, 0, new HTML("Click to verify availability: "));
panel.getFlexCellFormatter().setAlignment(row, 0,
HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
);
CellPanel buttons = createButtons();
panel.setWidget(row, 1, buttons);
panel.getFlexCellFormatter().setAlignment(row, 1,
HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
);
row++;
return panel;