diff --git a/src/main/java/app/controller/MainController.java b/src/main/java/app/controller/MainController.java index 1401900..5ccd9db 100644 --- a/src/main/java/app/controller/MainController.java +++ b/src/main/java/app/controller/MainController.java @@ -15,7 +15,9 @@ import javafx.stage.FileChooser; import javafx.stage.Stage; +import java.awt.*; import java.io.File; +import java.net.URI; import java.net.URL; import java.util.LinkedHashMap; import java.util.ResourceBundle; @@ -88,6 +90,29 @@ private void setOutputPath() { } } + @FXML + private void openSite() { + if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { + try { + Desktop.getDesktop().browse(new URI("http://www.unsl.edu.ar/")); + } catch (Exception ignored) { + } + } + } + + @FXML + private void displayAbout() { + Alert alert = new Alert(Alert.AlertType.INFORMATION); + alert.setTitle("About"); + alert.setHeaderText("Information Theory App"); + alert.setContentText( + "Cross-platform Desktop App for data Protection and Compression using Hamming's and Huffman's algorithms\n\n" + + "Built using Java 8 and JavaFX\n\n" + + "2019 - UNSL - Argentina" + ); + alert.showAndWait(); + } + private void setOperations() { operationsChoiceBox.setItems( FXCollections.observableArrayList( diff --git a/src/main/resources/app/fxml/main.fxml b/src/main/resources/app/fxml/main.fxml index cd954f7..d6903d7 100644 --- a/src/main/resources/app/fxml/main.fxml +++ b/src/main/resources/app/fxml/main.fxml @@ -1,6 +1,7 @@ + @@ -13,86 +14,75 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +