Skip to content

Commit

Permalink
Merge branch 'main' into Executable-installer-and-GUI-Launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
VerisimilitudeX authored Feb 10, 2023
2 parents 7748839 + fa55f4e commit 1120d2c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ dependencies {

// Sentry SDK
implementation 'io.sentry:sentry:6.10.0'

implementation 'org.controlsfx:controlsfx:11.1.2'
}

application {
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/DNAnalyzer/ui/gui/DNAnalyzerGUIFXMLController.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Slider;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.stage.Stage;

import static DNAnalyzer.utils.core.Utils.readFile;

Expand Down Expand Up @@ -103,6 +107,20 @@ private void btnAnalyzeClicked(ActionEvent event) {
txtOutput.setText(output);
}

@FXML
private void rateUsClicked(ActionEvent event) {
try {
Parent root = FXMLLoader.load(DNAnalyzerGUIFXMLController.class.getResource("/DNAnalyzer/gui/fxml/DNAnalyzerRating.fxml"));
Scene scene = new Scene(root);
Stage stage = new Stage();
stage.setTitle("DNAnalyzer Rating");
stage.setScene(scene);
Platform.runLater(() -> stage.show());
} catch (IOException e) {
throw new RuntimeException(e);
}

}
public void initialize() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package DNAnalyzer.ui.gui;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import org.controlsfx.control.Rating;

import javafx.scene.control.TextArea;

public class DNAnalyzerRatingFXMLController {

@FXML
private Rating dnaRating=null;

@FXML
private TextArea dnaRatingTxt= null;

@FXML
private void btnSubmitClicked(ActionEvent event) {
double rating = dnaRating.getRating();
String ratingTxt = dnaRatingTxt.getText();
System.out.print("Rating:"+rating);
}
}
2 changes: 2 additions & 0 deletions src/main/resources/DNAnalyzer/gui/fxml/DNAnalyzerGUI.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
Expand Down Expand Up @@ -139,6 +140,7 @@
<Color red="0.624" green="0.624" blue="0.624" fx:id="x2121"/>
</textFill>
</Label>
<Hyperlink layoutX="15.0" layoutY="514.0" text="Rate us" onAction="#rateUsClicked" />
</children>
</AnchorPane>
<ScrollPane prefHeight="-1.0" prefWidth="-1.0">
Expand Down

0 comments on commit 1120d2c

Please sign in to comment.