summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/button/VButton.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/button/VButton.java b/client/src/com/vaadin/client/ui/button/VButton.java
index d4cd40e2e9..2486876856 100644
--- a/client/src/com/vaadin/client/ui/button/VButton.java
+++ b/client/src/com/vaadin/client/ui/button/VButton.java
@@ -97,19 +97,24 @@ public class VButton extends FocusWidget implements ClickHandler {
sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.FOCUSEVENTS
| Event.KEYEVENTS);
- setStyleName(CLASSNAME);
-
// Add a11y role "button"
Accessibility.setRole(getElement(), Accessibility.ROLE_BUTTON);
- wrapper.setClassName(getStylePrimaryName() + "-wrap");
getElement().appendChild(wrapper);
- captionElement.setClassName(getStylePrimaryName() + "-caption");
wrapper.appendChild(captionElement);
+ setStyleName(CLASSNAME);
+
addClickHandler(this);
}
+ @Override
+ public void setStyleName(String style) {
+ super.setStyleName(style);
+ wrapper.setClassName(getStylePrimaryName() + "-wrap");
+ captionElement.setClassName(getStylePrimaryName() + "-caption");
+ }
+
public void setText(String text) {
captionElement.setInnerText(text);
}