* Builds the Insert LaTeX Header form.
*/
@Override
protected void buildForm() {
content.setWidth("500px");
alignTop = new RadioButton("alignment", "Align at top line");
alignCenter = new RadioButton("alignment", "Align at center of table");
alignCenter.setValue(true);
alignBottom = new RadioButton("alignment", "Align at bottom line");
HorizontalPanel alignment = new HorizontalPanel();
alignment.add(alignTop);
alignment.add(alignCenter);
alignment.add(alignBottom);
centerHorizontal = new CheckBox("Center horizontal");
centerHorizontal.setValue(true);
insertAsFloat = new CheckBox("Insert as float");
insertAsFloat.setValue(true);
insertAsFloat.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
boolean value = event.getValue();
for (int i=7; i<=10; i++) {
content.getRowFormatter().setVisible(i, value);
}
center();
}
});
caption = new TextBox();
caption.setWidth("250px");
label = new TextBox();
label.setWidth("250px");
herePosition = new CheckBox("Here");
topPosition = new CheckBox("Top of the page");
topPosition.setValue(true);
bottomPosition = new CheckBox("Bottom of the page");
bottomPosition.setValue(true);
floatPosition = new CheckBox("Page of floats");
floatPosition.setValue(true);
FlexTable position = new FlexTable();
position.setWidth("100%");
position.insertRow(0);
position.insertCell(0, 0);
position.insertCell(0, 1);
position.insertRow(1);
position.insertCell(1, 0);
position.insertCell(1, 1);
position.setWidget(0, 0, herePosition);
position.setWidget(0, 1, topPosition);
position.setWidget(1, 0, bottomPosition);
position.setWidget(1, 1, floatPosition);
oneColumn = new RadioButton("expansion", "One column");
oneColumn.setValue(true);
twoColumns = new RadioButton("expansion", "Two columns");
HorizontalPanel expansion = new HorizontalPanel();
expansion.add(oneColumn);
expansion.add(twoColumns);
addHeader("Caption");
addField(caption, "Caption:");