}
public int getHeight() {
- int height = clearElement.getOffsetTop() - getElement().getOffsetTop();
+ int height = 0;
+ int h;
+
+ if (icon != null) {
+ h = icon.getOffsetHeight();
+ if (h > height) {
+ height = h;
+ }
+ }
+
+ if (captionText != null) {
+ h = captionText.getOffsetHeight();
+ if (h > height) {
+ height = h;
+ }
+ }
+ if (requiredFieldIndicator != null) {
+ h = requiredFieldIndicator.getOffsetHeight();
+ if (h > height) {
+ height = h;
+ }
+ }
+ if (errorIndicatorElement != null) {
+ h = errorIndicatorElement.getOffsetHeight();
+ if (h > height) {
+ height = h;
+ }
+ }
+
return height;
}
}
public boolean requestLayout(final Set<Paintable> changedChildren) {
- ApplicationConnection.getConsole().log("IGridLayout.requestLayout()");
boolean needsLayout = false;
boolean reDistributeColSpanWidths = false;
boolean reDistributeRowSpanHeights = false;
cell.cc.setHeight("");
cell.cc.updateWidgetSize();
- int width = cell.cc.getWidgetSize().getWidth()
- + cell.cc.getCaptionWidthAfterComponent();
+ int width = cell.getWidth();
int allocated = columnWidths[cell.col];
for (int i = 1; i < cell.colspan; i++) {
allocated += spacingPixels + columnWidths[cell.col + i];
dirtyColumns.add(cell.col);
}
- int height = cell.cc.getWidgetSize().getHeight()
- + cell.cc.getCaptionHeightAboveComponent();
+ int height = cell.getHeight();
allocated = rowHeights[cell.row];
for (int i = 1; i < cell.rowspan; i++) {
Cell cell = cells[colIndex][i];
if (cell != null && cell.getChildUIDL() != null
&& !cell.hasRelativeWidth()) {
- int width = cell.cc.getWidgetSize().getWidth()
- + cell.cc.getCaptionWidthAfterComponent();
+ int width = cell.getWidth();
if (width > colW) {
colW = width;
}
Cell cell = cells[i][rowIndex];
if (cell != null && cell.getChildUIDL() != null
&& !cell.hasRelativeHeight()) {
- int h = cell.cc.getWidgetSize().getHeight()
- + cell.cc.getCaptionHeightAboveComponent();
+ int h = cell.getHeight();
if (h > rowH) {
rowH = h;
}
public int getWidth() {
if (cc != null) {
- int w = cc.getElement().getScrollWidth();
+ int w = cc.getWidgetSize().getWidth()
+ + cc.getCaptionWidthAfterComponent();
return w;
} else {
return 0;
public int getHeight() {
if (cc != null) {
- return cc.getElement().getScrollHeight();
+ return cc.getWidgetSize().getHeight()
+ + cc.getCaptionHeightAboveComponent();
} else {
return 0;
}