"+
"Asia is the Earth's largest and most populous continent, "+
"located primarily in the eastern and northern hemispheres. "+
"Asia covers an area of "+
"44,579,000 square kilometers, about 30% of Earth's total land "+
"area and 8.7% of the Earth's total surface area. It has "+
"historically been home to the world's first modern civilizations "+
"and has always hosted the bulk of the planet's human population. "+
"
"+
"Below are some details about various countries in Asia.
");
}
});
IButton buttonLongestText = new IButton();
buttonLongestText.setWidth(140);
buttonLongestText.setTitle("Longest text");
buttonLongestText.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
htmlFlow.setContents(" "+
"Asia is the Earth's largest and most populous continent, "+
"located primarily in the eastern and northern hemispheres. "+
"Asia covers an area of 44,579,000 square kilometers, about 30% "+
"of Earth's total land area and 8.7% of the Earth's total surface "+
"area. It has historically been home to the world's first "+
"modern civilizations and has always hosted the bulk of the "+
"planet's human population. "+
"
"+
" Asia is notable for not only overall large size and population, "+
"but unusually dense and large settlements as well as vast barely "+
"populated regions within the continent of 4.4 billion people. "+
"The boundaries of Asia are traditionally determined as that of "+
"Eurasia, as there is no significant geographical separation "+
"between Asia and Europe."+
"
"+
"Below are some details about various countries in Asia.
");
}
});
IButton buttonInputDialog = new IButton();
buttonInputDialog.setWidth(140);
buttonInputDialog.setTitle("Show Input Dialog");
buttonInputDialog.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
HLayout hLayout = new HLayout();
hLayout.setLayoutTopMargin(15);
hLayout.setMargin(5);
Img img = new Img();
img.setWidth(32);
img.setHeight(32);
img.setImageType(ImageStyle.NORMAL);
img.setSrc("[SKIN]/Dialog/say.png");
DynamicForm form = new DynamicForm();
form.setWidth100();
form.setNumCols(3);
form.setColWidths(100,"*",40);
TextItem textItem = new TextItem();
textItem.setTitle("Enter your name");
textItem.setWidth("*");
textItem.setWrapTitle(false);
form.setFields(textItem, new SpacerItem());
hLayout.addMember(img);
hLayout.addMember(form);
Window window = new Window();
window.setTitle("Sample Input Dialog");
window.setWidth("80%");
window.setAutoCenter(true);
window.setMinWidth(400);
window.setMaxWidth(800);
window.addItem(hLayout);
window.show();
}
});
vLayoutButtons.addMember(buttonLongerText);
vLayoutButtons.addMember(buttonLongestText);
vLayoutButtons.addMember(buttonInputDialog);
HLayout mainHLayout = new HLayout();
mainHLayout.setWidth100();
mainHLayout.setMembersMargin(15);
mainHLayout.addMember(vLayout);
mainHLayout.addMember(vLayoutButtons);
mainHLayout.draw();
}
protected boolean isTopIntro() { return true; }
}