Skip to content
Open

Dev #103

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.example</groupId>
<artifactId>Robots</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
156 changes: 0 additions & 156 deletions robots/src/gui/MainApplicationFrame.java

This file was deleted.

89 changes: 0 additions & 89 deletions robots/src/log/LogWindowSource.java

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions src/main/java/robots/gui/AbstractWindow.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package robots.gui;

import javax.swing.*;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;

public abstract class AbstractWindow extends JInternalFrame {

public AbstractWindow(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable) {
super(title, resizable, closable, maximizable, iconifiable);
setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE);

addInternalFrameListener(new InternalFrameAdapter() {
@Override
public void internalFrameClosing(InternalFrameEvent e) {
int result = JOptionPane.showConfirmDialog(
AbstractWindow.this,
"Вы уверены, что хотите закрыть окно?",
"Подтверждение",
JOptionPane.YES_NO_OPTION);
if (result == JOptionPane.YES_OPTION) {
dispose();
}
}
}); }

protected abstract void closeWindow();

@Override
public void dispose() {
closeWindow();
super.dispose();
}
}
Loading