diff options
author | Artur Signell <artur@vaadin.com> | 2014-03-11 16:52:15 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2014-03-11 17:08:20 +0200 |
commit | 35c270eb5de2c1a30efd7790371bbae30e9f1acb (patch) | |
tree | 84233414c670d6496e5ce92936b533735702d303 /server/src | |
parent | 0d1f0b9aab1cf9e9aed9e2ec4a03a3c6c8c509cb (diff) | |
download | vaadin-framework-35c270eb5de2c1a30efd7790371bbae30e9f1acb.tar.gz vaadin-framework-35c270eb5de2c1a30efd7790371bbae30e9f1acb.zip |
Resource constructors for Button (#13446)
Change-Id: I9e8409660f38e35c01adde69158c34e85cff3c43
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/ui/Button.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/Button.java b/server/src/com/vaadin/ui/Button.java index 1bcf802f12..765c805d37 100644 --- a/server/src/com/vaadin/ui/Button.java +++ b/server/src/com/vaadin/ui/Button.java @@ -100,6 +100,31 @@ public class Button extends AbstractComponent implements } /** + * Creates a new push button with the given icon. + * + * @param icon + * the icon + */ + public Button(Resource icon) { + this(); + setIcon(icon); + } + + /** + * Creates a new push button with the given caption and icon. + * + * @param caption + * the caption + * @param icon + * the icon + */ + public Button(String caption, Resource icon) { + this(); + setCaption(caption); + setIcon(icon); + } + + /** * Creates a new push button with a click listener. * * @param caption |