aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2012-03-19 11:43:23 +0200
committerArtur Signell <artur@vaadin.com>2012-03-21 17:53:54 +0200
commit279574a3e17884b092ef9f49ccf6ee21dcf8e97f (patch)
tree3b1b908993a567a2b95cbf4cb13ba2ff062b075f
parent5f1c86d93e5b295c0909d792ef20a53c405aa0a1 (diff)
downloadvaadin-framework-279574a3e17884b092ef9f49ccf6ee21dcf8e97f.tar.gz
vaadin-framework-279574a3e17884b092ef9f49ccf6ee21dcf8e97f.zip
Remove UIDL parameter from many caption related methods (#8435).
Visibility change related code for captions removed from VCaption, VCaptionWrapper and VFormLayout.Caption, should be handled by removing/adding caption based on hierarchy change events.
-rw-r--r--src/com/vaadin/terminal/gwt/client/ComponentContainerConnector.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/VCaption.java60
-rw-r--r--src/com/vaadin/terminal/gwt/client/VCaptionWrapper.java5
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/AbsoluteLayoutConnector.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java35
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/AbstractSplitPanelConnector.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/AccordionConnector.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/CssLayoutConnector.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/CustomComponentConnector.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/FormConnector.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/FormLayoutConnector.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java8
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/RootConnector.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/TableConnector.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/TabsheetConnector.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java7
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VAccordion.java1
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java7
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java5
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTabsheetBase.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java4
27 files changed, 76 insertions, 128 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ComponentContainerConnector.java b/src/com/vaadin/terminal/gwt/client/ComponentContainerConnector.java
index f4855dfd40..e0438360e3 100644
--- a/src/com/vaadin/terminal/gwt/client/ComponentContainerConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ComponentContainerConnector.java
@@ -26,10 +26,8 @@ public interface ComponentContainerConnector extends ComponentConnector {
*
* @param connector
* Child component for which service is requested.
- * @param uidl
- * UIDL of the child component.
*/
- void updateCaption(ComponentConnector connector, UIDL uidl);
+ void updateCaption(ComponentConnector connector);
/**
* Returns the children for this connector.
diff --git a/src/com/vaadin/terminal/gwt/client/VCaption.java b/src/com/vaadin/terminal/gwt/client/VCaption.java
index 62c6604c58..b8a105f21b 100644
--- a/src/com/vaadin/terminal/gwt/client/VCaption.java
+++ b/src/com/vaadin/terminal/gwt/client/VCaption.java
@@ -86,13 +86,10 @@ public class VCaption extends HTML {
* This method may only be called when the caption has an owner - otherwise,
* use {@link #updateCaptionWithoutOwner(UIDL, String, boolean, boolean)}.
*
- * @param uidl
* @return true if the position where the caption should be placed has
* changed
*/
- public boolean updateCaption(UIDL uidl) {
- setVisible(!uidl.getBooleanAttribute("invisible"));
-
+ public boolean updateCaption() {
boolean wasPlacedAfterComponent = placedAfterComponent;
// Caption is placed after component unless there is some part which
@@ -119,8 +116,7 @@ public class VCaption extends HTML {
showError = showError && !abstractFieldState.isHideErrors();
}
if (owner instanceof AbstractFieldConnector) {
- showRequired = ((AbstractFieldConnector) owner)
- .isRequired();
+ showRequired = ((AbstractFieldConnector) owner).isRequired();
}
if (hasIcon) {
@@ -252,13 +248,8 @@ public class VCaption extends HTML {
}
@Deprecated
- public boolean updateCaptionWithoutOwner(UIDL uidl, String caption,
- boolean disabled, boolean hasDescription, String iconURL) {
- // TODO temporary method, needed because some tabsheet and accordion
- // internal captions do not have an owner or shared state. Simplified to
- // only support those cases
- setVisible(!uidl.getBooleanAttribute("invisible"));
-
+ public boolean updateCaptionWithoutOwner(String caption, boolean disabled,
+ boolean hasDescription, String iconURL) {
boolean wasPlacedAfterComponent = placedAfterComponent;
// Caption is placed after component unless there is some part which
@@ -372,26 +363,29 @@ public class VCaption extends HTML {
}
}
- public static boolean isNeeded(UIDL uidl, ComponentState state) {
- if (state != null) {
- if (state.getCaption() != null) {
- return true;
- }
- if (state.getIcon() != null) {
- return true;
- }
- if (state.getErrorMessage() != null) {
- return true;
- }
- } else {
- // TODO fallback for cases where the caption has no owner (Tabsheet,
- // Accordion)
- if (uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_CAPTION) != null) {
- return true;
- }
- if (uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ICON)) {
- return true;
- }
+ @Deprecated
+ public static boolean isNeeded(UIDL uidl) {
+ // TODO fallback for cases where the caption has no owner (Tabsheet,
+ // Accordion)
+ if (uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_CAPTION) != null) {
+ return true;
+ }
+ if (uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ICON)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public static boolean isNeeded(ComponentState state) {
+ if (state.getCaption() != null) {
+ return true;
+ }
+ if (state.getIcon() != null) {
+ return true;
+ }
+ if (state.getErrorMessage() != null) {
+ return true;
}
return false;
diff --git a/src/com/vaadin/terminal/gwt/client/VCaptionWrapper.java b/src/com/vaadin/terminal/gwt/client/VCaptionWrapper.java
index b96f9621d4..2c5d9384f4 100644
--- a/src/com/vaadin/terminal/gwt/client/VCaptionWrapper.java
+++ b/src/com/vaadin/terminal/gwt/client/VCaptionWrapper.java
@@ -29,9 +29,8 @@ public class VCaptionWrapper extends FlowPanel {
setStyleName(CLASSNAME);
}
- public void updateCaption(UIDL uidl) {
- caption.updateCaption(uidl);
- setVisible(!uidl.getBooleanAttribute("invisible"));
+ public void updateCaption() {
+ caption.updateCaption();
}
public ComponentConnector getPaintable() {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbsoluteLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbsoluteLayoutConnector.java
index ca0d6bbc73..4f8d75ff67 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/AbsoluteLayoutConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/AbsoluteLayoutConnector.java
@@ -72,10 +72,10 @@ public class AbsoluteLayoutConnector extends
}
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
AbsoluteWrapper parent2 = (AbsoluteWrapper) (component.getWidget())
.getParent();
- parent2.updateCaption(uidl);
+ parent2.updateCaption();
}
@Override
diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java
index de85f597df..39815f5156 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java
@@ -29,9 +29,6 @@ public abstract class AbstractComponentConnector extends AbstractConnector
private Widget widget;
- /* State variables */
- private boolean visible = true;
-
// shared state from the server to the client
private ComponentState state;
@@ -115,8 +112,6 @@ public abstract class AbstractComponentConnector extends AbstractConnector
}
ConnectorMap paintableMap = ConnectorMap.get(getConnection());
- // Visibility
- setVisible(!uidl.getBooleanAttribute("invisible"), uidl);
if (getState().getDebugId() != null) {
getWidget().getElement().setId(getState().getDebugId());
@@ -163,7 +158,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
if (delegateCaptionHandling()) {
ComponentContainerConnector parent = getParent();
if (parent != null) {
- parent.updateCaption(this, uidl);
+ parent.updateCaption(this);
} else {
VConsole.error("Parent of connector "
+ getClass().getName()
@@ -263,34 +258,6 @@ public abstract class AbstractComponentConnector extends AbstractConnector
}
/**
- * Sets the visible state for this paintable.
- *
- * @param visible
- * true if the paintable should be made visible, false otherwise
- * @param captionUidl
- * The UIDL that is passed to the parent and onwards to VCaption
- * if the caption needs to be updated as a result of the
- * visibility change.
- */
- protected void setVisible(boolean visible, UIDL captionUidl) {
- boolean wasVisible = this.visible;
- this.visible = visible;
-
- getWidget().setVisible(visible);
- if (wasVisible != visible) {
- // Changed invisibile <-> visible
- if (wasVisible && delegateCaptionHandling()) {
- // Must hide caption when component is hidden
- getParent().updateCaption(this, captionUidl);
- }
- }
- }
-
- protected boolean isVisible() {
- return visible;
- }
-
- /**
* Generates the style name for the widget based on the given primary style
* name (typically returned by Widget.getPrimaryStyleName()) and the UIDL
* and shared state of the component. An additional "modified" style name
diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java
index f4a65df56b..dc0812c6f1 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java
@@ -27,9 +27,9 @@ public abstract class AbstractOrderedLayoutConnector extends
getWidget().spacingMeasureElement);
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
VMeasuringOrderedLayout layout = getWidget();
- if (VCaption.isNeeded(uidl, component.getState())) {
+ if (VCaption.isNeeded(component.getState())) {
VLayoutSlot layoutSlot = layout.getSlotForChild(component
.getWidget());
VCaption caption = layoutSlot.getCaption();
@@ -40,7 +40,7 @@ public abstract class AbstractOrderedLayoutConnector extends
layout.setCaption(widget, caption);
}
- caption.updateCaption(uidl);
+ caption.updateCaption();
} else {
layout.setCaption(component.getWidget(), null);
getLayoutManager().setNeedsUpdate(this);
diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractSplitPanelConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractSplitPanelConnector.java
index 5725f6d4f5..3426932aab 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/AbstractSplitPanelConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractSplitPanelConnector.java
@@ -55,7 +55,7 @@ public abstract class AbstractSplitPanelConnector extends
public static final String SPLITTER_CLICK_EVENT_IDENTIFIER = "sp_click";
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
// TODO Implement caption handling
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/AccordionConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AccordionConnector.java
index d0c663a6ce..267884ccc5 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/AccordionConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/AccordionConnector.java
@@ -59,7 +59,7 @@ public class AccordionConnector extends TabsheetBaseConnector implements
return GWT.create(VAccordion.class);
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
/* Accordion does not render its children's captions */
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/CssLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/CssLayoutConnector.java
index d2a8497331..f714ab8bd7 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/CssLayoutConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/CssLayoutConnector.java
@@ -56,8 +56,8 @@ public class CssLayoutConnector extends AbstractComponentContainerConnector {
return GWT.create(VCssLayout.class);
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
- getWidget().panel.updateCaption(component, uidl);
+ public void updateCaption(ComponentConnector component) {
+ getWidget().panel.updateCaption(component);
}
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/CustomComponentConnector.java b/src/com/vaadin/terminal/gwt/client/ui/CustomComponentConnector.java
index 68593ab281..e3e52bdb8d 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/CustomComponentConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/CustomComponentConnector.java
@@ -45,7 +45,7 @@ public class CustomComponentConnector extends
return (VCustomComponent) super.getWidget();
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
// NOP, custom component dont render composition roots caption
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java
index 2f2021ecd6..2941afe901 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java
@@ -85,8 +85,8 @@ public class CustomLayoutConnector extends AbstractComponentContainerConnector
return GWT.create(VCustomLayout.class);
}
- public void updateCaption(ComponentConnector paintable, UIDL uidl) {
- getWidget().updateCaption(paintable, uidl);
+ public void updateCaption(ComponentConnector paintable) {
+ getWidget().updateCaption(paintable);
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/FormConnector.java b/src/com/vaadin/terminal/gwt/client/ui/FormConnector.java
index 146283ec03..01bd8ce007 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/FormConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/FormConnector.java
@@ -65,8 +65,8 @@ public class FormConnector extends AbstractComponentContainerConnector
}
if (null != getState().getErrorMessage()) {
- getWidget().errorMessage.updateMessage(getState()
- .getErrorMessage());
+ getWidget().errorMessage
+ .updateMessage(getState().getErrorMessage());
getWidget().errorMessage.setVisible(true);
} else {
getWidget().errorMessage.setVisible(false);
@@ -154,7 +154,7 @@ public class FormConnector extends AbstractComponentContainerConnector
}
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
// NOP form don't render caption for neither field layout nor footer
// layout
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/FormLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/FormLayoutConnector.java
index 52eb4c9826..1c402309ac 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/FormLayoutConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/FormLayoutConnector.java
@@ -24,16 +24,16 @@ public class FormLayoutConnector extends AbstractComponentContainerConnector {
getWidget().table.updateFromUIDL(uidl, client);
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
final Caption c = getWidget().table.widgetToCaption.get(component
.getWidget());
if (c != null) {
- c.updateCaption(uidl, component.getState(), component.isEnabled());
+ c.updateCaption(component.getState(), component.isEnabled());
}
final ErrorFlag e = getWidget().table.widgetToError.get(component
.getWidget());
if (e != null) {
- e.updateFromUIDL(uidl, component);
+ e.updateFromUIDL(component);
}
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java
index dbe490f017..3a3bd46f07 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java
@@ -125,9 +125,9 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector
getLayoutManager().setNeedsUpdate(this);
}
- public void updateCaption(ComponentConnector paintable, UIDL uidl) {
+ public void updateCaption(ComponentConnector paintable) {
VGridLayout layout = getWidget();
- if (VCaption.isNeeded(uidl, paintable.getState())) {
+ if (VCaption.isNeeded(paintable.getState())) {
Cell cell = layout.widgetToCell.get(paintable.getWidget());
VLayoutSlot layoutSlot = cell.slot;
VCaption caption = layoutSlot.getCaption();
@@ -138,7 +138,7 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector
layout.setCaption(widget, caption);
}
- caption.updateCaption(uidl);
+ caption.updateCaption();
} else {
layout.setCaption(paintable.getWidget(), null);
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java b/src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java
index 91320c3d8d..95a0e6f2d5 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java
@@ -177,7 +177,7 @@ public class PanelConnector extends AbstractComponentContainerConnector
getWidget().contentNode.setTabIndex(getState().getTabIndex());
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
// NOP: layouts caption, errors etc not rendered in Panel
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java b/src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java
index f1b6c4bbfa..3b31301567 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java
@@ -77,15 +77,15 @@ public class PopupViewConnector extends AbstractComponentContainerConnector {
}
}// updateFromUIDL
- public void updateCaption(ComponentConnector component, UIDL uidl) {
- if (VCaption.isNeeded(uidl, component.getState())) {
+ public void updateCaption(ComponentConnector component) {
+ if (VCaption.isNeeded(component.getState())) {
if (getWidget().popup.captionWrapper != null) {
- getWidget().popup.captionWrapper.updateCaption(uidl);
+ getWidget().popup.captionWrapper.updateCaption();
} else {
getWidget().popup.captionWrapper = new VCaptionWrapper(
component, getConnection());
getWidget().popup.setWidget(getWidget().popup.captionWrapper);
- getWidget().popup.captionWrapper.updateCaption(uidl);
+ getWidget().popup.captionWrapper.updateCaption();
}
} else {
if (getWidget().popup.captionWrapper != null) {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/RootConnector.java b/src/com/vaadin/terminal/gwt/client/ui/RootConnector.java
index 3aac8d7ac3..591e614b71 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/RootConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/RootConnector.java
@@ -306,7 +306,7 @@ public class RootConnector extends AbstractComponentContainerConnector
}
};
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
// NOP The main view never draws caption for its layout
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/TableConnector.java b/src/com/vaadin/terminal/gwt/client/ui/TableConnector.java
index eae0cd61ee..572b09d7dd 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/TableConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/TableConnector.java
@@ -248,7 +248,7 @@ public class TableConnector extends AbstractComponentContainerConnector
return (VScrollTable) super.getWidget();
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
// NOP, not rendered
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/TabsheetConnector.java b/src/com/vaadin/terminal/gwt/client/ui/TabsheetConnector.java
index 6b2cf9efb0..180fb8ac34 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/TabsheetConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/TabsheetConnector.java
@@ -71,7 +71,7 @@ public class TabsheetConnector extends TabsheetBaseConnector implements
return (VTabsheet) super.getWidget();
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
+ public void updateCaption(ComponentConnector component) {
/* Tabsheet does not render its children's captions */
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java
index 88f525cb4e..103faff6ff 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java
@@ -85,16 +85,15 @@ public class VAbsoluteLayout extends ComplexPanel {
setStyleName(CLASSNAME + "-wrapper");
}
- public void updateCaption(UIDL uidl) {
+ public void updateCaption() {
- boolean captionIsNeeded = VCaption.isNeeded(uidl,
- paintable.getState());
+ boolean captionIsNeeded = VCaption.isNeeded(paintable.getState());
if (captionIsNeeded) {
if (caption == null) {
caption = new VCaption(paintable, client);
VAbsoluteLayout.this.add(caption);
}
- caption.updateCaption(uidl);
+ caption.updateCaption();
updateCaptionPosition();
} else {
if (caption != null) {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java b/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java
index e225895995..cf07219516 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java
@@ -440,7 +440,6 @@ public class VAccordion extends VTabsheetBase {
public void updateCaption(UIDL uidl) {
// TODO need to call this because the caption does not have an owner
caption.updateCaptionWithoutOwner(
- uidl,
uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_CAPTION),
uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DISABLED),
uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION),
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java
index 9c9b2a7266..989e2af6b4 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java
@@ -144,10 +144,10 @@ public class VCssLayout extends SimplePanel {
insert(child, index);
}
- public void updateCaption(ComponentConnector paintable, UIDL uidl) {
+ public void updateCaption(ComponentConnector paintable) {
Widget widget = paintable.getWidget();
VCaption caption = widgetToCaption.get(widget);
- if (VCaption.isNeeded(uidl, paintable.getState())) {
+ if (VCaption.isNeeded(paintable.getState())) {
if (caption == null) {
caption = new VCaption(paintable, client);
widgetToCaption.put(widget, caption);
@@ -157,7 +157,7 @@ public class VCssLayout extends SimplePanel {
insert(caption, getWidgetIndex(widget));
lastIndex++;
}
- caption.updateCaption(uidl);
+ caption.updateCaption();
} else if (caption != null) {
remove(caption);
widgetToCaption.remove(widget);
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java
index 36d5fe9812..8861a9bf24 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java
@@ -300,10 +300,10 @@ public class VCustomLayout extends ComplexPanel {
}
/** Update caption for given widget */
- public void updateCaption(ComponentConnector paintable, UIDL uidl) {
+ public void updateCaption(ComponentConnector paintable) {
VCaptionWrapper wrapper = paintableToCaptionWrapper.get(paintable);
Widget widget = paintable.getWidget();
- if (VCaption.isNeeded(uidl, paintable.getState())) {
+ if (VCaption.isNeeded(paintable.getState())) {
if (wrapper == null) {
// Add a wrapper between the layout and the child widget
final String loc = getLocation(widget);
@@ -312,7 +312,7 @@ public class VCustomLayout extends ComplexPanel {
super.add(wrapper, locationToElement.get(loc));
paintableToCaptionWrapper.put(paintable, wrapper);
}
- wrapper.updateCaption(uidl);
+ wrapper.updateCaption();
} else {
if (wrapper != null) {
// Remove the wrapper and add the widget directly to the layout
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java
index 3ed63b9702..1d7b053925 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java
@@ -241,10 +241,7 @@ public class VFormLayout extends SimplePanel {
setStyleName(styleName);
}
- public void updateCaption(UIDL uidl, ComponentState state,
- boolean enabled) {
- setVisible(!uidl.getBooleanAttribute("invisible"));
-
+ public void updateCaption(ComponentState state, boolean enabled) {
// Update styles as they might have changed when the caption changed
setStyles(getStylesFromState(state, enabled));
@@ -352,7 +349,7 @@ public class VFormLayout extends SimplePanel {
sinkEvents(VTooltip.TOOLTIP_EVENTS);
}
- public void updateFromUIDL(UIDL uidl, ComponentConnector component) {
+ public void updateFromUIDL(ComponentConnector component) {
owner = component;
boolean showError = null != owner.getState().getErrorMessage();
if (owner.getState() instanceof AbstractFieldState) {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
index d54b40f52f..6e4f104b17 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
@@ -246,14 +246,14 @@ public class VTabsheet extends VTabsheetBase implements Focusable,
this.tab = tab;
}
- @Override
public boolean updateCaption(UIDL uidl) {
if (uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION)) {
TooltipInfo tooltipInfo = new TooltipInfo();
tooltipInfo
.setTitle(uidl
.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION));
- // TODO currently, there is no error indicator and message for a tab
+ // TODO currently, there is no error indicator and message for a
+ // tab
client.registerTooltip(getTabsheet(), getElement(), tooltipInfo);
} else {
client.registerTooltip(getTabsheet(), getElement(), null);
@@ -262,7 +262,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable,
// TODO need to call this instead of super because the caption does
// not have an owner
boolean ret = updateCaptionWithoutOwner(
- uidl,
uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_CAPTION),
uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DISABLED),
uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION),
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheetBase.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheetBase.java
index 910400e779..a499a35460 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheetBase.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheetBase.java
@@ -32,11 +32,7 @@ abstract class VTabsheetBase extends ComplexPanel {
}
/**
- * @return a list of currently shown Paintables
- *
- * Apparently can be something else than Paintable as
- * {@link #updateFromUIDL(UIDL, ApplicationConnection)} checks if
- * instanceof Paintable. Therefore set to <Object>
+ * @return a list of currently shown Widgets
*/
abstract protected Iterator<Widget> getWidgetIterator();
diff --git a/src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java b/src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java
index 8d8931590d..c963b08772 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java
@@ -223,8 +223,8 @@ public class WindowConnector extends AbstractComponentContainerConnector
}
}
- public void updateCaption(ComponentConnector component, UIDL uidl) {
- // NOP, window has own caption, layout captio not rendered
+ public void updateCaption(ComponentConnector component) {
+ // NOP, window has own caption, layout caption not rendered
}
public void onBeforeShortcutAction(Event e) {