первый вариант GUI
This commit is contained in:
31
src/main/java/ru/dmitriymx/corrector1s/gui/Main.java
Normal file
31
src/main/java/ru/dmitriymx/corrector1s/gui/Main.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package ru.dmitriymx.corrector1s.gui;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class Main extends Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
primaryStage.setTitle("1С корректор (v1.0)");
|
||||
primaryStage.setResizable(false);
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("excel.png")));
|
||||
primaryStage.setScene(loadScene());
|
||||
primaryStage.show();
|
||||
}
|
||||
|
||||
private Scene loadScene() throws IOException {
|
||||
FXMLLoader loader = new FXMLLoader();
|
||||
loader.setLocation(getClass().getResource("single_layout.fxml"));
|
||||
return new Scene(loader.load(), 350-10, 174-10);
|
||||
}
|
||||
}
|
||||
BIN
src/main/resources/ru/dmitriymx/corrector1s/gui/excel.png
Normal file
BIN
src/main/resources/ru/dmitriymx/corrector1s/gui/excel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
|
||||
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="174.0"
|
||||
prefWidth="350.0" xmlns="http://javafx.com/javafx/8.0.111">
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
<ImageView fitHeight="103.0" fitWidth="108.0" pickOnBounds="true" preserveRatio="true" x="10.0" y="10.0">
|
||||
<Image url="@excel.png"/>
|
||||
</ImageView>
|
||||
<Label layoutX="132.0" layoutY="10.0" text="Исходный файл"/>
|
||||
<TextField layoutX="132.0" layoutY="32.0" prefHeight="25.0" prefWidth="178.0"/>
|
||||
<Button layoutX="313.0" layoutY="32.0" mnemonicParsing="false" text="..."/>
|
||||
<CheckBox layoutX="133.0" layoutY="67.0" mnemonicParsing="false" text="Сохранить как..."/>
|
||||
<TextField disable="true" layoutX="132.0" layoutY="89.0" prefHeight="25.0" prefWidth="178.0"/>
|
||||
<Button disable="true" layoutX="313.0" layoutY="89.0" mnemonicParsing="false" text="..."/>
|
||||
<Button layoutX="14.0" layoutY="134.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="324.0"
|
||||
text="Преобразовать">
|
||||
<font>
|
||||
<Font name="System Bold" size="12.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
</Pane>
|
||||
Reference in New Issue
Block a user