Browse Source

sonar问题

research/11.0
Maksim 5 years ago
parent
commit
ea263f97dc
  1. 2
      designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java
  2. 3
      designer-base/src/main/java/com/fr/design/layout/TableLayoutHelper.java

2
designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java

@ -562,7 +562,7 @@ public class FRGUIPaneFactory {
double n = (double)(width + WIDTH_OFFSET_N ) / (double)WIDTH_PARA_F;
double i = Math.abs(((double) ((int) m + (int) (m + 1)) / WIDTHABS_PARA_F) - m);
double j = Math.abs(((double) ((int) n + (int) (n + 1)) / WIDTHABS_PARA_F) - n);
double x = i > j ? i : j;
double x = Math.max(i,j);
if (AssistUtils.equals(x, i)) {
w = (int) (Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M);
} else if (AssistUtils.equals(x, j)) {

3
designer-base/src/main/java/com/fr/design/layout/TableLayoutHelper.java

@ -372,7 +372,8 @@ public class TableLayoutHelper {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
JPanel jp1 = TableLayoutHelper.createTableLayoutPane(createTestComponents("jp1"), TableLayoutHelper.FILL_NONE);
JPanel jp2 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp2"), TableLayoutHelper.FILL_LASTCOL_AND_ROW, (double)2 * TEN, (double)2 * TEN);
JPanel jp2 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp2"),
TableLayoutHelper.FILL_LASTCOL_AND_ROW, (double)2 * TEN, (double)2 * TEN);
JPanel jp3 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp3"),
new double[]{f, p, f, p}, new double[]{f, f}, 4, 4);
JPanel jp4 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp4"),

Loading…
Cancel
Save