1 16 package com.google.gwt.user.client.ui; 17 18 import com.google.gwt.user.client.DOM; 19 import com.google.gwt.user.client.Element; 20 21 37 public class Button extends ButtonBase { 38 39 static native void click(Element button) ; 42 43 static native void adjustType(Element button) ; 52 53 56 public Button() { 57 super(DOM.createButton()); 58 adjustType(getElement()); 59 setStyleName("gwt-Button"); 60 } 61 62 67 public Button(String html) { 68 this(); 69 setHTML(html); 70 } 71 72 78 public Button(String html, ClickListener listener) { 79 this(html); 80 addClickListener(listener); 81 } 82 83 86 public void click() { 87 click(getElement()); 88 } 89 } 90 | Popular Tags |