diff options
author | Artur Signell <artur@vaadin.com> | 2012-09-20 17:14:14 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-09-20 17:14:28 +0300 |
commit | 9500a714336d6f08b47f7cba980fc82faf318ef3 (patch) | |
tree | 8ed3d39cab8d386b079283b261c3bdc5b3347fd8 | |
parent | 1ba5c8840334b343dd196d239303148d56fb2a72 (diff) | |
download | vaadin-framework-9500a714336d6f08b47f7cba980fc82faf318ef3.tar.gz vaadin-framework-9500a714336d6f08b47f7cba980fc82faf318ef3.zip |
Moved visible out from state so isVisible does not call markAsDirty (#9695)
-rw-r--r-- | server/src/com/vaadin/ui/AbstractComponent.java | 8 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/AbstractComponentContainer.java | 2 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ComponentState.java | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index 04cf914603..8ad0ecf956 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -105,6 +105,8 @@ public abstract class AbstractComponent extends AbstractClientConnector */ private ActionManager actionManager; + private boolean visible = true; + /* Constructor */ /** @@ -386,7 +388,7 @@ public abstract class AbstractComponent extends AbstractClientConnector */ @Override public boolean isVisible() { - return getState().visible; + return visible; } /* @@ -396,11 +398,11 @@ public abstract class AbstractComponent extends AbstractClientConnector */ @Override public void setVisible(boolean visible) { - if (getState().visible == visible) { + if (isVisible() == visible) { return; } - getState().visible = visible; + this.visible = visible; if (getParent() != null) { // Must always repaint the parent (at least the hierarchy) when // visibility of a child component changes. diff --git a/server/src/com/vaadin/ui/AbstractComponentContainer.java b/server/src/com/vaadin/ui/AbstractComponentContainer.java index 31529ca0d6..12ceb5a801 100644 --- a/server/src/com/vaadin/ui/AbstractComponentContainer.java +++ b/server/src/com/vaadin/ui/AbstractComponentContainer.java @@ -244,7 +244,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent @Override public void setVisible(boolean visible) { - if (getState().visible == visible) { + if (isVisible() == visible) { return; } diff --git a/shared/src/com/vaadin/shared/ComponentState.java b/shared/src/com/vaadin/shared/ComponentState.java index 3b825686d0..7d286f39a0 100644 --- a/shared/src/com/vaadin/shared/ComponentState.java +++ b/shared/src/com/vaadin/shared/ComponentState.java @@ -37,7 +37,6 @@ public class ComponentState extends SharedState { // Note: for the caption, there is a difference between null and an empty // string! public String caption = null; - public boolean visible = true; public List<String> styles = null; public String id = null; /** |