Browse Source

Fixed GridLayout caption rendering

Components that do not delegate caption handling to parent should not
get a caption
tags/7.0.0.alpha2
Artur Signell 12 years ago
parent
commit
e420751790

+ 15
- 0
src/com/vaadin/terminal/gwt/client/ComponentConnector.java View File



public boolean hasEventListener(String eventIdentifier); 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();

} }

+ 6
- 10
src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java View File

} }
} }


/**
* 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; return true;
} }



+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/ButtonConnector.java View File

} }


@Override @Override
protected boolean delegateCaptionHandling() {
public boolean delegateCaptionHandling() {
return false; return false;
} }



+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/CheckBoxConnector.java View File

Paintable { Paintable {


@Override @Override
protected boolean delegateCaptionHandling() {
public boolean delegateCaptionHandling() {
return false; return false;
} }



+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/FormConnector.java View File

} }


@Override @Override
protected boolean delegateCaptionHandling() {
public boolean delegateCaptionHandling() {
return false; return false;
} }



+ 3
- 1
src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java View File

needCaptionUpdate = false; needCaptionUpdate = false;


for (ComponentConnector child : getChildren()) { for (ComponentConnector child : getChildren()) {
updateCaption(child);
if (child.delegateCaptionHandling()) {
updateCaption(child);
}
} }
} }
getLayoutManager().setNeedsUpdate(this); getLayoutManager().setNeedsUpdate(this);

+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/LinkConnector.java View File

Paintable { Paintable {


@Override @Override
protected boolean delegateCaptionHandling() {
public boolean delegateCaptionHandling() {
return false; return false;
} }



+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/NativeButtonConnector.java View File

} }


@Override @Override
protected boolean delegateCaptionHandling() {
public boolean delegateCaptionHandling() {
return false; return false;
} }



+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java View File

} }


@Override @Override
protected boolean delegateCaptionHandling() {
public boolean delegateCaptionHandling() {
return false; return false;
} }



+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java View File

private boolean centerAfterLayout = false; private boolean centerAfterLayout = false;


@Override @Override
protected boolean delegateCaptionHandling() {
public boolean delegateCaptionHandling() {
return false; return false;
} }



+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/UnknownComponentConnector.java View File

implements Paintable { implements Paintable {


@Override @Override
protected boolean delegateCaptionHandling() {
public boolean delegateCaptionHandling() {
return false; return false;
} }



+ 1
- 1
src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java View File

private WindowServerRPC rpc; private WindowServerRPC rpc;


@Override @Override
protected boolean delegateCaptionHandling() {
public boolean delegateCaptionHandling() {
return false; return false;
}; };



Loading…
Cancel
Save