header.setStyleName("fill-layout-width");
header.add(serverName);
// ----
final DeckPanel deck = new DeckPanel();
deck.addStyleName("fill-layout");
final ListBox selector = new ListBox();
selector.addItem("Type: Remote");
selector.addItem("Type: In-VM");
selector.addItem("Type: Generic");
selector.addChangeHandler(new ChangeHandler() {
@Override
public void onChange(ChangeEvent changeEvent) {
deck.showWidget(selector.getSelectedIndex());
}
});
header.add(selector);
selector.getElement().getParentElement().setAttribute("align", "right");
panel.add(header);
panel.add(new ContentDescription("Defines a way in which connections can be made to the HornetQ server."));
genericAcceptors = new AcceptorList(presenter, AcceptorType.GENERIC);
remoteAcceptors = new AcceptorList(presenter, AcceptorType.REMOTE);
invmAcceptors = new AcceptorList(presenter, AcceptorType.INVM);
deck.add(remoteAcceptors.asWidget());
deck.add(invmAcceptors.asWidget());
deck.add(genericAcceptors.asWidget());
deck.showWidget(0);
panel.add(deck);
return layout;
}