Browse Source

修改图标-标签-边框布局&修改行高列宽弹窗布局

fbp/merge
renekton 4 months ago
parent
commit
af9e39299b
  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.math.BigDecimal;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* For input Number.
*/
@ -43,16 +46,13 @@ public abstract class UnitInputPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel centerPane = FRGUIPaneFactory.createTitledBorderPane("");
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 + ":");
centerPane.add(titleLabel);
// Denny:在对话框中加入JSpinner对象
numberFieldSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, MAX_NUM, 1));
GUICoreUtils.setColumnForSpinner(numberFieldSpinner, 24);
numberFieldSpinner.setPreferredSize(new Dimension(60, 20));
numberFieldSpinner.setMinimumSize(new Dimension(60, 20));
centerPane.add(numberFieldSpinner);
numberFieldSpinner.addChangeListener(new ChangeListener() {
@Override
@ -64,7 +64,7 @@ public abstract class UnitInputPane extends BasicPane {
});
unitLabel = new UILabel("");
centerPane.add(unitLabel);
centerPane.add(row(4, cell(numberFieldSpinner), cell(unitLabel)).getComponent());
}
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.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
public class VanChartBorderWithShapePane extends BasicPane {
private static final int RECTANGULAR_INDEX = 0;
private static final int DIALOG_INDEX = 1;
@ -68,8 +71,7 @@ public class VanChartBorderWithShapePane extends BasicPane {
detailPane = createDetailPane();
this.add(createLineTypePane(), BorderLayout.CENTER);
this.add(detailPane, BorderLayout.SOUTH);
this.add(column(10, cell(createLineTypePane()), cell(detailPane)).getComponent());
initLineTypeListener();
initLineColorListener();
@ -137,8 +139,7 @@ public class VanChartBorderWithShapePane extends BasicPane {
JPanel panel = new JPanel(new BorderLayout());
panel.add(center, BorderLayout.CENTER);
panel.add(south, BorderLayout.SOUTH);
panel.add(column(10, cell(center), cell(south)).getComponent());
return panel;
}

Loading…
Cancel
Save