diff options
author | Artur Signell <artur@vaadin.com> | 2012-08-22 08:53:23 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-08-22 14:01:49 +0300 |
commit | 88776600733901f3f9891aa90a11a5aeb2b97ef4 (patch) | |
tree | a20323b7af46d1dbd860a21a5e92b16d18c6c100 /client/src | |
parent | 667ef9c144bf3522100e5c8eac4d76a3c4faf65b (diff) | |
download | vaadin-framework-88776600733901f3f9891aa90a11a5aeb2b97ef4.tar.gz vaadin-framework-88776600733901f3f9891aa90a11a5aeb2b97ef4.zip |
Changed border style to enum (#9072)
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/terminal/gwt/client/ui/link/LinkConnector.java | 7 | ||||
-rw-r--r-- | client/src/com/vaadin/terminal/gwt/client/ui/link/VLink.java | 18 |
2 files changed, 16 insertions, 9 deletions
diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/link/LinkConnector.java b/client/src/com/vaadin/terminal/gwt/client/ui/link/LinkConnector.java index c4bbcd34f7..f2b8361f2b 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ui/link/LinkConnector.java +++ b/client/src/com/vaadin/terminal/gwt/client/ui/link/LinkConnector.java @@ -17,6 +17,7 @@ package com.vaadin.terminal.gwt.client.ui.link; import com.google.gwt.user.client.DOM; +import com.vaadin.shared.ui.BorderStyle; import com.vaadin.shared.ui.Connect; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.Paintable; @@ -57,12 +58,12 @@ public class LinkConnector extends AbstractComponentConnector implements if (uidl.hasAttribute("border")) { if ("none".equals(uidl.getStringAttribute("border"))) { - getWidget().borderStyle = VLink.BORDER_STYLE_NONE; + getWidget().borderStyle = BorderStyle.NONE; } else { - getWidget().borderStyle = VLink.BORDER_STYLE_MINIMAL; + getWidget().borderStyle = BorderStyle.MINIMAL; } } else { - getWidget().borderStyle = VLink.BORDER_STYLE_DEFAULT; + getWidget().borderStyle = BorderStyle.DEFAULT; } getWidget().targetHeight = uidl.hasAttribute("targetHeight") ? uidl diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/link/VLink.java b/client/src/com/vaadin/terminal/gwt/client/ui/link/VLink.java index e312d4d489..b0e44c9d13 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ui/link/VLink.java +++ b/client/src/com/vaadin/terminal/gwt/client/ui/link/VLink.java @@ -23,6 +23,7 @@ import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.HTML; +import com.vaadin.shared.ui.BorderStyle; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.ui.Icon; @@ -31,15 +32,20 @@ public class VLink extends HTML implements ClickHandler { public static final String CLASSNAME = "v-link"; - protected static final int BORDER_STYLE_DEFAULT = 0; - protected static final int BORDER_STYLE_MINIMAL = 1; - protected static final int BORDER_STYLE_NONE = 2; + @Deprecated + protected static final BorderStyle BORDER_STYLE_DEFAULT = BorderStyle.DEFAULT; + + @Deprecated + protected static final BorderStyle BORDER_STYLE_MINIMAL = BorderStyle.MINIMAL; + + @Deprecated + protected static final BorderStyle BORDER_STYLE_NONE = BorderStyle.NONE; protected String src; protected String target; - protected int borderStyle = BORDER_STYLE_DEFAULT; + protected BorderStyle borderStyle = BorderStyle.DEFAULT; protected boolean enabled; @@ -73,10 +79,10 @@ public class VLink extends HTML implements ClickHandler { } String features; switch (borderStyle) { - case BORDER_STYLE_NONE: + case NONE: features = "menubar=no,location=no,status=no"; break; - case BORDER_STYLE_MINIMAL: + case MINIMAL: features = "menubar=yes,location=no,status=no"; break; default: |