final HTML confirmLink = new HTML("");
confirmLangChange.add(confirmLink);
confirmLangChange.add(new HTML("."));
generalPanel.add(confirmLangChange);
languageListBox.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
updateAndDisplayConfirmLink(languageListBox.getItemText(languageListBox.getSelectedIndex()), confirmLink, confirmLangChange);
}
});
languageListBox.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
updateAndDisplayConfirmLink(languageListBox.getItemText(languageListBox.getSelectedIndex()), confirmLink, confirmLangChange);
}
});
final CheckBox detailsCheckBox = new CheckBox();
detailsCheckBox.setChecked(alwaysShowDetails);
detailsCheckBox.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
if (detailsCheckBox.isChecked()) {
alwaysShowDetailsTemp = true;
}
else {
alwaysShowDetailsTemp = false;
}
}
});
final CheckBox treesCheckBox = new CheckBox();
treesCheckBox.setChecked(treeItemsAlwaysOpen);
treesCheckBox.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
if (treesCheckBox.isChecked()) {
treeItemsAlwaysOpenTemp = true;
}
else {
treeItemsAlwaysOpenTemp = false;
}
}
});
final HorizontalPanel miniSepTextPanel = new HorizontalPanel();
final CheckBox useSeparationCharacterCheckBox = new CheckBox();
useSeparationCharacterCheckBox.setChecked(useSeparationCharacter);
useSeparationCharacterCheckBox.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
if (useSeparationCharacterCheckBox.isChecked()) {
useSeparationCharacterTemp = true;
}
else {
useSeparationCharacterTemp = false;
}
miniSepTextPanel.setVisible(useSeparationCharacterTemp);
}
});
final TextBox timeoutSecondsTextBox = new TextBox();
timeoutSecondsTextBox.setText(Integer.toString(requestTimeoutSeconds));
timeoutSecondsTextBox.setWidth(panelHeight);
timeoutSecondsTextBox.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
try {
requestTimeoutSeconds = Integer.parseInt(timeoutSecondsTextBox.getText());
timeoutSecondsTextBox.removeStyleName("restDescribe-error");
} catch (NumberFormatException e) {
timeoutSecondsTextBox.setStyleName("restDescribe-error");
}
}
});
miniSepTextPanel.setVisible(useSeparationCharacter);
final TextBox separationCharacterTextBox = new TextBox();
separationCharacterTextBox.setText(separationCharacter);
separationCharacterTextBox.setWidth(panelHeight);
separationCharacterTextBox.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
separationCharacter = separationCharacterTextBox.getText();
}
});
final TextBox namingDepthTextBox = new TextBox();
namingDepthTextBox.setText(Integer.toString(namingDepthLevel));
namingDepthTextBox.setWidth(panelHeight);
namingDepthTextBox.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
try {
namingDepthLevel = Integer.parseInt(namingDepthTextBox.getText());
namingDepthTextBox.removeStyleName("restDescribe-error");
if (SettingsDialog.namingDepthLevel == 0) {
namingDepthTextBox.setStyleName("restDescribe-error");
}
} catch (NumberFormatException e) {
namingDepthTextBox.setStyleName("restDescribe-error");
}
}
});
final RadioButton useParameterAsNameRadio = new RadioButton("paramOrEndpoint", GuiFactory.strings.useParam());
useParameterAsNameRadio.setChecked(!useEndpointAsName);
useParameterAsNameRadio.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
useEndpointAsName = !useParameterAsNameRadio.isChecked();
}
});
final RadioButton useEndpointAsNameRadio = new RadioButton("paramOrEndpoint", GuiFactory.strings.useEndpoint());
useEndpointAsNameRadio.setChecked(useEndpointAsName);
useEndpointAsNameRadio.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
useEndpointAsName = useEndpointAsNameRadio.isChecked();
}
});
final TextBox indentWidthTextBox = new TextBox();
indentWidthTextBox.setWidth(panelHeight);
indentWidthTextBox.setText(indentWidth + "");
indentWidthTextBox.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
try {
indentWidth = Integer.parseInt(indentWidthTextBox.getText());
indentWidthTextBox.removeStyleName("restDescribe-error");
if (SettingsDialog.indentWidth == 0) {
indentWidthTextBox.setStyleName("restDescribe-error");
}
} catch (NumberFormatException e) {
indentWidthTextBox.setStyleName("restDescribe-error");
}
}
});
final HorizontalPanel indentMiniPanel = new HorizontalPanel();
final RadioButton indentWithSpacesRadio = new RadioButton("indent", GuiFactory.strings.indentSpaces());
indentWithSpacesRadio.setChecked(indentWithSpaces);
indentWithSpacesRadio.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
indentWithSpaces = indentWithSpacesRadio.isChecked();
indentMiniPanel.setVisible(true);
}
});
final RadioButton indentWithTabsRadio = new RadioButton("indent", GuiFactory.strings.indentTabs());
indentWithTabsRadio.setChecked(!indentWithSpaces);
indentWithTabsRadio.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
indentWithSpaces = !indentWithTabsRadio.isChecked();
indentMiniPanel.setVisible(false);
}
});
final TextBox classSuffixTextBox = new TextBox();
classSuffixTextBox.setText(classDefaultSuffix);
classSuffixTextBox.setWidth(textBoxWidth);
classSuffixTextBox.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
classDefaultSuffix = classSuffixTextBox.getText();
}
});
final TextBox pathToDiscovererTextBox = new TextBox();
pathToDiscovererTextBox.setText(pathToDiscoverer);
pathToDiscovererTextBox.setWidth(textBoxWidth);
pathToDiscovererTextBox.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
pathToDiscoverer = pathToDiscovererTextBox.getText();
}
});