esoe
2 years ago
19 changed files with 175 additions and 173 deletions
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
module ru.molokoin { |
||||
requires javafx.controls; |
||||
requires javafx.fxml; |
||||
exports ru.molokoin; |
||||
} |
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
package ru.molokoin; |
||||
|
||||
import java.net.URL; |
||||
|
||||
import javafx.application.Application; |
||||
import javafx.fxml.FXMLLoader; |
||||
//import javafx.fxml.*;
|
||||
import javafx.scene.Parent; |
||||
import javafx.scene.Scene; |
||||
import javafx.stage.Stage; |
||||
|
||||
|
||||
/** |
||||
* JavaFX App |
||||
*/ |
||||
public class App extends Application { |
||||
|
||||
@Override |
||||
public void start(Stage stage){ |
||||
try { |
||||
String link = "/face/mainframe.fxml"; |
||||
Parent root = FXMLLoader.load(getClass().getResource(link)); |
||||
stage.setTitle("exchange-server-settings"); |
||||
stage.setScene(new Scene(root)); |
||||
stage.show(); |
||||
} catch (Exception e) { |
||||
System.out.println("Не удалось запустить сцену. Ошибка: " + e); |
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
public static void main(String[] args) { |
||||
launch(); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
package ru.molokoin; |
||||
|
||||
import java.net.URL; |
||||
import java.util.ResourceBundle; |
||||
|
||||
import javafx.event.Event; |
||||
import javafx.fxml.FXML; |
||||
import javafx.fxml.Initializable; |
||||
import javafx.scene.control.Button; |
||||
import javafx.scene.input.MouseEvent; |
||||
|
||||
public class MainFrameController implements Initializable{ |
||||
@FXML |
||||
public Button btn; |
||||
public ExchangeServer server; |
||||
|
||||
@Override |
||||
public void initialize(URL location, ResourceBundle resources) { |
||||
// TODO Auto-generated method stub
|
||||
System.out.println("Инициализация компонентов интерфейса ..."); |
||||
server = new ExchangeServer(); |
||||
} |
||||
|
||||
@FXML |
||||
public void buttonClicked(Event e){ |
||||
System.out.println("Button clicked"); |
||||
if (btn.getText().equals("START")){ |
||||
btn.setText("STOP"); |
||||
server.start(); |
||||
|
||||
}else { |
||||
btn.setText("START"); |
||||
server.stop(); |
||||
} |
||||
|
||||
} |
||||
} |
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
package ru.molokoin; |
||||
|
||||
public class SystemInfo { |
||||
|
||||
public static String javaVersion() { |
||||
return System.getProperty("java.version"); |
||||
} |
||||
|
||||
public static String javafxVersion() { |
||||
return System.getProperty("javafx.version"); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
||||
<?import javafx.scene.control.Label?> |
||||
<?import javafx.scene.layout.VBox?> |
||||
<?import javafx.scene.control.Button?> |
||||
|
||||
<VBox prefHeight="200.0" prefWidth="300.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.molokoin.MainFrameController"> |
||||
<Label text="exchange-server"/> |
||||
<Button fx:id="btn" text="START" onAction="#buttonClicked"/> |
||||
</VBox> |
@ -1,18 +0,0 @@
@@ -1,18 +0,0 @@
|
||||
package ru.molokoin; |
||||
|
||||
import org.junit.jupiter.api.Test; |
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals; |
||||
|
||||
/** |
||||
* Unit test for simple App. |
||||
*/ |
||||
class AppTest { |
||||
/** |
||||
* Rigorous Test. |
||||
*/ |
||||
@Test |
||||
void testApp() { |
||||
assertEquals(1, 1); |
||||
} |
||||
} |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
||||
<?import javafx.scene.control.Label?> |
||||
<?import javafx.scene.layout.VBox?> |
||||
<?import javafx.scene.control.Button?> |
||||
|
||||
<VBox prefHeight="200.0" prefWidth="300.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.molokoin.MainFrameController"> |
||||
<Label text="exchange-server"/> |
||||
<Button fx:id="btn" text="START" onAction="#buttonClicked"/> |
||||
</VBox> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
c:\Users\Strannik\Documents\esoe\code\exchange-server\src\main\java\ru\molokoin\SystemInfo.java |
||||
c:\Users\Strannik\Documents\esoe\code\exchange-server\src\main\java\module-info.java |
||||
c:\Users\Strannik\Documents\esoe\code\exchange-server\src\main\java\ru\molokoin\ExchangeServer.java |
||||
c:\Users\Strannik\Documents\esoe\code\exchange-server\src\main\java\ru\molokoin\App.java |
||||
c:\Users\Strannik\Documents\esoe\code\exchange-server\src\main\java\ru\molokoin\UploadServer.java |
Binary file not shown.
Loading…
Reference in new issue