Browse Source

Merge pull request #1310 in DESIGN/design from ~MAKSIM/design:feature/10.0 to feature/10.0

* commit '415280d96b188798e8bd5259db05943a08f1e430':
  sonar问题
research/11.0
Maksim 5 years ago
parent
commit
8a6082844c
  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 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 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 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)) { if (AssistUtils.equals(x, i)) {
w = (int) (Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M); w = (int) (Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M);
} else if (AssistUtils.equals(x, j)) { } 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 p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
JPanel jp1 = TableLayoutHelper.createTableLayoutPane(createTestComponents("jp1"), TableLayoutHelper.FILL_NONE); 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"), JPanel jp3 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp3"),
new double[]{f, p, f, p}, new double[]{f, f}, 4, 4); new double[]{f, p, f, p}, new double[]{f, f}, 4, 4);
JPanel jp4 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp4"), JPanel jp4 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp4"),

Loading…
Cancel
Save