public SimpleLinkButtonSample() {
HorizontalPanel buttons = new HorizontalPanel();
SimpleLinkButton link = new SimpleLinkButton("Link");
link.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
showMessage("Link was clicked");
}
});
buttons.add(link);
addGap(buttons, "20px");
link = new SimpleLinkButton("Disabled Link");
link.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
showMessage("Should not be shown");
}
});
link.setEnabled(false);
buttons.add(link);
VerticalPanel main = new VerticalPanel();
main.add(buttons);