// Create the internationalized error messages
pluralMessages = GWT.create(PluralMessages.class);
// Use a FlexTable to layout the content
FlexTable layout = new FlexTable();
FlexCellFormatter formatter = layout.getFlexCellFormatter();
layout.setCellSpacing(5);
// Add a link to the source code of the Interface
HTML link = new HTML(" <a href=\"javascript:void(0);\">PluralMessages</a>");
link.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
selectTab(2);
}
});
HorizontalPanel linkPanel = new HorizontalPanel();
linkPanel.setSpacing(3);
linkPanel.add(new HTML(constants.cwPluralFormsExampleLinkText()));
linkPanel.add(link);
layout.setWidget(0, 0, linkPanel);
formatter.setColSpan(0, 0, 2);
// Add argument 0
arg0Box = new TextBox();
arg0Box.setText("13");
layout.setHTML(2, 0, constants.cwPluralFormsExampleArg0Label());
layout.setWidget(2, 1, arg0Box);
// Add the formatted message
formattedMessage = new Label();
layout.setHTML(5, 0, constants.cwPluralFormsExampleFormattedLabel());
layout.setWidget(5, 1, formattedMessage);
formatter.setVerticalAlignment(5, 0, HasVerticalAlignment.ALIGN_TOP);
// Add handlers to all of the argument boxes
KeyUpHandler keyUpHandler = new KeyUpHandler() {
public void onKeyUp(KeyUpEvent event) {
updateMessage();