mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-22 23:40:08 -08:00
Remove output.
This commit is contained in:
parent
ed7d60800b
commit
582e4e066c
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user