summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-03-11 16:52:15 +0200
committerArtur Signell <artur@vaadin.com>2014-03-11 17:08:20 +0200
commit35c270eb5de2c1a30efd7790371bbae30e9f1acb (patch)
tree84233414c670d6496e5ce92936b533735702d303 /server/src
parent0d1f0b9aab1cf9e9aed9e2ec4a03a3c6c8c509cb (diff)
downloadvaadin-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.java25
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