Browse Source

Merge remote-tracking branch 'origin/fbp/release' into fbp/release

fbp/merge
Destiny.Lin 4 months ago
parent
commit
51e5b80c59
  1. 10
      designer-base/src/main/java/com/fr/design/gui/frpane/UnitInputPane.java
  2. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java

10
designer-base/src/main/java/com/fr/design/gui/frpane/UnitInputPane.java

@ -24,6 +24,9 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.math.BigDecimal; import java.math.BigDecimal;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/** /**
* For input Number. * For input Number.
*/ */
@ -43,16 +46,13 @@ public abstract class UnitInputPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel centerPane = FRGUIPaneFactory.createTitledBorderPane(""); JPanel centerPane = FRGUIPaneFactory.createTitledBorderPane("");
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
centerPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 30)); centerPane.setLayout(new FlowLayout(FlowLayout.LEFT, 20, 30));
UILabel titleLabel = new UILabel(title + ":"); UILabel titleLabel = new UILabel(title + ":");
centerPane.add(titleLabel); centerPane.add(titleLabel);
// Denny:在对话框中加入JSpinner对象 // Denny:在对话框中加入JSpinner对象
numberFieldSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, MAX_NUM, 1)); numberFieldSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, MAX_NUM, 1));
GUICoreUtils.setColumnForSpinner(numberFieldSpinner, 24); GUICoreUtils.setColumnForSpinner(numberFieldSpinner, 24);
numberFieldSpinner.setPreferredSize(new Dimension(60, 20));
numberFieldSpinner.setMinimumSize(new Dimension(60, 20));
centerPane.add(numberFieldSpinner);
numberFieldSpinner.addChangeListener(new ChangeListener() { numberFieldSpinner.addChangeListener(new ChangeListener() {
@Override @Override
@ -64,7 +64,7 @@ public abstract class UnitInputPane extends BasicPane {
}); });
unitLabel = new UILabel(""); unitLabel = new UILabel("");
centerPane.add(unitLabel); centerPane.add(row(4, cell(numberFieldSpinner), cell(unitLabel)).getComponent());
} }
public void setUnitText(String unit) { public void setUnitText(String unit) {

9
designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java

@ -27,6 +27,9 @@ import java.awt.Component;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
public class VanChartBorderWithShapePane extends BasicPane { public class VanChartBorderWithShapePane extends BasicPane {
private static final int RECTANGULAR_INDEX = 0; private static final int RECTANGULAR_INDEX = 0;
private static final int DIALOG_INDEX = 1; private static final int DIALOG_INDEX = 1;
@ -68,8 +71,7 @@ public class VanChartBorderWithShapePane extends BasicPane {
detailPane = createDetailPane(); detailPane = createDetailPane();
this.add(createLineTypePane(), BorderLayout.CENTER); this.add(column(10, cell(createLineTypePane()), cell(detailPane)).getComponent());
this.add(detailPane, BorderLayout.SOUTH);
initLineTypeListener(); initLineTypeListener();
initLineColorListener(); initLineColorListener();
@ -137,8 +139,7 @@ public class VanChartBorderWithShapePane extends BasicPane {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.add(center, BorderLayout.CENTER); panel.add(column(10, cell(center), cell(south)).getComponent());
panel.add(south, BorderLayout.SOUTH);
return panel; return panel;
} }

Loading…
Cancel
Save