Fix bug that with setStroke that fails in windows.
Add check for older versions of Java.
This commit is contained in:
parent
7855e074d4
commit
0cee7626ad
@ -22,9 +22,9 @@
|
|||||||
<b>The webstart and embedded verions require java 8 to run! It is also necessary to add cromer.cl to your
|
<b>The webstart and embedded verions require java 8 to run! It is also necessary to add cromer.cl to your
|
||||||
trusted sites in java settings because the java applet is unsigned.</b><br>
|
trusted sites in java settings because the java applet is unsigned.</b><br>
|
||||||
<hr>
|
<hr>
|
||||||
<b>Windows:</b> <a href='MT-1.0.0.zip'>click to download windows binary</a><br>
|
<b>Windows:</b> <a href='MT-1.0.1.zip'>click to download windows binary</a><br>
|
||||||
<hr>
|
<hr>
|
||||||
<b>Linux:</b> <a href='MT-1.0.0.tar.gz'>click to download linux binary</a><br>
|
<b>Linux:</b> <a href='MT-1.0.1.tar.gz'>click to download linux binary</a><br>
|
||||||
<hr>
|
<hr>
|
||||||
<b>Webstart:</b> <a href='MT.jnlp' onclick="return launchApplication('MT.jnlp');">click to launch this app as
|
<b>Webstart:</b> <a href='MT.jnlp' onclick="return launchApplication('MT.jnlp');">click to launch this app as
|
||||||
webstart</a><br>
|
webstart</a><br>
|
||||||
|
@ -116,7 +116,7 @@ public class IndividualController extends VBox {
|
|||||||
rectangle.setId("caja_" + label);
|
rectangle.setId("caja_" + label);
|
||||||
Text text = new Text();
|
Text text = new Text();
|
||||||
text.setId("simbolo_" + label);
|
text.setId("simbolo_" + label);
|
||||||
text.setStroke(Color.BLACK);
|
text.setFill(Color.BLACK);
|
||||||
text.setText(texto);
|
text.setText(texto);
|
||||||
|
|
||||||
StackPane stackPane = new StackPane();
|
StackPane stackPane = new StackPane();
|
||||||
@ -146,7 +146,7 @@ public class IndividualController extends VBox {
|
|||||||
Rectangle rectangle = (Rectangle) scene.lookup("#caja_1");
|
Rectangle rectangle = (Rectangle) scene.lookup("#caja_1");
|
||||||
rectangle.setFill(Color.BLUE);
|
rectangle.setFill(Color.BLUE);
|
||||||
Text simbolo = (Text) scene.lookup("#simbolo_1");
|
Text simbolo = (Text) scene.lookup("#simbolo_1");
|
||||||
simbolo.setStroke(Color.WHITE);
|
simbolo.setFill(Color.WHITE);
|
||||||
|
|
||||||
cadena.setText("");
|
cadena.setText("");
|
||||||
cadena.setDisable(true);
|
cadena.setDisable(true);
|
||||||
@ -223,13 +223,13 @@ public class IndividualController extends VBox {
|
|||||||
Rectangle rectangle = (Rectangle) scene.lookup("#caja_" + cabezalAnterior);
|
Rectangle rectangle = (Rectangle) scene.lookup("#caja_" + cabezalAnterior);
|
||||||
rectangle.setFill(Color.WHITE);
|
rectangle.setFill(Color.WHITE);
|
||||||
Text simbolo = (Text) scene.lookup("#simbolo_" + cabezalAnterior);
|
Text simbolo = (Text) scene.lookup("#simbolo_" + cabezalAnterior);
|
||||||
simbolo.setStroke(Color.BLACK);
|
simbolo.setFill(Color.BLACK);
|
||||||
|
|
||||||
// Cabezel
|
// Cabezel
|
||||||
rectangle = (Rectangle) scene.lookup("#caja_" + maquina.getCabezal());
|
rectangle = (Rectangle) scene.lookup("#caja_" + maquina.getCabezal());
|
||||||
rectangle.setFill(Color.BLUE);
|
rectangle.setFill(Color.BLUE);
|
||||||
simbolo = (Text) scene.lookup("#simbolo_" + maquina.getCabezal());
|
simbolo = (Text) scene.lookup("#simbolo_" + maquina.getCabezal());
|
||||||
simbolo.setStroke(Color.WHITE);
|
simbolo.setFill(Color.WHITE);
|
||||||
|
|
||||||
cabezalAnterior = maquina.getCabezal();
|
cabezalAnterior = maquina.getCabezal();
|
||||||
estadoPrevio = maquina.getEstadoActual().getQ();
|
estadoPrevio = maquina.getEstadoActual().getQ();
|
||||||
|
@ -11,10 +11,9 @@ import javafx.application.Application;
|
|||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.ButtonBar;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.ButtonType;
|
|
||||||
import javafx.scene.control.Dialog;
|
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
|
import javafx.scene.layout.Region;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,13 +21,13 @@ import javafx.stage.Stage;
|
|||||||
*
|
*
|
||||||
* @author Christopher Cromer
|
* @author Christopher Cromer
|
||||||
* @author Carlos Fáundez
|
* @author Carlos Fáundez
|
||||||
* @version 1.0.0
|
* @version 1.0.1
|
||||||
*/
|
*/
|
||||||
public class MT extends Application {
|
public class MT extends Application {
|
||||||
/**
|
/**
|
||||||
* La version de Maquina de Turing
|
* La version de Maquina de Turing
|
||||||
*/
|
*/
|
||||||
static public final String version = "1.0.0";
|
static public final String version = "1.0.1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* El metodo principal del programa
|
* El metodo principal del programa
|
||||||
@ -72,5 +71,16 @@ public class MT extends Application {
|
|||||||
primaryStage.setMinWidth(640);
|
primaryStage.setMinWidth(640);
|
||||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/cl/cromer/mt/images/icon.png")));
|
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/cl/cromer/mt/images/icon.png")));
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
|
if (Double.valueOf(System.getProperty("java.specification.version")) < 1.8) {
|
||||||
|
ButtonType botonCerrar = new ButtonType("Cerrar", ButtonBar.ButtonData.OK_DONE);
|
||||||
|
Alert alert = new Alert(Alert.AlertType.NONE, "El programa se necesita Java 8 para correr.");
|
||||||
|
alert.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node -> ((Label) node).setMinHeight(Region.USE_PREF_SIZE));
|
||||||
|
alert.setGraphic(null);
|
||||||
|
alert.getDialogPane().getButtonTypes().add(botonCerrar);
|
||||||
|
Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();
|
||||||
|
stage.getIcons().add(new Image(getClass().getResourceAsStream("/cl/cromer/mt/images/icon.png")));
|
||||||
|
alert.showAndWait();
|
||||||
|
primaryStage.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user