1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-06-18 00:37:06 -07:00

Remove output.

This commit is contained in:
Danila Fedorin 2017-08-07 10:39:50 -07:00
parent 314552f95a
commit 1cd332b97d
2 changed files with 18 additions and 7 deletions

View File

@ -12,13 +12,25 @@ import javafx.stage.Stage;
*/
public class AbacusApplication extends Application {
/**
* The controller currently managing the application.
*/
private AbacusController controller;
@Override
public void start(Stage primaryStage) throws Exception {
Parent parent = FXMLLoader.load(getClass().getResource("/abacus.fxml"));
FXMLLoader loader = new FXMLLoader(getClass().getResource("/abacus.fxml"));
Parent parent = loader.load();
controller = loader.getController();
Scene mainScene = new Scene(parent, 320, 480);
primaryStage.setScene(mainScene);
primaryStage.setTitle("Abacus");
primaryStage.show();
}
@Override
public void stop() throws Exception {
super.stop();
controller.performStop();
}
}

View File

@ -259,7 +259,7 @@ public class AbacusController implements PluginListener {
}
@FXML
private void performCalculation() {
public void performCalculation() {
inputButton.setDisable(true);
stopButton.setDisable(false);
calculationThread = new Thread(CALCULATION_RUNNABLE);
@ -269,7 +269,7 @@ public class AbacusController implements PluginListener {
}
@FXML
private void performStop(){
public void performStop(){
if(calculationThread != null) {
calculationThread.interrupt();
calculationThread = null;
@ -281,7 +281,7 @@ public class AbacusController implements PluginListener {
}
@FXML
private void performSaveAndReload() {
public void performSaveAndReload() {
performSave();
performReload();
changesMade = false;
@ -289,13 +289,13 @@ public class AbacusController implements PluginListener {
}
@FXML
private void performReload() {
public void performReload() {
alertIfApplyNeeded(true);
abacus.getPluginManager().reload();
}
@FXML
private void performSave() {
public void performSave() {
Configuration configuration = abacus.getConfiguration();
configuration.setNumberImplementation(numberImplementationBox.getSelectionModel().getSelectedItem());
Set<String> disabledPlugins = configuration.getDisabledPlugins();
@ -305,7 +305,6 @@ public class AbacusController implements PluginListener {
}
if(computationLimitField.getText().matches("\\d*(\\.\\d+)?") && computationLimitField.getText().length() != 0)
configuration.setComputationDelay(Double.parseDouble(computationLimitField.getText()));
System.out.println(configuration.getComputationDelay());
configuration.saveTo(CONFIG_FILE);
changesMade = false;
reloadAlertShown = false;