this.currentHost = currentHost;
}
Widget asWidget() {
DockLayoutPanel wrapper = new DockLayoutPanel(Style.Unit.PX);
VerticalPanel layout = new VerticalPanel();
layout.setStyleName("window-content");
final Form<Jvm> form = new Form<Jvm>(Jvm.class);
TextBoxItem nameItem = new TextBoxItem("name", Console.CONSTANTS.common_label_name());
TextBoxItem heapItem = new TextBoxItem("heapSize", "Heap Size");
TextBoxItem maxHeapItem = new TextBoxItem("maxHeapSize", "Max Heap Size");
//CheckBoxItem debugItem = new CheckBoxItem("debugEnabled", "Debug Enabled?");
//TextBoxItem debugOptionsItem = new TextBoxItem("debugOptions", "Debug Options");
form.setFields(nameItem, heapItem, maxHeapItem);
final FormHelpPanel helpPanel = new FormHelpPanel(
new FormHelpPanel.AddressCallback() {
@Override
public ModelNode getAddress() {
ModelNode address = new ModelNode();
address.add("host", Console.MODULES.getCurrentSelectedHost().getName());
address.add("jvm", "*");
return address;
}
}, form
);
layout.add(helpPanel.asWidget());
layout.add(form.asWidget());
DialogueOptions options = new DialogueOptions(
new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
presenter.onCreateJvm(currentHost.getName(), form.getUpdatedEntity());
}
},
new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
presenter.closeDialogue();
}
}
);
wrapper.addSouth(options, 35);
wrapper.add(layout);
return wrapper;
}