summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-06-25 15:17:40 +0300
committerLeif Åstrand <leif@vaadin.com>2012-06-25 15:17:40 +0300
commit9e3b9a13a2af11f6660197382b4e75ccfda058b7 (patch)
treef227bda961fbcb9bfa525b4764ffb521af1f9724 /src/com
parent3081551251ca8690a77123344f2ac89a5f72728f (diff)
parent405713a4dff999ecf1987735c6c07693e988472b (diff)
downloadvaadin-framework-9e3b9a13a2af11f6660197382b4e75ccfda058b7.tar.gz
vaadin-framework-9e3b9a13a2af11f6660197382b4e75ccfda058b7.zip
Merge branch 'master' into rpcArray
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/button/ButtonState.java25
-rw-r--r--src/com/vaadin/ui/Button.java18
3 files changed, 41 insertions, 8 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java b/src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java
index 742594671f..ea130779ea 100644
--- a/src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java
+++ b/src/com/vaadin/terminal/gwt/client/LayoutManagerIE8.java
@@ -7,6 +7,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.RootPanel;
@@ -36,11 +37,12 @@ public class LayoutManagerIE8 extends LayoutManager {
@Override
protected void cleanMeasuredSizes() {
+ Document document = RootPanel.get().getElement().getOwnerDocument();
+
Iterator<Element> i = measuredSizes.keySet().iterator();
while (i.hasNext()) {
Element e = i.next();
- if (e.getOwnerDocument() != RootPanel.get().getElement()
- .getOwnerDocument()) {
+ if (e.getOwnerDocument() != document) {
i.remove();
}
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/button/ButtonState.java b/src/com/vaadin/terminal/gwt/client/ui/button/ButtonState.java
index fdc053b3ae..2daceea0e8 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/button/ButtonState.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/button/ButtonState.java
@@ -5,6 +5,7 @@
package com.vaadin.terminal.gwt.client.ui.button;
import com.vaadin.terminal.gwt.client.ComponentState;
+import com.vaadin.terminal.gwt.client.ui.TabIndexState;
import com.vaadin.ui.Button;
/**
@@ -14,10 +15,14 @@ import com.vaadin.ui.Button;
*
* @since 7.0
*/
-public class ButtonState extends ComponentState {
+public class ButtonState extends ComponentState implements TabIndexState {
private boolean disableOnClick = false;
private int clickShortcutKeyCode = 0;
/**
+ * The tab order number of this field.
+ */
+ private int tabIndex = 0;
+ /**
* If caption should be rendered in HTML
*/
private boolean htmlContentAllowed = false;
@@ -92,4 +97,22 @@ public class ButtonState extends ComponentState {
return htmlContentAllowed;
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.terminal.gwt.client.ui.TabIndexState#getTabIndex()
+ */
+ public int getTabIndex() {
+ return tabIndex;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.terminal.gwt.client.ui.TabIndexState#setTabIndex(int)
+ */
+ public void setTabIndex(int tabIndex) {
+ this.tabIndex = tabIndex;
+ }
+
}
diff --git a/src/com/vaadin/ui/Button.java b/src/com/vaadin/ui/Button.java
index 8e504d828b..0abc50f26f 100644
--- a/src/com/vaadin/ui/Button.java
+++ b/src/com/vaadin/ui/Button.java
@@ -357,8 +357,6 @@ public class Button extends AbstractComponent implements
protected ClickShortcut clickShortcut;
- private int tabIndex = 0;
-
/**
* Makes it possible to invoke a click on this button by pressing the given
* {@link KeyCode} and (optional) {@link ModifierKey}s.<br/>
@@ -471,13 +469,23 @@ public class Button extends AbstractComponent implements
requestRepaint();
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.Component.Focusable#getTabIndex()
+ */
public int getTabIndex() {
- return tabIndex;
+ return getState().getTabIndex();
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.Component.Focusable#setTabIndex(int)
+ */
public void setTabIndex(int tabIndex) {
- this.tabIndex = tabIndex;
-
+ getState().setTabIndex(tabIndex);
+ requestRepaint();
}
@Override