From 4d1afeaa068556bb5d93c36dbdf985f380b1ab6a Mon Sep 17 00:00:00 2001 From: DjonniStorm Date: Sun, 9 Jun 2024 14:17:18 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=20=E2=84=965=20(=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D0=BE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/FormCleaningCarCollection.form | 2 +- .../src/FormCleaningCarCollection.java | 1 - ProjectCleaningCar/src/FormTruckConfig.form | 275 ++++++++++++++++++ ProjectCleaningCar/src/FormTruckConfig.java | 70 +++++ ProjectCleaningCar/src/Main.java | 6 +- 5 files changed, 350 insertions(+), 4 deletions(-) create mode 100644 ProjectCleaningCar/src/FormTruckConfig.form create mode 100644 ProjectCleaningCar/src/FormTruckConfig.java diff --git a/ProjectCleaningCar/src/FormCleaningCarCollection.form b/ProjectCleaningCar/src/FormCleaningCarCollection.form index 1e585e4..19fb152 100644 --- a/ProjectCleaningCar/src/FormCleaningCarCollection.form +++ b/ProjectCleaningCar/src/FormCleaningCarCollection.form @@ -14,7 +14,7 @@ - + diff --git a/ProjectCleaningCar/src/FormCleaningCarCollection.java b/ProjectCleaningCar/src/FormCleaningCarCollection.java index 4f04f2d..036a7ed 100644 --- a/ProjectCleaningCar/src/FormCleaningCarCollection.java +++ b/ProjectCleaningCar/src/FormCleaningCarCollection.java @@ -53,7 +53,6 @@ public class FormCleaningCarCollection extends JFrame{ _resurrected = new LinkedList<>(); tools.setBackground(new Color(220, 220, 220)); - tools.setBorder(BorderFactory.createTitledBorder("Инструменты")); comboBoxSelectorCompany.addItem(new String("")); comboBoxSelectorCompany.addItem(new String("Автопарк")); //mask diff --git a/ProjectCleaningCar/src/FormTruckConfig.form b/ProjectCleaningCar/src/FormTruckConfig.form new file mode 100644 index 0000000..81a1c01 --- /dev/null +++ b/ProjectCleaningCar/src/FormTruckConfig.form @@ -0,0 +1,275 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/ProjectCleaningCar/src/FormTruckConfig.java b/ProjectCleaningCar/src/FormTruckConfig.java new file mode 100644 index 0000000..780c9e7 --- /dev/null +++ b/ProjectCleaningCar/src/FormTruckConfig.java @@ -0,0 +1,70 @@ +import Drawnings.DrawningTruck; + +import javax.swing.*; +import javax.swing.border.LineBorder; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionAdapter; +import java.util.ArrayList; + +public class FormTruckConfig extends JFrame { + private DrawningTruck _truck; + private JPanel panel; + private JPanel GroupBoxConfig; + private JLabel labelSimpleObject; + private JLabel labelModifiedObject; + private JLabel labelSpeed; + private JSpinner spinnerSpeed; + private JSpinner spinnerWeight; + private JLabel labelWeight; + private JCheckBox checkBoxTank; + private JCheckBox checkBoxSweepingBrush; + private JCheckBox CheckBoxFlashLight; + private JPanel groupBoxColors; + private JPanel panelRed; + private JPanel panelGreen; + private JPanel panelBlue; + private JPanel panelYellow; + private JPanel panelWhite; + private JPanel panelGray; + private JPanel panelBlack; + private JPanel panelPurple; + private JPanel panelRight; + private JButton buttonAdd; + private JButton buttonCancel; + private JPanel panelObject; + + public FormTruckConfig() { + setTitle("Создание объекта"); + add(panel); + setMinimumSize(new Dimension(900, 300)); + setDefaultCloseOperation(EXIT_ON_CLOSE); + Init(); + } + protected void Init() { + labelSimpleObject.setBorder(new LineBorder(Color.BLACK)); + labelModifiedObject.setBorder(new LineBorder(Color.BLACK)); + spinnerSpeed.setModel(new SpinnerNumberModel(0, 0, 1000, 1)); + spinnerWeight.setModel(new SpinnerNumberModel(0, 0, 1000, 1)); + +// ArrayList labelObject = new ArrayList<>(); +// labelObject.add(labelSimpleObject); +// labelObject.add(labelModifiedObject); + + MouseAdapter labelObject_MouseDown = new MouseAdapter() { + @Override + public void mousePressed(MouseEvent e) { + super.mousePressed(e); + + } + }; + MouseMotionAdapter mouseMotionAdapter = new MouseMotionAdapter() { + @Override + public void mouseDragged(MouseEvent e) { + super.mouseDragged(e); + } + }; + } +} diff --git a/ProjectCleaningCar/src/Main.java b/ProjectCleaningCar/src/Main.java index aff5e87..bede85e 100644 --- a/ProjectCleaningCar/src/Main.java +++ b/ProjectCleaningCar/src/Main.java @@ -1,7 +1,9 @@ class Main { public static void main(String[] args) { - FormCleaningCarCollection form = new FormCleaningCarCollection(); - form.setVisible(true); + //FormCleaningCarCollection form = new FormCleaningCarCollection(); + //form.setVisible(true); + FormTruckConfig config = new FormTruckConfig(); + config.setVisible(true); } } \ No newline at end of file