добавился счетчик ля подсчета гонорара
This commit is contained in:
@@ -25,7 +25,7 @@ public class Main extends Application {
|
||||
|
||||
private Scene loadScene(Stage stage) throws IOException {
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("single_layout.fxml"));
|
||||
Scene scene = new Scene(loader.load(), 350-10, 174-10);
|
||||
Scene scene = new Scene(loader.load(), 350-10, 203-10);
|
||||
MainController controller = loader.getController();
|
||||
controller.setStage(stage);
|
||||
return scene;
|
||||
|
||||
@@ -2,10 +2,7 @@ package ru.dmitriymx.corrector1s.gui;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.ProgressIndicator;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.FileChooser;
|
||||
import javafx.stage.Stage;
|
||||
@@ -13,7 +10,6 @@ import javafx.stage.Stage;
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Timer;
|
||||
|
||||
public class MainController {
|
||||
private Stage stage;
|
||||
@@ -35,6 +31,9 @@ public class MainController {
|
||||
private ProgressIndicator progressBar;
|
||||
@FXML
|
||||
private Button btnStartCorrect;
|
||||
@FXML
|
||||
private Spinner<Integer> gonorar;
|
||||
private SpinnerValueFactory<Integer> gonorarValueFactory = new SpinnerValueFactory.IntegerSpinnerValueFactory(1, 100, 9);
|
||||
|
||||
private FileChooser buildFileChooser(TextField textField) {
|
||||
FileChooser fileChooser = new FileChooser();
|
||||
@@ -57,6 +56,8 @@ public class MainController {
|
||||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
gonorar.setValueFactory(gonorarValueFactory);
|
||||
|
||||
saveAsCheckBox.selectedProperty().addListener((observable, oldValue, newValue) -> {
|
||||
saveAsFilePath.setDisable(!newValue);
|
||||
btnSaveAsFilePath.setDisable(!newValue);
|
||||
|
||||
@@ -5,14 +5,15 @@
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.ProgressIndicator?>
|
||||
<?import javafx.scene.control.Spinner?>
|
||||
<?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.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.dmitriymx.corrector1s.gui.MainController">
|
||||
<Pane fx:id="mainPane" prefHeight="174.0" prefWidth="350.0">
|
||||
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="203.0" prefWidth="350.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.dmitriymx.corrector1s.gui.MainController">
|
||||
<Pane fx:id="mainPane" prefHeight="203.0" prefWidth="350.0">
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
@@ -22,16 +23,18 @@
|
||||
<Label layoutX="132.0" layoutY="10.0" text="Исходный файл" />
|
||||
<TextField fx:id="sourceFilePath" layoutX="132.0" layoutY="32.0" prefHeight="25.0" prefWidth="178.0" />
|
||||
<Button fx:id="btnSourceFilePath" layoutX="313.0" layoutY="32.0" mnemonicParsing="false" text="..." />
|
||||
<CheckBox fx:id="saveAsCheckBox" layoutX="133.0" layoutY="67.0" mnemonicParsing="false" text="Сохранить как..." />
|
||||
<TextField fx:id="saveAsFilePath" disable="true" layoutX="132.0" layoutY="89.0" prefHeight="25.0" prefWidth="178.0" />
|
||||
<Button fx:id="btnSaveAsFilePath" disable="true" layoutX="313.0" layoutY="89.0" mnemonicParsing="false" text="..." />
|
||||
<Button fx:id="btnStartCorrect" layoutX="14.0" layoutY="134.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="324.0" text="Преобразовать">
|
||||
<CheckBox fx:id="saveAsCheckBox" layoutX="132.0" layoutY="95.0" mnemonicParsing="false" text="Сохранить как..." />
|
||||
<TextField fx:id="saveAsFilePath" disable="true" layoutX="131.0" layoutY="117.0" prefHeight="25.0" prefWidth="178.0" />
|
||||
<Button fx:id="btnSaveAsFilePath" disable="true" layoutX="312.0" layoutY="117.0" mnemonicParsing="false" text="..." />
|
||||
<Button fx:id="btnStartCorrect" layoutX="13.0" layoutY="162.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="324.0" text="Преобразовать">
|
||||
<font>
|
||||
<Font name="System Bold" size="12.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Label layoutX="132.0" layoutY="66.0" text="Гонорар" />
|
||||
<Spinner fx:id="gonorar" editable="true" layoutX="186.0" layoutY="62.0" prefHeight="25.0" prefWidth="77.0" />
|
||||
</Pane>
|
||||
<Pane fx:id="waitPane" prefHeight="174.0" prefWidth="350.0" visible="false">
|
||||
<Pane fx:id="waitPane" prefHeight="203.0" prefWidth="350.0" visible="false">
|
||||
<ProgressIndicator fx:id="progressBar" layoutX="157.0" layoutY="62.0" prefHeight="50.0" prefWidth="36.0" progress="1.0" />
|
||||
</Pane>
|
||||
</Pane>
|
||||
|
||||
Reference in New Issue
Block a user