/** * Creates a button with the given HTML caption and click listener. * * @param html the HTML caption * @param listener the click listener * @deprecated Use {@link Button#Button(String, ClickHandler)} instead */ @Deprecated public Button(@IsSafeHtml String html, ClickListener listener) { this(html); addClickListener(listener); }
/** * Creates a button with the given HTML caption and click listener. * * @param html the HTML caption * @param listener the click listener * @deprecated Use {@link Button#Button(String, ClickHandler)} instead */ @Deprecated public Button(String html, ClickListener listener) { this(html); addClickListener(listener); }
/** * Creates a button with the given HTML caption and click listener. * * @param html the HTML caption * @param listener the click listener * @deprecated Use {@link Button#Button(String, ClickHandler)} instead */ @Deprecated public Button(String html, ClickListener listener) { this(html); addClickListener(listener); }
cancel.addClickListener(cancelListener); cancel.addStyleName(getCSSName(previousName)); cancel.addStyleName(app.getCSSPrefix() + "-" + previousName); cancel.addClickListener(cancelListener); cancel.addStyleName(getCSSName(cancelName)); cancel.addStyleName(app.getCSSPrefix() + "-" + cancelName); button.addClickListener(buttonListener); button.addStyleName(getCSSName(nextName)); button.addStyleName(app.getCSSPrefix() + "-" + nextName);
public ModalMessageDialog(XWikiGWTApp app, String title, String msg, String styleName){ super(false, true); this.app = app; this.addStyleName("dialog-message"); this.setText(title); if (styleName!=null) { ScrollPanel scroll = new ScrollPanel(); scroll.add(new Label(msg)); scroll.addStyleName(styleName); this.add(scroll); } else { this.add(new Label(msg)); } Button closeButton = new Button(this.app.getTranslation("Ok")); closeButton.addClickListener(new ClickListener(){ @Override public void onClick(Widget arg0) { ModalMessageDialog.this.hide(); } }); this.add(closeButton); this.show(); } }
panel.add( uploadSubmitButton ); uploadSubmitButton.addClickListener( new ClickListener() { public void onClick( Widget sender ) { uploadForm.submit();