summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/Button.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-03-23 09:52:33 +0200
committerArtur Signell <artur@vaadin.com>2012-03-23 09:52:33 +0200
commitb052e30bb6aad20a4a7f840ff4fa646c2967e290 (patch)
treef11e9108119ec519810cf27c112fd855a5095148 /src/com/vaadin/ui/Button.java
parentdd06b3cb695567379b381e4be28fb609d0c70074 (diff)
parent2296d93d648857c248162a1261a15e7a8c7ca378 (diff)
downloadvaadin-framework-b052e30bb6aad20a4a7f840ff4fa646c2967e290.tar.gz
vaadin-framework-b052e30bb6aad20a4a7f840ff4fa646c2967e290.zip
Merge remote-tracking branch 'origin/6.8'
Conflicts: src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java
Diffstat (limited to 'src/com/vaadin/ui/Button.java')
-rw-r--r--src/com/vaadin/ui/Button.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/vaadin/ui/Button.java b/src/com/vaadin/ui/Button.java
index 2e23d4ae74..dbebd9200c 100644
--- a/src/com/vaadin/ui/Button.java
+++ b/src/com/vaadin/ui/Button.java
@@ -311,6 +311,17 @@ public class Button extends AbstractComponent implements
}
/**
+ * Simulates a button click, notifying all server-side listeners.
+ *
+ * No action is taken is the button is disabled.
+ */
+ public void click() {
+ if (isEnabled() && !isReadOnly()) {
+ fireClick();
+ }
+ }
+
+ /**
* Fires a click event to all listeners without any event details.
*
* In subclasses, override {@link #fireClick(MouseEventDetails)} instead of
@@ -445,9 +456,7 @@ public class Button extends AbstractComponent implements
@Override
public void handleAction(Object sender, Object target) {
- if (button.isEnabled() && !button.isReadOnly()) {
- button.fireClick();
- }
+ button.click();
}
}