summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/com/vaadin/ui/AbstractComponent.java8
-rw-r--r--server/src/com/vaadin/ui/AbstractComponentContainer.java2
-rw-r--r--shared/src/com/vaadin/shared/ComponentState.java1
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;
/**