PIbd - 21 Bakalskaya E.D. LabWork03 HARD #4
79
.gitignore
vendored
79
.gitignore
vendored
@ -1,3 +1,82 @@
|
||||
# ---> JetBrains
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
# ---> Java
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
65
ProjectElectricLocomotive/DopClassParameters.java
Normal file
65
ProjectElectricLocomotive/DopClassParameters.java
Normal file
@ -0,0 +1,65 @@
|
||||
package ProjectElectricLocomotive;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
public class DopClassParameters<T extends EntityLocomotive, U extends IDrawingWheels> {
|
||||
public T[] _entityLocomotive;
|
||||
public U[] _idrawningWheels;
|
||||
|
||||
int _locomotivesCount;
|
||||
int _idrawningWheelsCount;
|
||||
|
||||
private int _pictureWidth;
|
||||
private int _pictureHeight;
|
||||
|
||||
public DopClassParameters(int count, int width, int height) {
|
||||
_entityLocomotive = (T[]) new EntityLocomotive[count];
|
||||
_idrawningWheels = (U[]) new IDrawingWheels[count];
|
||||
_pictureWidth = width;
|
||||
_pictureHeight = height;
|
||||
_locomotivesCount = 0;
|
||||
_idrawningWheelsCount = 0;
|
||||
}
|
||||
|
||||
public void Add(T entityLocoObj) {
|
||||
if (_locomotivesCount < _entityLocomotive.length) {
|
||||
_entityLocomotive[_locomotivesCount] = entityLocoObj;
|
||||
_locomotivesCount++;
|
||||
}
|
||||
}
|
||||
|
||||
public void Add(U idrawingWheels) {
|
||||
if (_idrawningWheelsCount < _idrawningWheels.length) {
|
||||
_idrawningWheels[_idrawningWheelsCount] = idrawingWheels;
|
||||
_idrawningWheelsCount++;
|
||||
}
|
||||
}
|
||||
|
||||
public DrawingLocomotive RandomLocomotive(int pictureWidth, int pictureHeight) {
|
||||
Random rnd = new Random();
|
||||
if (_entityLocomotive == null || _idrawningWheels == null) {
|
||||
return null;
|
||||
}
|
||||
T entityLocomotive = _entityLocomotive[rnd.nextInt(_locomotivesCount)];
|
||||
U idrawingWheels = _idrawningWheels[rnd.nextInt(_idrawningWheelsCount)];
|
||||
|
||||
DrawingLocomotive drawLocomotive;
|
||||
if (entityLocomotive instanceof EntityElectricLocomotive) {
|
||||
drawLocomotive = new DrawingElectricLocomotive(
|
||||
(EntityElectricLocomotive) entityLocomotive,
|
||||
idrawingWheels,
|
||||
pictureWidth,
|
||||
pictureHeight
|
||||
);
|
||||
} else {
|
||||
drawLocomotive = new DrawingLocomotive(
|
||||
entityLocomotive,
|
||||
idrawingWheels,
|
||||
pictureWidth,
|
||||
pictureHeight
|
||||
);
|
||||
}
|
||||
return drawLocomotive;
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package ProjectElectricLocomotive;
|
||||
import java.awt.*;
|
||||
public class DrawingElectricLocomotive extends DrawingLocomotive {
|
||||
|
||||
public DrawingElectricLocomotive(int speed, double weight, Color bodyColor, Color additionalColor,
|
||||
boolean horns, boolean seifBatteries, int width, int height)
|
||||
{
|
||||
@ -10,16 +11,22 @@ public class DrawingElectricLocomotive extends DrawingLocomotive {
|
||||
EntityLocomotive = new EntityElectricLocomotive(speed, width, bodyColor, additionalColor, horns, seifBatteries);
|
||||
}
|
||||
}
|
||||
|
||||
public DrawingElectricLocomotive(EntityElectricLocomotive entityElectricLocomotive, IDrawingWheels iDrawingWheels,
|
||||
int width, int height)
|
||||
{
|
||||
super(entityElectricLocomotive,iDrawingWheels, width, height, 150, 50);
|
||||
}
|
||||
@Override
|
||||
public void DrawTransport(Graphics g)
|
||||
{
|
||||
if (EntityLocomotive instanceof EntityElectricLocomotive electricLocomotive) ///////// WARNING INSTANCEOF
|
||||
{
|
||||
Color colorBlack = Color.BLACK;
|
||||
Color addColor = electricLocomotive.AdditionalColor;
|
||||
|
||||
if (electricLocomotive.Horns) {
|
||||
//horns
|
||||
g.setColor(colorBlack);
|
||||
g.setColor(addColor);
|
||||
g.fillRect(_startPosX + 30, _startPosY + 15, 20, 5);
|
||||
g.drawLine(_startPosX + 40, _startPosY + 15, _startPosX + 50, _startPosY + 10);
|
||||
g.drawLine(_startPosX + 50, _startPosY + 10, _startPosX + 45, _startPosY);
|
||||
@ -28,7 +35,7 @@ public class DrawingElectricLocomotive extends DrawingLocomotive {
|
||||
}
|
||||
|
||||
if (electricLocomotive.SeifBatteries) {
|
||||
g.setColor(colorBlack);
|
||||
g.setColor(addColor);
|
||||
g.fillRect(_startPosX + 80, _startPosY + 30, 5, 10);
|
||||
}
|
||||
super.DrawTransport(g);
|
||||
|
@ -26,14 +26,14 @@ public class DrawingLocomotive {
|
||||
return _locoHeight;
|
||||
}
|
||||
|
||||
public DrawingLocomotive(int speed, double weight, Color bodyColor, int width, int heigth)
|
||||
public DrawingLocomotive(int speed, double weight, Color bodyColor, int width, int height)
|
||||
{
|
||||
if (width < _locoWidth || heigth < _locoHeight)
|
||||
if (width < _locoWidth || height < _locoHeight)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_pictureWidth = width;
|
||||
_pictureHeight = heigth;
|
||||
_pictureHeight = height;
|
||||
EntityLocomotive = new EntityLocomotive(speed, weight, bodyColor);
|
||||
|
||||
Random rnd = new Random();
|
||||
@ -58,6 +58,21 @@ public class DrawingLocomotive {
|
||||
_locoHeight = locoHeight;
|
||||
}
|
||||
|
||||
protected DrawingLocomotive(EntityLocomotive entityLocomotive, IDrawingWheels iDrawingWheels,
|
||||
int width, int height){
|
||||
EntityLocomotive = entityLocomotive;
|
||||
_drawingWheels = iDrawingWheels;
|
||||
_pictureWidth = width;
|
||||
_pictureHeight = height;
|
||||
}
|
||||
|
||||
protected DrawingLocomotive(EntityLocomotive entityLocomotive, IDrawingWheels iDrawingWheels,
|
||||
int width, int height, int locoWidth, int locoHeight){
|
||||
this(entityLocomotive, iDrawingWheels, width, height);
|
||||
_locoWidth = locoWidth;
|
||||
_locoHeight = locoHeight;
|
||||
}
|
||||
|
||||
public void SetWheelsCount(int wheelsCount){
|
||||
_drawingWheels.SetWheelsCount(wheelsCount);
|
||||
}
|
||||
|
38
ProjectElectricLocomotive/FormDopClassParameters.form
Normal file
38
ProjectElectricLocomotive/FormDopClassParameters.form
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="ProjectElectricLocomotive.FormDopClassParameters">
|
||||
<grid id="27dc6" binding="pictureBoxGenerated" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="0" vgap="0">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="758" height="552"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<enabled value="true"/>
|
||||
<maximumSize width="600" height="400"/>
|
||||
<minimumSize width="600" height="400"/>
|
||||
<opaque value="true"/>
|
||||
<preferredSize width="600" height="400"/>
|
||||
<requestFocusEnabled value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="1ee3" class="javax.swing.JButton" binding="ButtonGenerationRandomLocomotive">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Генерировать локомотив"/>
|
||||
</properties>
|
||||
</component>
|
||||
<hspacer id="b7e9d">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<vspacer id="d0ce8">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
86
ProjectElectricLocomotive/FormDopClassParameters.java
Normal file
86
ProjectElectricLocomotive/FormDopClassParameters.java
Normal file
@ -0,0 +1,86 @@
|
||||
package ProjectElectricLocomotive;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.Random;
|
||||
|
||||
public class FormDopClassParameters {
|
||||
private JButton ButtonGenerationRandomLocomotive;
|
||||
private JPanel pictureBoxGenerated;
|
||||
Random rnd;
|
||||
DrawingLocomotive drawingLocomotive;
|
||||
DopClassParameters<EntityLocomotive, IDrawingWheels> _dopClassParameters;
|
||||
|
||||
public JPanel getPictureBoxGenerated() {
|
||||
return pictureBoxGenerated;
|
||||
}
|
||||
|
||||
public FormDopClassParameters() {
|
||||
pictureBoxGenerated.setPreferredSize(new Dimension(400, 300));
|
||||
_dopClassParameters = new DopClassParameters<>(
|
||||
10,
|
||||
pictureBoxGenerated.getWidth(),
|
||||
pictureBoxGenerated.getHeight()
|
||||
);
|
||||
|
||||
ButtonGenerationRandomLocomotive.addActionListener(e -> {
|
||||
AddEntityLocomotive();
|
||||
AddRandomWheels();
|
||||
|
||||
drawingLocomotive = _dopClassParameters.RandomLocomotive(
|
||||
pictureBoxGenerated.getWidth(),
|
||||
pictureBoxGenerated.getHeight()
|
||||
);
|
||||
drawingLocomotive.SetPosition(rnd.nextInt(10, 100), rnd.nextInt(10, 100));
|
||||
Draw();
|
||||
});
|
||||
}
|
||||
|
||||
public void AddEntityLocomotive() {
|
||||
rnd = new Random();
|
||||
EntityLocomotive entityLocomotive;
|
||||
Color color = new Color(rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256));
|
||||
if (rnd.nextBoolean()) {
|
||||
entityLocomotive = new EntityLocomotive(
|
||||
rnd.nextInt(100, 300),
|
||||
rnd.nextInt(1000, 3000),
|
||||
color
|
||||
);
|
||||
} else {
|
||||
entityLocomotive = new EntityElectricLocomotive(
|
||||
rnd.nextInt(100, 300),
|
||||
rnd.nextInt(1000, 3000),
|
||||
color,
|
||||
color,
|
||||
rnd.nextBoolean(),
|
||||
rnd.nextBoolean()
|
||||
);
|
||||
}
|
||||
_dopClassParameters.Add(entityLocomotive);
|
||||
}
|
||||
|
||||
public void AddRandomWheels() {
|
||||
rnd = new Random();
|
||||
IDrawingWheels iDrawingWheels;
|
||||
int wheelsChoice = rnd.nextInt(0, 3);
|
||||
if (wheelsChoice == 0) {
|
||||
iDrawingWheels = new DrawingWheel();
|
||||
} else if (wheelsChoice == 1) {
|
||||
iDrawingWheels = new DrawingEmptyWheels();
|
||||
} else {
|
||||
iDrawingWheels = new DrawingWheelsBlueCrom();
|
||||
}
|
||||
iDrawingWheels.SetWheelsCount(rnd.nextInt(2, 5));
|
||||
_dopClassParameters.Add(iDrawingWheels);
|
||||
}
|
||||
|
||||
public void Draw() {
|
||||
if (drawingLocomotive.EntityLocomotive == null) {
|
||||
return;
|
||||
}
|
||||
Graphics g = pictureBoxGenerated.getGraphics();
|
||||
pictureBoxGenerated.paint(g);
|
||||
drawingLocomotive.DrawTransport(g);
|
||||
}
|
||||
|
||||
}
|
@ -68,7 +68,6 @@ public class FormElectricLocomotive {
|
||||
ButtonSelectLocomotive.addActionListener(e->{
|
||||
SelectedLocomotive = _drawingLocomotive;
|
||||
IsSelect = true;
|
||||
// DialogResult = DialogResult.OK;
|
||||
});
|
||||
|
||||
buttonStep.addActionListener(new ActionListener() {
|
||||
|
@ -21,7 +21,7 @@
|
||||
<border type="line"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="40d5" binding="Instruments" layout-manager="GridLayoutManager" row-count="6" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="40d5" binding="Instruments" layout-manager="GridLayoutManager" row-count="7" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="true">
|
||||
@ -39,7 +39,7 @@
|
||||
<children>
|
||||
<vspacer id="1eee0">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="5" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="1" row-span="6" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<component id="138d" class="javax.swing.JButton" binding="ButtonAddLocomotive">
|
||||
@ -76,6 +76,14 @@
|
||||
<text value="Обновить "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="1b1c" class="javax.swing.JButton" binding="ButtonCreateRandomLoco">
|
||||
<constraints>
|
||||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Создать рандомный локо "/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
|
@ -3,7 +3,10 @@ package ProjectElectricLocomotive;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
//готовая лаба 3
|
||||
|
||||
public class FormLocomotiveCollections {
|
||||
FrameDopClassParameters frameDopClassParameters;
|
||||
private JPanel MainPanel;
|
||||
private JPanel pictureBoxCollections;
|
||||
private JPanel Instruments;
|
||||
@ -11,9 +14,9 @@ public class FormLocomotiveCollections {
|
||||
private JTextField textFieldNumber;
|
||||
private JButton ButtonRefreshCollection;
|
||||
private JButton ButtonRemoveLocomotive;
|
||||
private JButton ButtonCreateRandomLoco;
|
||||
public DrawingLocomotive loco;
|
||||
FormElectricLocomotive _formElectricLocomotive;
|
||||
private final LocomotiveGenericCollection<DrawingLocomotive, DrawingObjectLocomotive> _locomotives;
|
||||
LocomotiveGenericCollection<DrawingLocomotive, DrawingObjectLocomotive> _locomotives;
|
||||
|
||||
public JPanel getPictureBoxCollections() {
|
||||
return MainPanel;
|
||||
@ -41,7 +44,13 @@ public class FormLocomotiveCollections {
|
||||
});
|
||||
});
|
||||
|
||||
ButtonRemoveLocomotive.addActionListener(e->{
|
||||
ButtonCreateRandomLoco.addActionListener(e->{
|
||||
if(frameDopClassParameters!=null) frameDopClassParameters.dispose();
|
||||
frameDopClassParameters = new FrameDopClassParameters();
|
||||
frameDopClassParameters.setVisible(true);
|
||||
});
|
||||
|
||||
ButtonRemoveLocomotive.addActionListener(e -> {
|
||||
try {
|
||||
int pos = Integer.parseInt(textFieldNumber.getText());
|
||||
if (_locomotives.SubOverload(pos) != null) {
|
||||
@ -64,9 +73,10 @@ public class FormLocomotiveCollections {
|
||||
}
|
||||
});
|
||||
|
||||
ButtonRefreshCollection.addActionListener(e->{
|
||||
ButtonRefreshCollection.addActionListener(e -> {
|
||||
Refresh();
|
||||
});
|
||||
|
||||
}
|
||||
public void Refresh() {
|
||||
Graphics g = pictureBoxCollections.getGraphics();
|
||||
|
19
ProjectElectricLocomotive/FrameDopClassParameters.java
Normal file
19
ProjectElectricLocomotive/FrameDopClassParameters.java
Normal file
@ -0,0 +1,19 @@
|
||||
package ProjectElectricLocomotive;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class FrameDopClassParameters extends JFrame {
|
||||
public FormDopClassParameters _formDopClassParameters;
|
||||
|
||||
public FrameDopClassParameters(){
|
||||
super();
|
||||
setTitle("Рандомный локомотив");
|
||||
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||
_formDopClassParameters = new FormDopClassParameters();
|
||||
setContentPane(_formDopClassParameters.getPictureBoxGenerated());
|
||||
setDefaultLookAndFeelDecorated(false);
|
||||
setLocation(500, 200);
|
||||
pack();
|
||||
setVisible(true);
|
||||
}
|
||||
}
|
@ -6,8 +6,8 @@ public class FrameElectricLocomotive extends JFrame {
|
||||
public FormElectricLocomotive _formLocomotiveCollection;
|
||||
public FrameElectricLocomotive() {
|
||||
super();
|
||||
setTitle("ElectroLoco");
|
||||
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||
setTitle("Электролокомотив");
|
||||
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||
_formLocomotiveCollection = new FormElectricLocomotive();
|
||||
setContentPane(_formLocomotiveCollection.getPictureBox());
|
||||
setDefaultLookAndFeelDecorated(false);
|
||||
|
@ -6,8 +6,7 @@ public class FrameLocomotiveCollection extends JFrame {
|
||||
public FormLocomotiveCollections _formLocomotiveCollections;
|
||||
public FrameLocomotiveCollection(){
|
||||
super();
|
||||
setTitle("LocoCollection");
|
||||
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||
setTitle("Коллекция");setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||
_formLocomotiveCollections = new FormLocomotiveCollections();
|
||||
setContentPane(_formLocomotiveCollections.getPictureBoxCollections());
|
||||
setDefaultLookAndFeelDecorated(false);
|
||||
|
@ -10,14 +10,11 @@ public class LocomotiveGenericCollection<T extends DrawingLocomotive,U extends I
|
||||
//ширина/высота занимаемого места
|
||||
private final int _placeSizeWidth = 150;
|
||||
private final int _placeSizeHeight = 50;
|
||||
|
||||
/// Набор объектов
|
||||
private final SetGeneric<T> _collection;
|
||||
|
||||
public LocomotiveGenericCollection(int picWidth, int picHeight)
|
||||
{
|
||||
// немного странная логика, что-то я пока ее не особо понимаю, зачем нам ААААА дошло...
|
||||
// высчитываем размер массива для setgeneric
|
||||
int width = picWidth / _placeSizeWidth;
|
||||
int height = picHeight / _placeSizeHeight;
|
||||
_pictureWidth = picWidth;
|
||||
|
@ -3,7 +3,7 @@ package ProjectElectricLocomotive;
|
||||
public class SetGeneric<T extends DrawingLocomotive>{
|
||||
private T[] _places;
|
||||
public int Count(){
|
||||
return _places.length;
|
||||
return _places.length;
|
||||
}
|
||||
public SetGeneric(int count) {
|
||||
_places = (T[]) new DrawingLocomotive[count];
|
||||
@ -60,4 +60,4 @@ public class SetGeneric<T extends DrawingLocomotive>{
|
||||
if (position < 0 || position >= Count()) return null;
|
||||
return _places[position];
|
||||
}
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
# ---> Java
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
@ -1,3 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_19" project-jdk-name="openjdk-20" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/PIbd-21_Bakalskaya_E.D._ElectricLocomotive._HARD.iml" filepath="$PROJECT_DIR$/.idea/PIbd-21_Bakalskaya_E.D._ElectricLocomotive._HARD.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -1,124 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
Binary file not shown.
Before Width: | Height: | Size: 702 B |
Binary file not shown.
Before Width: | Height: | Size: 706 B |
Binary file not shown.
Before Width: | Height: | Size: 702 B |
Binary file not shown.
Before Width: | Height: | Size: 706 B |
@ -1,2 +0,0 @@
|
||||
# PIbd-21_Bakalskaya_E.D._ElectricLocomotive._HARD
|
||||
|
Loading…
Reference in New Issue
Block a user