showDetails = new Hyperlink(GuiFactory.strings.hideDetails(), true, "");
}
else {
showDetails = new Hyperlink(GuiFactory.strings.showDetails(), true, "");
}
showDetails.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
if (detailsPanel.isVisible()) {
detailsPanel.setVisible(false);
showDetails.setText(GuiFactory.strings.showDetails());
}
else {
detailsPanel.setVisible(true);
showDetails.setText(GuiFactory.strings.hideDetails());
}
}
});
parameterPanel4.add(showDetails);
HorizontalPanel parameterPanel5 = new HorizontalPanel();
parameterPanel5.add(new HTML(SyntaxHighlighter.highlight(WadlXml.param_default + "=\"")));
final TextBox parameterDefault = new TextBox();
parameterDefault.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
param.updateDefaultValue(param.getDefaultValue(), parameterDefault.getText());
}
});
parameterDefault.setText(param.getDefaultValue());
parameterPanel5.add(parameterDefault);
parameterPanel5.add(new HTML(SyntaxHighlighter.highlight("\"")));
detailsPanel.add(parameterPanel5);
HorizontalPanel parameterPanel9 = new HorizontalPanel();
parameterPanel9.add(new HTML(SyntaxHighlighter.highlight(WadlXml.param_path + "=\"")));
final TextBox parameterPath = new TextBox();
parameterPath.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
param.updatePath(param.getPath(), parameterPath.getText());
}
});
parameterPath.setText(param.getPath());
parameterPanel9.add(parameterPath);
parameterPanel9.add(new HTML(SyntaxHighlighter.highlight("\"")));
detailsPanel.add(parameterPanel9);
HorizontalPanel parameterPanel6 = new HorizontalPanel();
parameterPanel6.add(new HTML((SyntaxHighlighter.highlight(WadlXml.param_fixed + "=\""))));
final TextBox parameterFixed = new TextBox();
parameterFixed.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
param.updateFixedValue(param.getFixedValue(), parameterFixed.getText());
}
});
parameterFixed.setText(param.getFixedValue());
parameterPanel6.add(parameterFixed);
parameterPanel6.add(new HTML(SyntaxHighlighter.highlight("\"")));
detailsPanel.add(parameterPanel6);
HorizontalPanel parameterPanel7 = new HorizontalPanel();
parameterPanel7.add(new HTML(SyntaxHighlighter.highlight(WadlXml.param_required + "=\"")));
final ListBox parameterRequired = new ListBox();
parameterRequired.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
boolean newIsRequired = false;
if (parameterRequired.getItemText(parameterRequired.getSelectedIndex()).equals("true")) {
newIsRequired = true;
}
param.updateIsRequired(param.getIsRequired(), newIsRequired);
}
});
parameterRequired.setVisibleItemCount(1);
parameterRequired.addItem("true");
parameterRequired.addItem("false");
if (param.getIsRequired()) {
parameterRequired.setSelectedIndex(0);
}
else {
parameterRequired.setSelectedIndex(1);
}
parameterPanel7.add(parameterRequired);
parameterPanel7.add(new HTML(SyntaxHighlighter.highlight("\"")));
detailsPanel.add(parameterPanel7);
HorizontalPanel parameterPanel8 = new HorizontalPanel();
parameterPanel8.add(new HTML(SyntaxHighlighter.highlight(WadlXml.param_repeating + "=\"")));
final ListBox parameterRepeating = new ListBox();
parameterRepeating.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
boolean newIsRepeating = false;
if (parameterRepeating.getItemText(parameterRepeating.getSelectedIndex()).equals("true")) {
newIsRepeating = true;
}
param.updateIsRepeating(param.getIsRepeating(), newIsRepeating);
}
});
parameterRepeating.setVisibleItemCount(1);
parameterRepeating.addItem("true");
parameterRepeating.addItem("false");
if (param.getIsRepeating()) {
parameterRepeating.setSelectedIndex(0);
}
else {
parameterRepeating.setSelectedIndex(1);
}
parameterPanel8.add(parameterRepeating);
parameterPanel8.add(new HTML(SyntaxHighlighter.highlight("\"")));
detailsPanel.add(parameterPanel8);
parameterPanelRight.add(detailsPanel);
parameterPanel.add(parameterPanelRight);
parameterPanelContainer.add(parameterPanel);
HorizontalPanel paramEndPanel = new HorizontalPanel();
if (param.getOptions().size() > 0) {
paramEndPanel.add(new HTML(SyntaxHighlighter.highlight(">")));
}
else {
paramEndPanel.add(new HTML(SyntaxHighlighter.highlight("/>")));
}
Hyperlink removeParamLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
removeParamLink.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
if (parent instanceof RequestNode) {
((RequestNode) parent).removeParam(param);
}
else if (parent instanceof ResourceNode) {