super.onFirstShowPage();
final PVerticalPanel verticalPanel = new PVerticalPanel();
verticalPanel.setSpacing(10);
final PHTML htmlBold = new PHTML("<b>Pony Bold</b> and <font color='red'>Pony Red</font> using HTML");
final PHTML htmlClickable = new PHTML("<span style='cursor: pointer;border: 1px solid black;color:white;background-color:gray;margin:5px;padding:10px'>click me!</span> using HTML and CSS");
htmlClickable.addClickHandler(new PClickHandler() {
@Override
public void onClick(final PClickEvent clickEvent) {
logEvent("HTML clicked", clickEvent);
}
});
final PHTML htmlDoubleClickable = new PHTML("<span style='cursor: pointer;border: 1px solid black;color:white;background-color:gray;margin:5px;padding:10px'>double click me!</span> using HTML and CSS");
htmlDoubleClickable.addDoubleClickHandler(new PDoubleClickHandler() {
@Override
public void onDoubleClick(final PDoubleClickEvent clickEvent) {
logEvent("HTML double clicked", clickEvent);
}
});
final PHTML htmlWithContextMenu = new PHTML("<span style='cursor: pointer;border: 1px solid black;color:white;background-color:gray;margin:5px;padding:10px'>context menu on me!</span> using HTML and CSS");
htmlWithContextMenu.preventEvent(PEvent.ONCONTEXTMENU);
htmlWithContextMenu.addDomHandler(new PContextMenuHandler() {
@Override
public void onContextMenu(final PContextMenuEvent event) {
PNotificationManager.showHumanizedNotification("Context menu triggered");
}