Clear
This commit is contained in:
parent
1386d8fc70
commit
ec7ccdbf32
@ -1,17 +1,7 @@
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.Random;
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Alena
|
||||
*/
|
||||
public class ArmoredVehicleEntity {
|
||||
class ArmoredVehicleEntity {
|
||||
/// <summary>
|
||||
/// Скорость
|
||||
/// </summary>
|
||||
|
@ -1,12 +1,4 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Alena
|
||||
*/
|
||||
public enum CountRollers {
|
||||
Four,
|
||||
Five,
|
||||
|
@ -1,12 +1,4 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Alena
|
||||
*/
|
||||
public enum Direction {
|
||||
|
||||
Up,
|
||||
|
@ -5,15 +5,6 @@ import java.awt.Graphics2D;
|
||||
import java.util.Random;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Alena
|
||||
*/
|
||||
public class DrawingArmoredVehicle extends JPanel{
|
||||
|
||||
/// <summary>
|
||||
@ -170,7 +161,6 @@ public class DrawingArmoredVehicle extends JPanel{
|
||||
|
||||
|
||||
//контур
|
||||
//g.setColor(Color.BLACK);
|
||||
g.drawRect((int)_startPosX + 50, (int)_startPosY, 100, 20);
|
||||
g.drawRect((int)_startPosX + 15, (int)_startPosY+20, 200, 20);
|
||||
g.drawOval((int)_startPosX + 15, (int)_startPosY + 25, 200, 35);
|
||||
|
@ -91,9 +91,6 @@
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[30, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[30, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="UpButtonMouseClicked"/>
|
||||
@ -115,9 +112,6 @@
|
||||
<Dimension value="[30, 30]"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="LeftButton" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[30, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="LeftButtonMouseClicked"/>
|
||||
@ -136,9 +130,6 @@
|
||||
<Dimension value="[30, 30]"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="LeftButton" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[30, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="DownButtonMouseClicked"/>
|
||||
@ -157,9 +148,6 @@
|
||||
<Dimension value="[30, 30]"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="RightButton" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[30, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="RightButtonMouseClicked"/>
|
||||
|
@ -1,14 +1,9 @@
|
||||
|
||||
import java.awt.Button;
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Image;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Random;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
|
||||
public class MainForm extends javax.swing.JFrame {
|
||||
|
||||
@ -175,7 +170,6 @@ public class MainForm extends javax.swing.JFrame {
|
||||
|
||||
public void Move(String name)
|
||||
{
|
||||
//PropertyText.setText(name);
|
||||
switch (name)
|
||||
{
|
||||
case "UpButton" -> _ArmoredVehicle.MoveTransport(Direction.Up);
|
||||
@ -202,11 +196,8 @@ public class MainForm extends javax.swing.JFrame {
|
||||
Move("DownButton");
|
||||
}//GEN-LAST:event_DownButtonMouseClicked
|
||||
|
||||
/**
|
||||
* @param args the command line arguments
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
/* Set the Nimbus look and feel */
|
||||
|
||||
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
|
||||
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
|
||||
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
|
||||
@ -229,7 +220,6 @@ public class MainForm extends javax.swing.JFrame {
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
/* Create and display the form */
|
||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
new MainForm().setVisible(true);
|
||||
|
@ -4,22 +4,13 @@ import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Alena
|
||||
*/
|
||||
public class Roller extends JPanel{
|
||||
/// <summary>
|
||||
/// Скорость
|
||||
/// Количество катоков
|
||||
/// </summary>
|
||||
public int _count;
|
||||
/// <summary>
|
||||
/// Вес
|
||||
/// Цвет
|
||||
/// </summary>
|
||||
private Color _color;
|
||||
/// <summary>
|
||||
@ -30,9 +21,13 @@ public class Roller extends JPanel{
|
||||
/// Верхняя кооридната отрисовки
|
||||
/// </summary>
|
||||
private float _startPosY;
|
||||
|
||||
/// <summary>
|
||||
/// Ширина поля под катки
|
||||
/// </summary>
|
||||
private float _Width;
|
||||
|
||||
/// <summary>
|
||||
/// Перечисление
|
||||
/// </summary>
|
||||
private CountRollers rolls;
|
||||
|
||||
public void Init(int Count, Color color, float startPosX, float startPosY, float Width)
|
||||
|
Loading…
Reference in New Issue
Block a user