This commit is contained in:
Вячеслав Иванов 2023-11-18 22:58:46 +04:00
parent d781237090
commit 3aa54de00e

View File

@ -25,7 +25,7 @@ public class FormBusConfig {
Canvas canvas = new Canvas();
canvas.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));
canvas.setBounds(555, 65, _pictureBoxWidth, _pictureBoxHeight);
JLabel iDrawLabel = new JLabel("Орнамент");
JLabel iDrawLabel = new JLabel("Двери");
JLabel colorLabel = new JLabel("Цвет");
DrawningBus toGetSize = new DrawningBus(0,0, null, 0, 0);
IDrawComponent baseDoor = new IDrawComponent(new DrawningDoor(toGetSize._busWidth - toGetSize._busWidth / 10,
@ -74,10 +74,10 @@ public class FormBusConfig {
iDrawLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));
JCheckBox checkSecondFloor = new JCheckBox("Наличие 2 этажа");
JCheckBox checkLadder = new JCheckBox("Наличие лестницы");
JCheckBox checkLineBetweenFloor = new JCheckBox("Наличие разделительной линии");
JCheckBox checkLineBetweenFloor = new JCheckBox("Наличие разделителя");
checkSecondFloor.setBounds(6, 122, 159, 24);
checkLadder.setBounds(6, 152, 145, 24);
checkLineBetweenFloor.setBounds(6, 182, 131, 24);
checkLineBetweenFloor.setBounds(6, 182, 162, 24);
JLabel simpleLabel = new JLabel("Простой");
JLabel advancedLabel = new JLabel("Продвинутый");
simpleLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));
@ -97,15 +97,15 @@ public class FormBusConfig {
colorPanel.setBounds(171, 23, 234,143);
SpinnerNumberModel speedSpinnerModel = new SpinnerNumberModel(100.0, 100.0, 1000.0, 1.0);
SpinnerNumberModel weightSpinnerModel = new SpinnerNumberModel(100.0, 100.0, 1000.0, 1.0);
SpinnerNumberModel doorNumbSpinnerModel = new SpinnerNumberModel(2, 2, 4, 1.0);
JSpinner wheelNumbSpinner = new JSpinner(doorNumbSpinnerModel);
SpinnerNumberModel doorNumbSpinnerModel = new SpinnerNumberModel(3, 3, 5, 1.0);
JSpinner doorNumbSpinner = new JSpinner(doorNumbSpinnerModel);
JSpinner speedSpinner = new JSpinner(speedSpinnerModel);
JSpinner weightSpinner = new JSpinner(weightSpinnerModel);
speedSpinner.setBounds(6, 46, 150, 27);
speedLabel.setBounds(6, 23, 73, 20);
weightSpinner.setBounds(6, 99, 150, 27);
weightLabel.setBounds(6, 76, 33, 20);
wheelNumbSpinner.setBounds(6, 200, 150, 27);
doorNumbSpinner.setBounds(6, 220, 150, 27);
JPanel redPanel = new JPanel();
JPanel greenPanel = new JPanel();
@ -187,7 +187,7 @@ public class FormBusConfig {
frameConfig.add(canvas);
frameConfig.add(addButton);
frameConfig.add(cancelButton);
frameConfig.add(wheelNumbSpinner);
frameConfig.add(doorNumbSpinner);
frameConfig.setVisible(true);
frameConfig.add(colorPanel);
frameConfig.add(baseDoor);
@ -217,7 +217,7 @@ public class FormBusConfig {
Number weightNumb = (Number) weightObj;
int weight = weightNumb.intValue();
Object doorNumbObj = wheelNumbSpinner.getValue();
Object doorNumbObj = doorNumbSpinner.getValue();
Number doorNumb = (Number) doorNumbObj;
int doorsNumb = doorNumb.intValue();