Components that do not delegate caption handling to parent should not get a captiontags/7.0.0.alpha2
@@ -104,4 +104,19 @@ public interface ComponentConnector extends ServerConnector { | |||
public boolean hasEventListener(String eventIdentifier); | |||
/** | |||
* Return true if parent handles caption, false if the paintable handles the | |||
* caption itself. | |||
* | |||
* <p> | |||
* This should always return true and all components should let the parent | |||
* handle the caption and use other attributes for internal texts in the | |||
* component | |||
* </p> | |||
* | |||
* @return true if caption handling is delegated to the parent, false if | |||
* parent should not be allowed to render caption | |||
*/ | |||
public boolean delegateCaptionHandling(); | |||
} |
@@ -219,18 +219,14 @@ public abstract class AbstractComponentConnector extends AbstractConnector | |||
} | |||
} | |||
/** | |||
* Return true if parent handles caption, false if the paintable handles the | |||
* caption itself. | |||
* | |||
/* | |||
* (non-Javadoc) | |||
* | |||
* @deprecated This should always return true and all components should let | |||
* the parent handle the caption and use other attributes for | |||
* internal texts in the component | |||
* @return | |||
* @see | |||
* com.vaadin.terminal.gwt.client.ComponentConnector#delegateCaptionHandling | |||
* () | |||
*/ | |||
@Deprecated | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return true; | |||
} | |||
@@ -43,7 +43,7 @@ public class ButtonConnector extends AbstractComponentConnector implements | |||
} | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@@ -19,7 +19,7 @@ public class CheckBoxConnector extends AbstractFieldConnector implements | |||
Paintable { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@@ -49,7 +49,7 @@ public class FormConnector extends AbstractComponentContainerConnector | |||
} | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@@ -168,7 +168,9 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector | |||
needCaptionUpdate = false; | |||
for (ComponentConnector child : getChildren()) { | |||
updateCaption(child); | |||
if (child.delegateCaptionHandling()) { | |||
updateCaption(child); | |||
} | |||
} | |||
} | |||
getLayoutManager().setNeedsUpdate(this); |
@@ -17,7 +17,7 @@ public class LinkConnector extends AbstractComponentConnector implements | |||
Paintable { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@@ -27,7 +27,7 @@ public class NativeButtonConnector extends AbstractComponentConnector implements | |||
} | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@@ -86,7 +86,7 @@ public class PanelConnector extends AbstractComponentContainerConnector | |||
} | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@@ -20,7 +20,7 @@ public class PopupViewConnector extends AbstractComponentContainerConnector | |||
private boolean centerAfterLayout = false; | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@@ -15,7 +15,7 @@ public class UnknownComponentConnector extends AbstractComponentConnector | |||
implements Paintable { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@@ -112,7 +112,7 @@ public class WindowConnector extends AbstractComponentContainerConnector | |||
private WindowServerRPC rpc; | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
public boolean delegateCaptionHandling() { | |||
return false; | |||
}; | |||