toggleEditCheck1 = createEditToggleCheckBox(editor1);
toggleEditCheck2 = createEditToggleCheckBox(editor2);
operationOutput.setStyleName("operation");
final FlowPanel editMain = new FlowPanel();
editMain.setStyleName("main");
HorizontalPanel editors = new HorizontalPanel();
FlowPanel editorStack1 = new FlowPanel();
FlowPanel editorStack2 = new FlowPanel();
editorStack1.add(editor1.getWidget());
editorStack1.add(displayDoc1);
editorStack1.add(toggleEditCheck1);
editorStack1.add(disabledCheck);
editorStack1.add(documentModeSelect);
// xx editorStack1.add(disabledCheck);
if (LogLevel.showDebug()) {
editorStack1.add(prettyContent1);
}
editorStack2.add(editor2.getWidget());
editorStack2.add(toggleEditCheck2);
editorStack2.add(diffCheck);
editorStack2.add(createEditor2DocDetached);
if (LogLevel.showDebug()) {
editorStack2.add(prettyContent2);
}
editors.add(editorStack1);
if (LogLevel.showDebug()) {
editors.add(prettyHtml1);
}
editors.add(editorStack2);
if (LogLevel.showDebug()) {
editors.add(prettyHtml2);
}
HorizontalPanel operations = new HorizontalPanel();
operations.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
queuingCheck.addClickHandler(queuingCheckHandler);
disabledCheck.addClickHandler(disabledCheckHandler);
diffCheck.addClickHandler(diffCheckHandler);
setPlayButtonState();
operations.add(clearAnnotationsButton);
operations.add(queuingCheck);
operations.add(playButton);
operations.add(new Label("Operation:"));
operations.add(operationOutput);
editMain.add(operations);
editMain.add(editors);
// Exactly one of these methods should be uncommented.
// initContentText();
initContentOracle();
widgetRow = new FlowPanel();
widgetRow.add(clearEditorsButton);
widgetRow.add(setContentButton);
widgetRow.add(new InlineLabel("<body><line/>"));
widgetRow.add(contentBox != null ? contentBox : contentSuggestBox);
widgetRow.add(new InlineLabel("</body>"));
Button clearContentBoxButton = new Button("Clear text", new ClickHandler() {
public void onClick(ClickEvent e) {
if (contentBox != null) {
contentBox.setValue("");
} else {
contentSuggestBox.setValue("");
}
}
});
clearContentBoxButton.getElement().setId("clear-content-box");
widgetRow.add(clearContentBoxButton);
// Hide it, only really used for webdriver tests
clearContentBoxButton.setVisible(false);
if (LogLevel.showDebug()) {
widgetRow.add(new FlowPanel());
widgetRow.add(clearLogButton);
widgetRow.add(quietButton);
widgetRow.add(loudButton);
}