aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/LoginForm.java
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2009-10-27 15:38:05 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2009-10-27 15:38:05 +0000
commitc0e9e16c3fe44b7ed555ac6a5681d8df9d45b0e2 (patch)
tree17b9bae176fdc4a210a233f06505fad66ca9be47 /src/com/vaadin/ui/LoginForm.java
parent44f5e4a252a8053dece47f94556af82643ec3874 (diff)
downloadvaadin-framework-c0e9e16c3fe44b7ed555ac6a5681d8df9d45b0e2.tar.gz
vaadin-framework-c0e9e16c3fe44b7ed555ac6a5681d8df9d45b0e2.zip
merged [9413],[9414] from 6.1
svn changeset:9415/svn branch:6.2
Diffstat (limited to 'src/com/vaadin/ui/LoginForm.java')
-rw-r--r--src/com/vaadin/ui/LoginForm.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/LoginForm.java b/src/com/vaadin/ui/LoginForm.java
index 53035083ef..33ee670f4b 100644
--- a/src/com/vaadin/ui/LoginForm.java
+++ b/src/com/vaadin/ui/LoginForm.java
@@ -243,6 +243,9 @@ public class LoginForm extends CustomComponent {
private static final Method ON_LOGIN_METHOD;
+ private static final String UNDEFINED_HEIGHT = "140px";
+ private static final String UNDEFINED_WIDTH = "200px";
+
static {
try {
ON_LOGIN_METHOD = LoginListener.class.getDeclaredMethod("onLogin",
@@ -272,4 +275,28 @@ public class LoginForm extends CustomComponent {
removeListener(LoginEvent.class, listener, ON_LOGIN_METHOD);
}
+ @Override
+ public void setWidth(float width, int unit) {
+ super.setWidth(width, unit);
+ if (iframe != null) {
+ if (width < 0) {
+ iframe.setWidth(UNDEFINED_WIDTH);
+ } else {
+ iframe.setWidth("100%");
+ }
+ }
+ }
+
+ @Override
+ public void setHeight(float height, int unit) {
+ super.setHeight(height, unit);
+ if (iframe != null) {
+ if (height < 0) {
+ iframe.setHeight(UNDEFINED_HEIGHT);
+ } else {
+ iframe.setHeight("100%");
+ }
+ }
+ }
+
}