return;
}
- boolean mightToggleVScrollBar = "".equals(height) && !"".equals(width);
- boolean mightToggleHScrollBar = "".equals(width) && !"".equals(height);
- int wBeforeRender = 0;
- int hBeforeRender = 0;
- if (mightToggleHScrollBar || mightToggleVScrollBar) {
- wBeforeRender = canvas.getOffsetWidth();
- hBeforeRender = getOffsetHeight();
- }
canvas.setWidth("0px");
handleMargins(uidl);
boolean needsRelativeSizeCheck = false;
- if (mightToggleHScrollBar && wBeforeRender != canvas.getOffsetWidth()) {
- needsRelativeSizeCheck = true;
- }
- if (mightToggleVScrollBar && hBeforeRender != getOffsetHeight()) {
- needsRelativeSizeCheck = true;
- }
- if (needsRelativeSizeCheck) {
- client.handleComponentRelativeSize(this);
- }
}
private static int[] cloneArray(int[] toBeCloned) {
}
public boolean requestLayout(Set<Paintable> child) {
+ // content size change might cause change to its available space
+ // (scrollbars)
+ client.handleComponentRelativeSize((Widget) layout);
if (height != null && height != "" && width != null && width != "") {
/*
* If the height and width has been specified the child components
}
public boolean requestLayout(Set<Paintable> child) {
+ // content size change might cause change to its available space
+ // (scrollbars)
+ for (Paintable paintable : child) {
+ client.handleComponentRelativeSize((Widget) paintable);
+ }
if (height != null && width != null) {
/*
* If the height and width has been specified the child components
* If the height and width has been specified for this container the
* child components cannot make the size of the layout change
*/
-
+ // layout size change may affect its available space (scrollbars)
+ for (Paintable paintable : child) {
+ client.handleComponentRelativeSize((Widget) paintable);
+ }
return true;
}
/**
*
*/
-public class VView extends SimplePanel implements Container,
- ResizeHandler, Window.ClosingHandler {
+public class VView extends SimplePanel implements Container, ResizeHandler,
+ Window.ClosingHandler {
private static final String CLASSNAME = "v-view";
*/
updateParentFrameSize();
+ // layout size change may affect its available space (scrollbars)
+ connection.handleComponentRelativeSize((Widget) layout);
+
return true;
}
/**
* Return an iterator for current subwindows. This method is meant for
* testing purposes only.
- *
+ *
* @return
*/
public ArrayList<VWindow> getSubWindowList() {
center();
}
updateShadowSizeAndPosition();
+ // layout size change may affect its available space (scrollbars)
+ client.handleComponentRelativeSize((Widget) layout);
return true;
}