Fixed #11: Application now scales correctly

This commit is contained in:
Rohit Awate 2018-05-08 22:35:40 +05:30
parent ee956baed6
commit 79861e0d7e
No known key found for this signature in database
GPG key ID: 1051D7B79CF2EE25
4 changed files with 14 additions and 10 deletions

View file

@ -155,7 +155,7 @@ public class DashboardController implements Initializable {
});
errorTitle.setText("Oops... That's embarrassing!");
errorDetails.setText("Something went wrong. Try to make another getRequest.\nRestart Everest if that doesn't work.");
errorDetails.setText("Something went wrong. Try to make another request.\nRestart Everest if that doesn't work.");
visualizer = new Visualizer();
visualizerTab.setContent(visualizer);
@ -199,7 +199,6 @@ public class DashboardController implements Initializable {
configureRequestManager();
requestManager.start();
break;
// DataDispatchRequestManager will generate appropriate getRequest based on the type.
case "POST":
case "PUT":
case "PATCH":
@ -274,7 +273,7 @@ public class DashboardController implements Initializable {
Services.loggingService.logSevere("Request execution failed.", E, LocalDateTime.now());
errorLayer.setVisible(true);
errorTitle.setText("Oops... That's embarrassing!");
errorDetails.setText("Something went wrong. Try to make another getRequest.\nRestart Everest if that doesn't work.");
errorDetails.setText("Something went wrong. Try to make another request.\nRestart Everest if that doesn't work.");
}
}
@ -290,7 +289,7 @@ public class DashboardController implements Initializable {
promptLayer.setVisible(false);
Throwable throwable = requestManager.getException();
Exception exception = (Exception) throwable;
Services.loggingService.logWarning(httpMethodBox.getValue() + " getRequest could not be processed.", exception, LocalDateTime.now());
Services.loggingService.logWarning(httpMethodBox.getValue() + " request could not be processed.", exception, LocalDateTime.now());
if (throwable.getClass() == UnreliableResponseException.class) {
UnreliableResponseException URE = (UnreliableResponseException) throwable;
@ -311,7 +310,7 @@ public class DashboardController implements Initializable {
if (requestManager.getClass() == DataDispatchRequestManager.class) {
if (throwable.getCause() != null && throwable.getCause().getClass() == IllegalArgumentException.class) {
errorTitle.setText("Did you forget something?");
errorDetails.setText("Please specify at least one body part for your " + httpMethodBox.getValue() + " getRequest.");
errorDetails.setText("Please specify at least one body part for your " + httpMethodBox.getValue() + " request.");
} else if (throwable.getClass() == FileNotFoundException.class) {
errorTitle.setText("File(s) not found:");
errorDetails.setText(throwable.getMessage());

View file

@ -21,9 +21,11 @@ import com.rohitawate.everest.util.settings.SettingsLoader;
import com.rohitawate.everest.util.themes.ThemeManager;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Rectangle2D;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Screen;
import javafx.stage.Stage;
public class Main extends Application {
@ -41,6 +43,10 @@ public class Main extends Application {
Stage dashboardStage = new Stage();
ThemeManager.setTheme(homeWindow);
Rectangle2D screenBounds = Screen.getPrimary().getBounds();
dashboardStage.setWidth(screenBounds.getWidth() * 0.83);
dashboardStage.setHeight(screenBounds.getHeight() * 0.74);
dashboardStage.getIcons().add(new Image(getClass().getResource("/assets/Logo.png").toExternalForm()));
dashboardStage.setScene(new Scene(homeWindow));
dashboardStage.setTitle("Everest");

View file

@ -22,9 +22,8 @@
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<StackPane fx:id="dashboard" minHeight="720.0" minWidth="1280.0" stylesheets="@../../css/Adreana.css"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.rohitawate.everest.controllers.DashboardController">
<StackPane fx:id="dashboard" stylesheets="@../../css/Adreana.css" xmlns="http://javafx.com/javafx/8.0.141"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.rohitawate.everest.controllers.DashboardController">
<children>
<VBox prefHeight="200.0" prefWidth="100.0">
<children>

View file

@ -22,12 +22,12 @@
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>
<StackPane fx:id="homeWindowSP" stylesheets="@../../css/Adreana.css" xmlns="http://javafx.com/javafx/8.0.111"
<StackPane fx:id="homeWindowSP" stylesheets="@../../css/Adreana.css" xmlns="http://javafx.com/javafx/8.0.141"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.rohitawate.everest.controllers.HomeWindowController">
<children>
<SplitPane fx:id="splitPane" dividerPositions="0.3">
<items>
<VBox fx:id="historyPane" alignment="TOP_CENTER" maxWidth="500.0" minWidth="400.0"
<VBox fx:id="historyPane" alignment="TOP_CENTER" maxWidth="450.0" minWidth="400.0"
SplitPane.resizableWithParent="false">
<children>
<HBox fx:id="historySearchFieldBox" alignment="CENTER" fillHeight="false">