From e66324d3fb9da3c352ad5c5fa8caf43df4f0fdae Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Thu, 3 Nov 2022 21:30:55 +0400 Subject: [PATCH 1/4] Create my new branch. --- Project/.idea/misc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project/.idea/misc.xml b/Project/.idea/misc.xml index 1ce6e7f..e2ca0b8 100644 --- a/Project/.idea/misc.xml +++ b/Project/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file -- 2.25.1 From 4b8ad33fb5e9c7a3bb3d0c92a6e67e7fc5864af2 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Thu, 3 Nov 2022 22:02:58 +0400 Subject: [PATCH 2/4] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B2=D1=81=D0=B5=D1=85=20=D0=BA=D0=BB?= =?UTF-8?q?=D0=B0=D1=81=D1=81=D0=BE=D0=B2=20=D0=B8=20=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project/.idea/uiDesigner.xml | 124 ++++++++++++++++++ Project/src/Additional_Enum.java | 16 +++ Project/src/Direction.java | 17 +++ Project/src/DrawingAirplaneWindow.java | 55 ++++++++ Project/src/DrawingPlane.java | 172 +++++++++++++++++++++++++ Project/src/EntityPlane.java | 31 +++++ Project/src/FormAirbus.form | 111 ++++++++++++++++ Project/src/FormAirbus.java | 120 +++++++++++++++++ Project/src/Main.java | 13 ++ Project/src/resourses/Down.png | Bin 0 -> 1152 bytes Project/src/resourses/Left.png | Bin 0 -> 1195 bytes Project/src/resourses/Right.png | Bin 0 -> 1250 bytes Project/src/resourses/Up.png | Bin 0 -> 1150 bytes 13 files changed, 659 insertions(+) create mode 100644 Project/.idea/uiDesigner.xml create mode 100644 Project/src/Additional_Enum.java create mode 100644 Project/src/Direction.java create mode 100644 Project/src/DrawingAirplaneWindow.java create mode 100644 Project/src/DrawingPlane.java create mode 100644 Project/src/EntityPlane.java create mode 100644 Project/src/FormAirbus.form create mode 100644 Project/src/FormAirbus.java create mode 100644 Project/src/Main.java create mode 100644 Project/src/resourses/Down.png create mode 100644 Project/src/resourses/Left.png create mode 100644 Project/src/resourses/Right.png create mode 100644 Project/src/resourses/Up.png diff --git a/Project/.idea/uiDesigner.xml b/Project/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/Project/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project/src/Additional_Enum.java b/Project/src/Additional_Enum.java new file mode 100644 index 0000000..7795957 --- /dev/null +++ b/Project/src/Additional_Enum.java @@ -0,0 +1,16 @@ +public enum Additional_Enum { + One(1), + Two(2), + Three(3); + + private final int addEnum; + + Additional_Enum(int i) + { + this.addEnum = i; + } + + public int GetAddEnum(){ + return addEnum; + } +} diff --git a/Project/src/Direction.java b/Project/src/Direction.java new file mode 100644 index 0000000..6716191 --- /dev/null +++ b/Project/src/Direction.java @@ -0,0 +1,17 @@ +public enum Direction { + Up(1), + Down(2), + Left(3), + Right(4); + + private final int DirectionCode; + + private Direction(int directionCode) + { + this.DirectionCode = directionCode; + } + + public int GetDirect(){ + return DirectionCode; + } +} diff --git a/Project/src/DrawingAirplaneWindow.java b/Project/src/DrawingAirplaneWindow.java new file mode 100644 index 0000000..ec6a8ab --- /dev/null +++ b/Project/src/DrawingAirplaneWindow.java @@ -0,0 +1,55 @@ +import javax.swing.*; +import java.awt.*; + +public class DrawingAirplaneWindow extends JComponent +{ + private Additional_Enum _airplaneWindowEnum; + + public void SetAddEnum(int decksAmount) { + for(Additional_Enum item : _airplaneWindowEnum.values()) + { + if(item.GetAddEnum() == decksAmount) + { + _airplaneWindowEnum = item; + return; + } + } + } + + public void DrawAirplaneWindow(Color colorWindow, Graphics g, float _startPosX, float _startPosY) + { + super.paintComponent(g); + Graphics2D g2d = (Graphics2D) g; + + switch(_airplaneWindowEnum.GetAddEnum()) + { + case 1: + g2d.setPaint(colorWindow); + g2d.fillOval((int)_startPosX + 9, (int)_startPosY + 11, 6, 4); + + g2d.setPaint(Color.BLACK); + g2d.drawOval((int)_startPosX + 9, (int)_startPosY + 11, 6, 4); + break; + case 2: + g2d.setPaint(colorWindow); + g2d.fillOval((int)_startPosX + 9, (int)_startPosY + 11, 6, 4); + g2d.fillOval((int)_startPosX + 18, (int)_startPosY + 11, 6, 4); + + g2d.setPaint(Color.BLACK); + g2d.drawOval((int)_startPosX + 9, (int)_startPosY + 11, 6, 4); + g2d.drawOval((int)_startPosX + 18, (int)_startPosY + 11, 6, 4); + break; + case 3: + g2d.setPaint(colorWindow); + g2d.fillOval((int)_startPosX + 9, (int)_startPosY + 11, 6, 4); + g2d.fillOval((int)_startPosX + 18, (int)_startPosY + 11, 6, 4); + g2d.fillOval((int)_startPosX + 27, (int)_startPosY + 11, 6, 4); + + g2d.setPaint(Color.BLACK); + g2d.drawOval((int)_startPosX + 9, (int)_startPosY + 11, 6, 4); + g2d.drawOval((int)_startPosX + 18, (int)_startPosY + 11, 6, 4); + g2d.drawOval((int)_startPosX + 27, (int)_startPosY + 11, 6, 4); + break; + } + } +} \ No newline at end of file diff --git a/Project/src/DrawingPlane.java b/Project/src/DrawingPlane.java new file mode 100644 index 0000000..30157bf --- /dev/null +++ b/Project/src/DrawingPlane.java @@ -0,0 +1,172 @@ +import java.awt.*; +import java.awt.Color; +import java.util.Random; + +public class DrawingPlane +{ + public EntityPlane Airbus; //класс-сущность + public DrawingAirplaneWindow _airplaneWindow; //для дополнительной отрисовки + + private float _startPosX; //левая координата отрисовки + private float _startPosY; //верхняя координата отрисовки + private Integer _pictureWidth = null; //ширина окна отрисовки + private Integer _pictureHeight = null; //высота окна отрисовки + protected final int _airbusWidth = 50; //ширина отрисовки самолёта + protected final int _airbusHeight = 16; //высота отрисовки самолёта + + //инициализаци свойств + public void Initial(int speed, float weight, Color corpusColor) + { + Airbus = new EntityPlane(); + Airbus.Initial(speed, weight, corpusColor); + _airplaneWindow = new DrawingAirplaneWindow(); + + SetAddEnum(); + } + + //установка кол-ва иллюминаторов + public void SetAddEnum() + { + Random rnd = new Random(); + int countWindow = rnd.nextInt(1, 4); + _airplaneWindow.SetAddEnum(countWindow); + } + + public EntityPlane GetPlane() + { + return Airbus; + } + + //установка координат позиции самолёта + public void SetPosition(int x, int y, int width, int height) + { + if (x < 0 || y < 0 || width <= x + _airbusWidth || height <= y + _airbusHeight) + { + _pictureHeight = null; + _pictureWidth = null; + + return; + } + + _startPosX = x; + _startPosY = y; + _pictureWidth = width; + _pictureHeight = height; + } + + //изменение направления движения + public void MoveTransport(Direction direction) + { + if (GetPlane() == null) + { + return; + } + + switch (direction) + { + case Right: //вправо + if (_startPosX + _airbusWidth + Airbus.GetStep() < _pictureWidth) + { + _startPosX += Airbus.GetStep(); + } + break; + + case Left: //влево + if (_startPosX - _airbusWidth - Airbus.GetStep() > 0) + { + _startPosX -= Airbus.GetStep(); + } + break; + + case Up: //вверх + if (_startPosY - _airbusHeight - Airbus.GetStep() > 0) + { + _startPosY -= Airbus.GetStep(); + } + break; + + case Down: //вниз + if (_startPosY + _airbusHeight + Airbus.GetStep() < _pictureHeight) + { + _startPosY += Airbus.GetStep(); + } + break; + } + } + + public void DrawTransport(Graphics g) + { + if (_startPosX < 0 || _startPosY < 0 || _pictureHeight == null || _pictureWidth == null) + { + return; + } + + if(GetPlane() == null){ + return; + } + + Graphics2D g2d = (Graphics2D)g; + + g2d.setColor(Color.WHITE); + g2d.fillRect(0, 0, _pictureWidth, _pictureHeight); + + //заливает фигуру + g2d.setPaint(Color.BLACK); + + //крыло + g2d.fillRect((int)_startPosX + 10, (int)_startPosY + 15, 20, 2); + g2d.fillRect((int)_startPosX + 12, (int)_startPosY + 17, 16, 2); + + //заднее поперечное крыло + g2d.fillOval((int)_startPosX - 3, (int)_startPosY + 7, 10, 5); + + //задние шасси + g2d.fillRect((int)_startPosX + 10, (int)_startPosY + 21, 2, 2); + g2d.fillRect((int)_startPosX + 12, (int)_startPosY + 23, 4, 4); + g2d.fillRect((int)_startPosX + 8, (int)_startPosY + 23, 2, 4); + + //переднее шасси + g2d.fillRect((int)_startPosX + 35, (int)_startPosY + 21, 2, 2); + g2d.fillRect((int)_startPosX + 35, (int)_startPosY + 23, 4, 4); + + g2d.setColor(Color.BLACK); //рисует контур + //корпус + g2d.drawRect((int)_startPosX, (int)_startPosY + 10, 40, 10); + + //хвостовое крыло + g2d.drawLine((int)_startPosX, (int)_startPosY + 10, (int)_startPosX, (int)_startPosY); + g2d.drawLine((int)_startPosX, (int)_startPosY, (int)_startPosX + 10, (int)_startPosY + 10); + + //нос самолёта + g2d.drawLine((int)_startPosX + 40, (int)_startPosY + 15, (int)_startPosX + 50, (int)_startPosY + 16); + g2d.drawLine((int)_startPosX + 40, (int)_startPosY + 10, (int)_startPosX + 47, (int)_startPosY + 15); + g2d.drawLine((int)_startPosX + 40, (int)_startPosY + 20, (int)_startPosX + 50, (int)_startPosY + 15); + + //отрисовка иллюминаторов + _airplaneWindow.DrawAirplaneWindow(Airbus.GetColor(), g, _startPosX, _startPosY); + } + + //смена границ формы отрисовки + public void ChangeBorders(int width, int height) + { + _pictureWidth = width; + _pictureHeight = height; + + if (_pictureWidth <= _airbusWidth || _pictureHeight <= _airbusHeight) + { + _pictureWidth = null; + _pictureHeight = null; + return; + } + + if (_startPosX + _airbusWidth > _pictureWidth) + { + _startPosX = _pictureWidth - _airbusWidth; + } + + if (_startPosY + _airbusHeight > _pictureHeight) + { + _startPosY = _pictureHeight - _airbusHeight; + } + } +} \ No newline at end of file diff --git a/Project/src/EntityPlane.java b/Project/src/EntityPlane.java new file mode 100644 index 0000000..38df649 --- /dev/null +++ b/Project/src/EntityPlane.java @@ -0,0 +1,31 @@ +import java.awt.*; + +public class EntityPlane +{ + public int Speed; //скорость + public int GetSpeed(){ + return Speed; + } + + public float Weight; //вес + public float GetWeight(){ + return Weight; + } + + public Color CorpusColor; //цвет корпуса + public Color GetColor(){ + return CorpusColor; + } + + //шаг перемещения самолёта + public float GetStep(){ + return Speed * 100 / Weight; + } + + public void Initial(int speed, float weight, Color corpusColor) + { + Speed = speed; + Weight = weight; + CorpusColor = corpusColor; + } +} \ No newline at end of file diff --git a/Project/src/FormAirbus.form b/Project/src/FormAirbus.form new file mode 100644 index 0000000..b34deed --- /dev/null +++ b/Project/src/FormAirbus.form @@ -0,0 +1,111 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Project/src/FormAirbus.java b/Project/src/FormAirbus.java new file mode 100644 index 0000000..3fbd8c3 --- /dev/null +++ b/Project/src/FormAirbus.java @@ -0,0 +1,120 @@ +import javax.imageio.ImageIO; +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; +import java.util.Random; + +public class FormAirbus +{ + protected DrawingPlane plane = new DrawingPlane(); + + public JPanel MainPanel; + private JButton ButtonCreate; + private JButton ButtonLeft; + private JButton ButtonDown; + private JButton ButtonRight; + private JButton ButtonUp; + private JToolBar StatusStrip; + private JPanel PictureBox; + private JLabel LabelSpeed = new JLabel(); + private JLabel LabelWeight = new JLabel(); + private JLabel LabelColor = new JLabel(); + + public FormAirbus() + { + //создание строки отображения скорости, веса и цвета объекта + Box LableBox = Box.createHorizontalBox(); + LableBox.setMinimumSize(new Dimension(1, 20)); + LableBox.add(LabelSpeed); + LableBox.add(LabelWeight); + LableBox.add(LabelColor); + StatusStrip.add(LableBox); + + try + { + Image img = ImageIO.read(getClass().getResource("resourses/Up.png")); + ButtonUp.setIcon(new ImageIcon(img)); + img = ImageIO.read(getClass().getResource("resourses/Left.png")); + ButtonLeft.setIcon(new ImageIcon(img)); + img = ImageIO.read(getClass().getResource("resourses/Down.png")); + ButtonDown.setIcon(new ImageIcon(img)); + img = ImageIO.read(getClass().getResource("resourses/Right.png")); + ButtonRight.setIcon(new ImageIcon(img)); + } catch (Exception ex){ + System.out.println(ex.getMessage()); + } + + + ButtonCreate.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + plane = new DrawingPlane(); + Random rnd = new Random(); + plane.Initial(rnd.nextInt(100, 300), rnd.nextInt(1000, 2000), + new Color(rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256))); + plane.SetPosition(rnd.nextInt(10, 100), rnd.nextInt(10, 100), + PictureBox.getWidth(), PictureBox.getHeight()); + LabelSpeed.setText("Скорость: " + plane.GetPlane().GetSpeed() + " "); + LabelWeight.setText("Вес: " + plane.GetPlane().GetWeight() + " "); + LabelColor.setText("Цвет: r = " + plane.GetPlane().GetColor().getRed() + " g = " + plane.GetPlane().GetColor().getGreen() + + " b = " + plane.GetPlane().GetColor().getBlue()); + Draw(); + } + }); + + //обновление размеров формы + MainPanel.addComponentListener(new ComponentAdapter() { + @Override + public void componentResized(ComponentEvent e) { + super.componentResized(e); + plane.ChangeBorders(PictureBox.getWidth(), PictureBox.getHeight()); + Draw(); + } + }); + + ButtonUp.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + plane.MoveTransport(Direction.Up); + Draw(); + } + }); + + ButtonLeft.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + plane.MoveTransport(Direction.Left); + Draw(); + } + }); + + ButtonDown.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + plane.MoveTransport(Direction.Down); + Draw(); + } + }); + + ButtonRight.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + plane.MoveTransport(Direction.Right); + Draw(); + } + }); + } + + public void Draw() + { + if(plane.GetPlane() == null) + { + return; + } + + plane.DrawTransport(PictureBox.getGraphics()); + } +} \ No newline at end of file diff --git a/Project/src/Main.java b/Project/src/Main.java new file mode 100644 index 0000000..1d1f21a --- /dev/null +++ b/Project/src/Main.java @@ -0,0 +1,13 @@ +import javax.swing.*; + +public class Main { + public static void main(String[] args) { + JFrame frame = new JFrame("Airbus"); + frame.setContentPane(new FormAirbus().MainPanel); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setLocation(500, 200); + frame.pack(); + frame.setSize(1000, 500); + frame.setVisible(true); + } +} \ No newline at end of file diff --git a/Project/src/resourses/Down.png b/Project/src/resourses/Down.png new file mode 100644 index 0000000000000000000000000000000000000000..d80a2d8aaf24354e63e9cb26373e73a14574a61d GIT binary patch literal 1152 zcmV-`1b_R9P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!Td_FIB zQrO?$r(7;aH#avu^QKZM_Y7iycIZX+{PdjY8Jr0?$T8oTpytrk z)s_3)VOcnV8(m&r$^}r$m4-`_$(f6;a*amA0XHECY? zoPNH7zaronjR9X&Uf8k!4S@%NFk6F-jEvBFd7W&_rtRHrQ5VU8uo&@qiT(mw5=*8| SC`fex0000G5 literal 0 HcmV?d00001 diff --git a/Project/src/resourses/Left.png b/Project/src/resourses/Left.png new file mode 100644 index 0000000000000000000000000000000000000000..4823dd92e4931f78d0f965f99f264fa5f76ded03 GIT binary patch literal 1195 zcmV;c1XTNpP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T!|#2^QM0!Y@^fZM55^Rdi+SU*|gs%ip&~~h8f8E zI3F1qk?HAaSzTR~wY4?b*w~Q${rw~c$hIls*?ybZ3g^Iu75Pwhamzn1%jV{$blRPy z4ajR##=Q-In?OcEC8KZ-!cm&Da{S9k<;pNPD8;^l`jIw^sKkMKe zgblKtAZ}`EN|qliOY5JO$gVnmp^-I7#qc&B1A}8_{aT&h_&)*>H#0LMi}x30>!W6_ zZEhmni>VD`TuC4WoFEuw?*tCK&V!J-#}6LM_NVO&agMl2Dn=N05cf8YrjLk9GJ{jM ztEo`H0i62L(a|___ZH>#$Jdv|DLi->gF24^$KY65zm{n$^??%&yc0Npr!x0%PUbQQ zV|d&w59_krq5Z}WJZi%c0UuG7%sEDyaa-Q*iHQjr8yl1H@p0n}5RSny=aZ9@sW$vl zXA3o=5QB2W!F}rCh$C}@#K{Yh=ey5k{r7cSsIP)v)RWtHZ%bouZ%=hy2y>yHSw>Cf zs!Xf=t@f*0>cRO6Fw?|1(PEK6rj?Xe%G|et3e9~6UEI?BrQwO|!zKe!z^4{*wnKc< z9b$;$fUSd@ zQ|xc>{EzeX6Uh{_Nb8A4-t4}Sh3^+cu3KVj16!!sO%4warS+~Q4{toIl}I}*u*IF9 zpIat(c6Vx($<)b>OzOfNXYyt}GMO9}!ef_Z@`Gmb*6=f#92Nj48p=r~-?!w^tw%!@ zY0n^;Lzo}CJd=D^Y`@>Go=J}Ud^3F)*jNtFtIP5UHAUr*Ci^b=tluSjal>5bN7J(p z&*bGFFKt!u7(Qsg%LsTeK~cXP_wW30M;aWr%(DbEM5OLGvh#VTSmZAv>w3NV>y@0H zo%Jif9tf@U?-rv>rhC8=bl#0KLzpT<%-a@Y zmsE@}?jY`M9I3B5-Xxshz~8*=n^w3js=EgdV^9~yz~ER}zm{nV9uz0aAqQR;a>_i^ zWODw-yvR>_<0d!FB^ATtW_ehbPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!TEt3ANA;HJd&s+73o*CM*p1dK7IakX3mUq&1SQu5GT zD=RB2vbwq|Yinz=x3?!}XJ_WqE62C=8@?4d0(Xo#=E?jVNb}}SQ`XnlrSfA%W@cuR zIL`qF+H5Sv)?M=HZ9hXSH`CFTcE$%I%6wPfwel`}pse13#C}sl|pG;}PK$ zj|hWfw83eMV}K<0z-ZKHgVPqr08iQlS8}0SNssB*uW`OWKSvCX zdGf3RC8ItAN`CGr>3KoFevMB|OvvQqq>PV`+mS^*H8o|NHaG^yXoJ%h$ADs?Xva*n zl`Jom?VjmtFfO#Kur|+aZ*R9g{P`hq!f;40=F`(tI~Iz%nDyg}*<&d3@lTKC`NDIN z-_11}mqf}}%d+)$OLlj6El;n0;Y>@Mbt?Ktxo8r+c zP>a(m*^1K}_lOmUa<_wWT){g#JFU@KgL5L)8&%nOy^(BrTIY!DBwAeMMnyJXZ(4Ew z&G#ags?>~m8hxlR%mrn;l`JO(!sXh7m zi9DNs*8ioctsKRD(@WFw@v(Jbgy*leqmRnB8v+6C_&N6&{2ttYAWw5oMSiuWi)bsy z%M!{Z)7YoL{K3J293CEu7HUV<1Lxov9CJ=$_|ef(R}45i_djMb&{odhym`9~B632XMhbIR?l2b~3H}kt#Ra*;^^jb9jvB zu$U-Ex?l6-3vd#^F*r7edkiSem1KE&SvI!A-s%g!R}K*8xagCUugUhFBWXx|M*si- M07*qoM6N<$g23@r1ONa4 literal 0 HcmV?d00001 diff --git a/Project/src/resourses/Up.png b/Project/src/resourses/Up.png new file mode 100644 index 0000000000000000000000000000000000000000..6b987e6ae331bc1ae3e5297d77dc7d1a79e81828 GIT binary patch literal 1150 zcmV-^1cCdBP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGmbN~PnbOGLGA9w%&1QSU_K~z{r%~#7# z+dve(cETnQ7L}j~sp3@@RV4xmL}G*b7yLkfB45y-=oj!6AX*`XgaF&Zjty_}fU1JT zz2`dDIHULhaT|`A*mqv%%<;^4u$s-LLyS(RgB#hlEqBLpBw3av2{7wuoJyr=baa$9 ziW_97Y}(%2riX_IYPZ|c2Vk}dicMb0RRP*roES+vg1G!bo_23{Y3FK())v<&lgS8a zzdp2`KMyctz^d2l5(SOGi~${WI-M3Fx!D{Y-yRdyC7WoRC_j;>>S>kk@9(9)lE!sT zV=2|f{sN5w&GW~2hB!FaBMxW~9b6vJ>f)-nYdYDF$BY%;9MlSC2mN9Yf_Qm$nT~Fc zdd2wxCnwp-lVB&qc!Ud;`W0wnK=U-#ITtDpfRh*O?>bEuqgSUU4># zgXm;zY>ZasR_O5N@MYrsfRpdp$zK&}wOT!|G6=Rg0*wKUAud0kA50toC(o<$7SJc0 z4B`bO4-aA`2S|9SG%qaCQiX3YnQd2&D`WgtgxXLpCn}Jh!CTpyw>@Z(AEpiLZ9#i)d5h?50@*LpqRYYjqxlYlx2aK7!WDs?WK&B|7ixN|1d zNj5^A1k_1rac5;0$awWu@>;;jt7j+u^G|@o!rk4S!y70&>o~cYoWt7z&)ENbWy#@f zOf*0Xwm&(@;0FP~3t~9p^kR|xSrje2Pr3r}04&Wc4Og6AERyG>Xo5DZ7-!`ZJ2&I2 zH0+DD6h0S3q*W{yopQNMRN@JF&8gpa9C_=UzDhJWzH{2+)U!mpz!vz9(>JDEUni?n zDml$YlTyFAgts53Qm5dcFrwqh=(w6w~@lpOmOB&5qQ#Rxv zUfhuv`#hL5_-GQzi@aC@_0y9yz!fPF52%Dd8z5-~z_Q&qX+-e?EY>|NAQMiZk{)-| zxpd0?h$jiG6?HC%7vmXF7D*H@Ftl$m=3o>r^5UOno~Om&==KG!NP%VrjR9>S z9lBY`fcxq=E>{?@oH Qwg3PC07*qoM6N<$g6Q25ZU6uP literal 0 HcmV?d00001 -- 2.25.1 From ea386783b3469556d85e963e15a8be3ceeee6ca4 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Thu, 3 Nov 2022 22:10:35 +0400 Subject: [PATCH 3/4] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B2=D1=81=D0=B5=D1=85=20=D0=BA=D0=BB?= =?UTF-8?q?=D0=B0=D1=81=D1=81=D0=BE=D0=B2=20=D0=B8=20=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project/.idea/misc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project/.idea/misc.xml b/Project/.idea/misc.xml index e2ca0b8..1ce6e7f 100644 --- a/Project/.idea/misc.xml +++ b/Project/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file -- 2.25.1 From 20701bee8ea51a5c5e85617dd8952f318145f013 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Sat, 5 Nov 2022 20:52:21 +0400 Subject: [PATCH 4/4] =?UTF-8?q?=D0=A3=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D1=85=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B9?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project/.idea/uiDesigner.xml | 12 ++--- Project/src/.idea/workspace.xml | 49 +++++++++++++++++++ .../src/{FormAirbus.form => FormPlane.form} | 2 +- .../src/{FormAirbus.java => FormPlane.java} | 4 +- Project/src/Main.java | 2 +- 5 files changed, 59 insertions(+), 10 deletions(-) create mode 100644 Project/src/.idea/workspace.xml rename Project/src/{FormAirbus.form => FormPlane.form} (99%) rename Project/src/{FormAirbus.java => FormPlane.java} (98%) diff --git a/Project/.idea/uiDesigner.xml b/Project/.idea/uiDesigner.xml index e96534f..013f18e 100644 --- a/Project/.idea/uiDesigner.xml +++ b/Project/.idea/uiDesigner.xml @@ -14,18 +14,18 @@ - - - - - - + + + + + + diff --git a/Project/src/.idea/workspace.xml b/Project/src/.idea/workspace.xml new file mode 100644 index 0000000..f0b5579 --- /dev/null +++ b/Project/src/.idea/workspace.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1667501112705 + + + + \ No newline at end of file diff --git a/Project/src/FormAirbus.form b/Project/src/FormPlane.form similarity index 99% rename from Project/src/FormAirbus.form rename to Project/src/FormPlane.form index b34deed..93521e4 100644 --- a/Project/src/FormAirbus.form +++ b/Project/src/FormPlane.form @@ -1,5 +1,5 @@ -
+ diff --git a/Project/src/FormAirbus.java b/Project/src/FormPlane.java similarity index 98% rename from Project/src/FormAirbus.java rename to Project/src/FormPlane.java index 3fbd8c3..28e1fce 100644 --- a/Project/src/FormAirbus.java +++ b/Project/src/FormPlane.java @@ -7,7 +7,7 @@ import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import java.util.Random; -public class FormAirbus +public class FormPlane { protected DrawingPlane plane = new DrawingPlane(); @@ -23,7 +23,7 @@ public class FormAirbus private JLabel LabelWeight = new JLabel(); private JLabel LabelColor = new JLabel(); - public FormAirbus() + public FormPlane() { //создание строки отображения скорости, веса и цвета объекта Box LableBox = Box.createHorizontalBox(); diff --git a/Project/src/Main.java b/Project/src/Main.java index 1d1f21a..9a6fc91 100644 --- a/Project/src/Main.java +++ b/Project/src/Main.java @@ -3,7 +3,7 @@ import javax.swing.*; public class Main { public static void main(String[] args) { JFrame frame = new JFrame("Airbus"); - frame.setContentPane(new FormAirbus().MainPanel); + frame.setContentPane(new FormPlane().MainPanel); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocation(500, 200); frame.pack(); -- 2.25.1