|
|
@ -322,7 +322,6 @@ public class TableLayout implements LayoutManager2, Serializable { |
|
|
|
this row/column. */ |
|
|
|
this row/column. */ |
|
|
|
public static final double MINIMUM = -3.0; |
|
|
|
public static final double MINIMUM = -3.0; |
|
|
|
|
|
|
|
|
|
|
|
public static final double EPSILON = 0.0000001; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//******************************************************************************
|
|
|
|
//******************************************************************************
|
|
|
|
//** Constructors ***
|
|
|
|
//** Constructors ***
|
|
|
@ -1808,8 +1807,8 @@ public class TableLayout implements LayoutManager2, Serializable { |
|
|
|
for (counter = entry.cr1[z]; counter <= entry.cr2[z]; counter++) |
|
|
|
for (counter = entry.cr1[z]; counter <= entry.cr2[z]; counter++) |
|
|
|
if (crSpec[z][counter] >= 1.0) |
|
|
|
if (crSpec[z][counter] >= 1.0) |
|
|
|
scalableSize -= crSpec[z][counter]; |
|
|
|
scalableSize -= crSpec[z][counter]; |
|
|
|
else if (Math.abs(crSpec[z][counter] - PREFERRED) < EPSILON || |
|
|
|
else if (AssistUtils.equals(crSpec[z][counter], PREFERRED) || |
|
|
|
Math.abs(crSpec[z][counter] - MINIMUM) < EPSILON) { |
|
|
|
AssistUtils.equals(crSpec[z][counter], MINIMUM)) { |
|
|
|
scalableSize -= crPrefMin[counter]; |
|
|
|
scalableSize -= crPrefMin[counter]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1825,13 +1824,13 @@ public class TableLayout implements LayoutManager2, Serializable { |
|
|
|
// Add scaled size to relativeWidth
|
|
|
|
// Add scaled size to relativeWidth
|
|
|
|
relativeSize += crSpec[z][counter]; |
|
|
|
relativeSize += crSpec[z][counter]; |
|
|
|
// Cr is fill
|
|
|
|
// Cr is fill
|
|
|
|
else if (Math.abs(crSpec[z][counter] - FILL) < EPSILON && Math.abs(fillSizeRatio - 0.0) >= EPSILON) |
|
|
|
else if (AssistUtils.equals(crSpec[z][counter], FILL) && !AssistUtils.equals(fillSizeRatio, 0.0)) |
|
|
|
// Add fill size to relativeWidth
|
|
|
|
// Add fill size to relativeWidth
|
|
|
|
relativeSize += fillSizeRatio; |
|
|
|
relativeSize += fillSizeRatio; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Determine the total scaled size as estimated by this component
|
|
|
|
// Determine the total scaled size as estimated by this component
|
|
|
|
if (Math.abs(relativeSize - 0) < EPSILON) |
|
|
|
if (AssistUtils.equals(relativeSize, 0)) |
|
|
|
temp = 0; |
|
|
|
temp = 0; |
|
|
|
else |
|
|
|
else |
|
|
|
temp = (int) (scalableSize / relativeSize + 0.5); |
|
|
|
temp = (int) (scalableSize / relativeSize + 0.5); |
|
|
@ -1852,8 +1851,8 @@ public class TableLayout implements LayoutManager2, Serializable { |
|
|
|
if (crSpec[z][counter] >= 1.0) |
|
|
|
if (crSpec[z][counter] >= 1.0) |
|
|
|
totalSize += (int) (crSpec[z][counter] + 0.5); |
|
|
|
totalSize += (int) (crSpec[z][counter] + 0.5); |
|
|
|
// Is the current cr a preferred/minimum size
|
|
|
|
// Is the current cr a preferred/minimum size
|
|
|
|
else if (Math.abs(crSpec[z][counter] - PREFERRED) < EPSILON|| |
|
|
|
else if (AssistUtils.equals(crSpec[z][counter], PREFERRED) || |
|
|
|
Math.abs(crSpec[z][counter] - MINIMUM) < EPSILON) { |
|
|
|
AssistUtils.equals(crSpec[z][counter], MINIMUM)) { |
|
|
|
// Add preferred/minimum width
|
|
|
|
// Add preferred/minimum width
|
|
|
|
totalSize += crPrefMin[counter]; |
|
|
|
totalSize += crPrefMin[counter]; |
|
|
|
} |
|
|
|
} |
|
|
|