You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/08/13 08:24:03 UTC
svn commit: r803790 -
/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java
Author: tvolkert
Date: Thu Aug 13 06:24:03 2009
New Revision: 803790
URL: http://svn.apache.org/viewvc?rev=803790&view=rev
Log:
PIVOT-212 :: Minor clean up in TablePaneSkin
Modified:
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java?rev=803790&r1=803789&r2=803790&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java Thu Aug 13 06:24:03 2009
@@ -447,25 +447,24 @@
for (int j = 0, n = row.getLength(); j < n && j < columnCount; j++) {
Component child = row.get(j);
- if (child != null) {
- if (child.isVisible()) {
- child.setLocation(componentX, componentY);
-
- int columnSpan = TablePane.getColumnSpan(child);
- int childWidth = (columnSpan - 1) * horizontalSpacing;
- for (int k = 0; k < columnSpan && j + k < columnCount; k++) {
- childWidth += columnWidths[j + k];
- }
-
- int rowSpan = TablePane.getRowSpan(child);
- int childHeight = (rowSpan - 1) * verticalSpacing;
- for (int k = 0; k < rowSpan && i + k < rowCount; k++) {
- childHeight += rowHeights[i + k];
- }
+ if (child != null
+ && child.isVisible()) {
+ child.setLocation(componentX, componentY);
+
+ int columnSpan = TablePane.getColumnSpan(child);
+ int childWidth = (columnSpan - 1) * horizontalSpacing;
+ for (int k = 0; k < columnSpan && j + k < columnCount; k++) {
+ childWidth += columnWidths[j + k];
+ }
- // Set the component's size
- child.setSize(Math.max(childWidth, 0), Math.max(childHeight, 0));
+ int rowSpan = TablePane.getRowSpan(child);
+ int childHeight = (rowSpan - 1) * verticalSpacing;
+ for (int k = 0; k < rowSpan && i + k < rowCount; k++) {
+ childHeight += rowHeights[i + k];
}
+
+ // Set the component's size
+ child.setSize(Math.max(childWidth, 0), Math.max(childHeight, 0));
}
componentX += (columnWidths[j] + horizontalSpacing);