From 4a327bb6833adec658e317a67494244756d1935d Mon Sep 17 00:00:00 2001 From: Alexis Delhaie Date: Wed, 21 Oct 2020 19:44:36 +0200 Subject: [PATCH] Rebuild UI with JSwing --- src/META-INF/MANIFEST.MF | 3 - .../alexisdelhaie/endpoint/Application.java | 18 + src/ovh/alexisdelhaie/endpoint/Main.java | 33 -- .../alexisdelhaie/endpoint/MainWindow.form | 61 +++ .../alexisdelhaie/endpoint/MainWindow.java | 95 ++++ .../endpoint/builder/TabBuilder.java | 95 ++++ .../ConfigurationProperties.java | 20 +- .../controllers/ConfigurationController.java | 85 ---- .../endpoint/controllers/Controller.java | 471 ------------------ .../endpoint/controllers/about.fxml | 59 --- .../endpoint/controllers/banner.png | Bin 44264 -> 0 bytes .../endpoint/controllers/configuration.fxml | 28 -- .../endpoint/controllers/icon.png | Bin 22975 -> 0 bytes .../endpoint/controllers/responsetab.fxml | 75 --- .../endpoint/http/HttpClient.java | 2 +- src/ovh/alexisdelhaie/endpoint/icon.png | Bin 22975 -> 0 bytes .../alexisdelhaie/endpoint/impl/EditCell.java | 135 ----- .../alexisdelhaie/endpoint/mainwindow.fxml | 21 - .../alexisdelhaie/endpoint/model/Param.java | 49 -- .../endpoint/utils/MessageDialog.java | 22 + 20 files changed, 296 insertions(+), 976 deletions(-) delete mode 100644 src/META-INF/MANIFEST.MF create mode 100644 src/ovh/alexisdelhaie/endpoint/Application.java delete mode 100644 src/ovh/alexisdelhaie/endpoint/Main.java create mode 100644 src/ovh/alexisdelhaie/endpoint/MainWindow.form create mode 100644 src/ovh/alexisdelhaie/endpoint/MainWindow.java create mode 100644 src/ovh/alexisdelhaie/endpoint/builder/TabBuilder.java delete mode 100644 src/ovh/alexisdelhaie/endpoint/controllers/ConfigurationController.java delete mode 100644 src/ovh/alexisdelhaie/endpoint/controllers/Controller.java delete mode 100644 src/ovh/alexisdelhaie/endpoint/controllers/about.fxml delete mode 100644 src/ovh/alexisdelhaie/endpoint/controllers/banner.png delete mode 100644 src/ovh/alexisdelhaie/endpoint/controllers/configuration.fxml delete mode 100644 src/ovh/alexisdelhaie/endpoint/controllers/icon.png delete mode 100644 src/ovh/alexisdelhaie/endpoint/controllers/responsetab.fxml delete mode 100644 src/ovh/alexisdelhaie/endpoint/icon.png delete mode 100644 src/ovh/alexisdelhaie/endpoint/impl/EditCell.java delete mode 100644 src/ovh/alexisdelhaie/endpoint/mainwindow.fxml delete mode 100644 src/ovh/alexisdelhaie/endpoint/model/Param.java create mode 100644 src/ovh/alexisdelhaie/endpoint/utils/MessageDialog.java diff --git a/src/META-INF/MANIFEST.MF b/src/META-INF/MANIFEST.MF deleted file mode 100644 index 091c70a..0000000 --- a/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: ovh.alexisdelhaie.endpoint.Main - diff --git a/src/ovh/alexisdelhaie/endpoint/Application.java b/src/ovh/alexisdelhaie/endpoint/Application.java new file mode 100644 index 0000000..07adf0a --- /dev/null +++ b/src/ovh/alexisdelhaie/endpoint/Application.java @@ -0,0 +1,18 @@ +package ovh.alexisdelhaie.endpoint; + +import com.formdev.flatlaf.FlatIntelliJLaf; + +import javax.swing.*; + +public class Application { + + public static void main(String[] args) throws UnsupportedLookAndFeelException { + UIManager.setLookAndFeel(new FlatIntelliJLaf()); + MainWindow dialog = new MainWindow(); + dialog.pack(); + dialog.setTitle("EndPoint"); + dialog.setVisible(true); + dialog.centerFrame(); + } + +} diff --git a/src/ovh/alexisdelhaie/endpoint/Main.java b/src/ovh/alexisdelhaie/endpoint/Main.java deleted file mode 100644 index 00cd5e6..0000000 --- a/src/ovh/alexisdelhaie/endpoint/Main.java +++ /dev/null @@ -1,33 +0,0 @@ -package ovh.alexisdelhaie.endpoint; - -import javafx.application.Application; -import javafx.fxml.FXMLLoader; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.image.Image; -import javafx.stage.Stage; -import ovh.alexisdelhaie.endpoint.controllers.Controller; - -public class Main extends Application { - - @Override - public void start(Stage primaryStage) throws Exception{ - FXMLLoader loader = new FXMLLoader(getClass().getResource("mainwindow.fxml")); - Parent root = loader.load(); - Controller controller = loader.getController(); - controller.setStageAndSetupListeners(primaryStage); - primaryStage.setTitle("EndPoint"); - primaryStage.setScene(new Scene(root, 1067, 644)); - primaryStage.setMinWidth(1067); - primaryStage.setMinHeight(644); - primaryStage.setMaximized(true); - primaryStage.getIcons().add( new Image( - Main.class.getResourceAsStream( "icon.png" ))); - primaryStage.show(); - } - - - public static void main(String[] args) { - launch(args); - } -} diff --git a/src/ovh/alexisdelhaie/endpoint/MainWindow.form b/src/ovh/alexisdelhaie/endpoint/MainWindow.form new file mode 100644 index 0000000..6953221 --- /dev/null +++ b/src/ovh/alexisdelhaie/endpoint/MainWindow.form @@ -0,0 +1,61 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/ovh/alexisdelhaie/endpoint/MainWindow.java b/src/ovh/alexisdelhaie/endpoint/MainWindow.java new file mode 100644 index 0000000..9ce2885 --- /dev/null +++ b/src/ovh/alexisdelhaie/endpoint/MainWindow.java @@ -0,0 +1,95 @@ +package ovh.alexisdelhaie.endpoint; + +import ovh.alexisdelhaie.endpoint.builder.TabBuilder; +import ovh.alexisdelhaie.endpoint.configuration.ConfigurationProperties; +import ovh.alexisdelhaie.endpoint.http.HttpClient; +import ovh.alexisdelhaie.endpoint.http.Request; +import ovh.alexisdelhaie.endpoint.http.RequestBuilder; +import ovh.alexisdelhaie.endpoint.http.Response; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.IOException; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.util.Optional; + +public class MainWindow extends JFrame { + + // Constants + public final static int WIDTH = 1280; + public final static int HEIGHT = 720; + + private JPanel contentPane; + private JComboBox comboBox1; + private JTextField textField1; + private JButton sendButton; + private JTabbedPane tabbedPane1; + private JButton newTabButton; + + private ConfigurationProperties props; + + public MainWindow() { + props = new ConfigurationProperties(); + setContentPane(contentPane); + setMinimumSize(new Dimension(WIDTH, HEIGHT)); + setSize(WIDTH, HEIGHT); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + TabBuilder.create(tabbedPane1, "New request"); + newTabButton.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + super.mouseClicked(e); + TabBuilder.create(tabbedPane1, "New request"); + } + }); + sendButton.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + super.mouseClicked(e); + try { + sendRequest(); + } catch (IOException | NoSuchAlgorithmException | KeyManagementException ioException) { + ioException.printStackTrace(); + } + } + }); + } + + public void centerFrame() { + Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); + int y = (int)( screen.getHeight() / 2 ) - this.getHeight() / 2; + int x = (int)( screen.getWidth() / 2 ) - this.getWidth() / 2; + this.setLocation(x, y); + } + + private void sendRequest() throws IOException, NoSuchAlgorithmException, KeyManagementException { + Optional possibleTab = getSelectedTab(); + if (possibleTab.isPresent()) { + JSplitPane tab = possibleTab.get(); + String url = textField1.getText(); + HttpClient h = new HttpClient(props); + Request r = new RequestBuilder(url) + .build(); + Optional possibleRes = h.get(r); + if (possibleRes.isPresent()) { + Response res = possibleRes.get(); + int i = tabbedPane1.indexOfComponent(tab); + JTextArea t = TabBuilder.getResponseArea(i); + t.setText(res.getBody()); + } + } + + } + + private Optional getSelectedTab() { + Component c = tabbedPane1.getSelectedComponent(); + if (c instanceof JSplitPane) { + return Optional.of((JSplitPane) c); + } + return Optional.empty(); + } + +} diff --git a/src/ovh/alexisdelhaie/endpoint/builder/TabBuilder.java b/src/ovh/alexisdelhaie/endpoint/builder/TabBuilder.java new file mode 100644 index 0000000..bde3569 --- /dev/null +++ b/src/ovh/alexisdelhaie/endpoint/builder/TabBuilder.java @@ -0,0 +1,95 @@ +package ovh.alexisdelhaie.endpoint.builder; + +import javax.swing.*; +import javax.swing.table.TableColumn; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.HashMap; + +public class TabBuilder { + + private static HashMap indexes = new HashMap<>(); + + public static void create(JTabbedPane tab, String label) { + Component c = tab.add("", buildMainPanel()); + int index = tab.indexOfComponent(c); + updateIndexes(index); + tab.setTabComponentAt(index, buildTabPanel(tab, c, label)); + tab.setSelectedComponent(c); + } + + private static void updateIndexes(int index) { + indexes.put("main[" + index + "].responseTextArea", indexes.get("main[waiting].responseTextArea")); + indexes.remove("main[waiting].responseTextArea"); + } + + private static JPanel buildTabPanel(JTabbedPane tab, Component c, String label) { + JPanel p = new JPanel(new GridBagLayout()); + p.setOpaque(false); + JLabel l = new JLabel(label); + GridBagConstraints g = new GridBagConstraints(); + g.gridx = 0; + g.gridy = 0; + g.weightx = 1; + p.add(l, g); + g.gridx++; + g.weightx = 0; + p.add(buildCloseButton(tab, c), g); + return p; + } + + private static JButton buildCloseButton(JTabbedPane tab, Component c) { + JButton b = new JButton("×"); + b.setBorderPainted(false); + b.setFocusPainted(false); + b.setOpaque(false); + b.setContentAreaFilled(false); + b.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + super.mouseClicked(e); + tab.remove(c); + } + }); + return b; + } + + private static JSplitPane buildMainPanel() { + JTextArea t = new JTextArea(); + t.setBackground(Color.WHITE); + t.setEditable(false); + JScrollPane sp = new JScrollPane(t); + indexes.put("main[waiting].responseTextArea", t); + return new JSplitPane( + JSplitPane.VERTICAL_SPLIT, + buildParametersTabbedPane(), + sp + ); + } + + private static JTabbedPane buildParametersTabbedPane() { + JTabbedPane p = new JTabbedPane(); + p.add("Params", buildTable()); + p.add("Authorization", new JPanel()); + p.add("Headers", buildTable()); + p.add("Body", new JTextArea()); + return p; + } + + private static JTable buildTable() { + JTable t = new JTable(); + TableColumn keyCol = new TableColumn(); + keyCol.setHeaderValue("Keys"); + TableColumn valCol = new TableColumn(); + valCol.setHeaderValue("Values"); + t.addColumn(keyCol); + t.addColumn(valCol); + return t; + } + + public static JTextArea getResponseArea(int index) { + return (JTextArea) indexes.get("main[" + index + "].responseTextArea"); + } + +} diff --git a/src/ovh/alexisdelhaie/endpoint/configuration/ConfigurationProperties.java b/src/ovh/alexisdelhaie/endpoint/configuration/ConfigurationProperties.java index a2a5b21..052170d 100644 --- a/src/ovh/alexisdelhaie/endpoint/configuration/ConfigurationProperties.java +++ b/src/ovh/alexisdelhaie/endpoint/configuration/ConfigurationProperties.java @@ -2,7 +2,7 @@ package ovh.alexisdelhaie.endpoint.configuration; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import javafx.scene.control.Alert; +import ovh.alexisdelhaie.endpoint.utils.MessageDialog; import java.io.File; import java.io.IOException; @@ -56,11 +56,7 @@ public class ConfigurationProperties { try { mapper.writeValue(new File(filepath), properties); } catch (Exception e) { - Alert alert = new Alert(Alert.AlertType.ERROR); - alert.setTitle("Cannot save settings"); - alert.setHeaderText("There was an error while saving settings file"); - alert.setContentText(e.getMessage()); - alert.showAndWait(); + MessageDialog.error("Cannot save settings", "There was an error while saving settings file"); } } @@ -71,11 +67,7 @@ public class ConfigurationProperties { properties = mapper.readValue(f, new TypeReference>() { }); } } catch (IOException e) { - Alert alert = new Alert(Alert.AlertType.ERROR); - alert.setTitle("Cannot initialize settings"); - alert.setHeaderText("There was an error while initializing settings file"); - alert.setContentText(e.getMessage()); - alert.showAndWait(); + MessageDialog.error("Cannot initialize settings", "There was an error while initializing settings file"); } } @@ -88,11 +80,7 @@ public class ConfigurationProperties { Files.createDirectories(path); } } catch (IOException e) { - Alert alert = new Alert(Alert.AlertType.ERROR); - alert.setTitle("Cannot create app folder"); - alert.setHeaderText("There was an error while creating appdata folder"); - alert.setContentText(e.getMessage()); - alert.showAndWait(); + MessageDialog.error("Cannot create app folder", "There was an error while creating appdata folder"); } } diff --git a/src/ovh/alexisdelhaie/endpoint/controllers/ConfigurationController.java b/src/ovh/alexisdelhaie/endpoint/controllers/ConfigurationController.java deleted file mode 100644 index d82605e..0000000 --- a/src/ovh/alexisdelhaie/endpoint/controllers/ConfigurationController.java +++ /dev/null @@ -1,85 +0,0 @@ -package ovh.alexisdelhaie.endpoint.controllers; - -import javafx.collections.FXCollections; -import javafx.event.ActionEvent; -import javafx.fxml.FXML; -import javafx.fxml.FXMLLoader; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.control.Alert; -import javafx.scene.control.CheckBox; -import javafx.scene.control.ChoiceBox; -import javafx.scene.image.Image; -import javafx.scene.input.MouseEvent; -import javafx.stage.Modality; -import javafx.stage.Stage; -import ovh.alexisdelhaie.endpoint.configuration.ConfigurationProperties; - -import java.io.IOException; - -public class ConfigurationController -{ - - private ConfigurationProperties configurationProperties; - private Stage primaryStage; - - @FXML - private CheckBox allowInvalidSsl; - @FXML - private CheckBox allowDowngrade; - @FXML - private ChoiceBox httpVersion; - - public void setStageAndSetupListeners(Stage s) { - primaryStage = s; - } - - public void setConfigurationProperties(ConfigurationProperties properties) { - String[] versions = { "HTTP/1.1", "HTTP/1.0" }; - httpVersion.setItems(FXCollections.observableArrayList(versions)); - configurationProperties = properties; - allowInvalidSsl.setSelected(properties.getBooleanProperty("allowInvalidSsl", false)); - allowDowngrade.setSelected(properties.getBooleanProperty("allowDowngrade", true)); - httpVersion.setValue(properties.getStringProperty("httpVersion", versions[0])); - httpVersion.setOnAction(this::onChoiceBoxValueChanged); - } - - @FXML - private void onBooleanValueChanged(MouseEvent event) { - CheckBox c = (CheckBox) event.getSource(); - configurationProperties.setProperty(c.getId(), String.valueOf(c.isSelected())); - } - - @SuppressWarnings("unchecked") - private void onChoiceBoxValueChanged(ActionEvent event) { - ChoiceBox c = (ChoiceBox) event.getSource(); - configurationProperties.setProperty(c.getId(), c.getValue()); - } - - @FXML - private void showAboutDialog() { - try { - Stage dialog = new Stage(); - Parent xml = FXMLLoader.load(getClass().getResource("about.fxml")); - dialog.initOwner(primaryStage); - dialog.setScene(new Scene(xml, 707, 365)); - dialog.setMaxHeight(365); - dialog.setMinHeight(365); - dialog.setMaxWidth(707); - dialog.setMinWidth(707); - dialog.setResizable(false); - dialog.setTitle("About EndPoint"); - dialog.getIcons().add( new Image( - Controller.class.getResourceAsStream( "icon.png" ))); - dialog.initModality(Modality.APPLICATION_MODAL); - dialog.showAndWait(); - } catch (IOException e) { - Alert alert = new Alert(Alert.AlertType.ERROR); - alert.setTitle("Cannot initialize About"); - alert.setHeaderText("There was an error while initializing this dialog"); - alert.setContentText(e.getMessage()); - alert.showAndWait(); - } - } - -} diff --git a/src/ovh/alexisdelhaie/endpoint/controllers/Controller.java b/src/ovh/alexisdelhaie/endpoint/controllers/Controller.java deleted file mode 100644 index ee4ce00..0000000 --- a/src/ovh/alexisdelhaie/endpoint/controllers/Controller.java +++ /dev/null @@ -1,471 +0,0 @@ -package ovh.alexisdelhaie.endpoint.controllers; - -import javafx.application.Platform; -import javafx.beans.property.StringProperty; -import javafx.collections.FXCollections; -import javafx.fxml.FXML; -import javafx.fxml.FXMLLoader; -import javafx.fxml.Initializable; -import javafx.geometry.Orientation; -import javafx.scene.Node; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.control.*; -import javafx.scene.control.cell.PropertyValueFactory; -import javafx.scene.image.Image; -import javafx.scene.layout.GridPane; -import javafx.scene.layout.Pane; -import javafx.scene.paint.Color; -import javafx.stage.Modality; -import javafx.stage.Stage; -import org.apache.commons.validator.routines.UrlValidator; -import ovh.alexisdelhaie.endpoint.configuration.ConfigurationProperties; -import ovh.alexisdelhaie.endpoint.http.HttpClient; -import ovh.alexisdelhaie.endpoint.http.Request; -import ovh.alexisdelhaie.endpoint.http.RequestBuilder; -import ovh.alexisdelhaie.endpoint.http.Response; -import ovh.alexisdelhaie.endpoint.impl.EditCell; -import ovh.alexisdelhaie.endpoint.model.Param; -import ovh.alexisdelhaie.endpoint.url.URLGenerator; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.ResourceBundle; -import java.util.function.Function; - -public class Controller implements Initializable { - - private enum StatusColor { - INFORMATION("#53baf5"), - SUCCESS("#7ccf16"), - REDIRECTION("#b153f5"), - ERROR_CLIENT("#f5ca53"), - ERROR_SERVER("#f55353"), - DEFAULT("BLACK"); - - private final String hex; - - StatusColor(String s) { - hex = s; - } - - public String getHex() { - return hex; - } - } - - private enum RequestTab { - PARAMS(0), - AUTHORIZATION(1), - HEADERS(2), - BODY(3), - RESPONSE(4); - - private final int index; - - RequestTab (int i) { index = i; } - public int getIndex() { return index; } - } - - @FXML - private ChoiceBox httpMethod; - @FXML - private TabPane tabs; - @FXML - private TextField requestInput; - @FXML - private Pane runningIndicatorPane; - - private Stage primaryStage; - private HashMap requests; - private HashMap methods; - - private ConfigurationProperties properties; - - @Override - public void initialize(URL location, ResourceBundle resources) { - properties = new ConfigurationProperties(); - requests = new HashMap<>(); - methods = new HashMap<>(); - String[] method = { "GET", "POST", "HEAD", "PUT", "DELETE" }; - httpMethod.setItems(FXCollections.observableArrayList(method)); - httpMethod.setValue(method[0]); - httpMethod.setOnAction(actionEvent -> httpMethodChanged()); - tabs.getSelectionModel().selectedItemProperty().addListener( - (ov, t, t1) -> { - requestInput.setText((t1 != null) ? requests.get(t1.hashCode()) : ""); - httpMethod.setValue((t1 != null) ? methods.get(t1.hashCode()) : httpMethod.getValue()); - } - ); - createNewTab(); - } - - private Tab newTab() { - SplitPane sp = new SplitPane(); - - Tab params = new Tab("Params", createParamTable()); - Tab auth = new Tab("Authorization"); - Tab headers = new Tab("Headers", createParamTable()); - Tab body = new Tab("Body", new TextArea()); - Tab response = new Tab("Response", createResponseTab()); - - TabPane options = new TabPane(); - TextArea ta = new TextArea(); - ta.setEditable(false); - - options.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE); - options.getTabs().addAll(params, auth, headers, body, response); - sp.getItems().add(options); - sp.getItems().add(ta); - sp.setOrientation(Orientation.VERTICAL); - - Tab tab = new Tab("untitled", sp); - tab.setOnCloseRequest(arg0 -> { - requests.remove(tab.hashCode()); - methods.remove(tab.hashCode()); - }); - - return tab; - } - - @SuppressWarnings("unchecked") - private ScrollPane createResponseTab() { - ScrollPane sp = new ScrollPane(); - Pane p = new Pane(); - sp.setContent(p); - try { - Parent xml = FXMLLoader.load(getClass().getResource("responsetab.fxml")); - p.getChildren().add(xml); - TableView headers = (TableView) p.lookup("#headers"); - headers.getColumns().get(0).setCellValueFactory(new PropertyValueFactory<>("name")); - headers.getColumns().get(1).setCellValueFactory(new PropertyValueFactory<>("value")); - } catch (IOException e) { - System.err.println(e.getMessage()); - } - return sp; - } - - private TableView createParamTable() { - TableView paramsTable = new TableView<>(); - - TableColumn name = createColumn("Name", Param::name); - TableColumn value = createColumn("Value", Param::value); - - name.prefWidthProperty().bind(paramsTable.widthProperty().multiply(0.5)); - value.prefWidthProperty().bind(paramsTable.widthProperty().multiply(0.5)); - - name.setOnEditCommit(t -> { - TableView tv = t.getTableView(); - t.getRowValue().name().set(t.getNewValue()); - manageEmptyCells(t, tv); - }); - value.setOnEditCommit(t -> { - TableView tv = t.getTableView(); - t.getRowValue().value().set(t.getNewValue()); - manageEmptyCells(t, tv); - }); - - paramsTable.getColumns().add(name); - paramsTable.getColumns().add(value); - - paramsTable.setEditable(true); - paramsTable.getItems().add(new Param()); - - return paramsTable; - } - - private void manageEmptyCells(TableColumn.CellEditEvent t, TableView tv) { - if (t.getRowValue().isEmpty() && tv.getItems().size() > 1) { - tv.getItems().remove(t.getRowValue()); - } - if (!tv.getItems().get(tv.getItems().size() - 1).isEmpty()) { - tv.getItems().add(new Param()); - } - requestInput.setText(URLGenerator.processNewUrl(getParamsMap(), requestInput.getText())); - } - - private TableColumn createColumn(String title, Function property) { - TableColumn col = new TableColumn<>(title); - col.setCellValueFactory(cellData -> property.apply(cellData.getValue())); - - col.setCellFactory(column -> EditCell.createStringEditCell()); - return col ; - } - - @FXML - private void start() { - if (requestInput.getText().isBlank()) { - Alert alert = new Alert(Alert.AlertType.WARNING); - alert.setTitle("URL field empty"); - alert.setContentText("Enter your URL in the field at the top of the window."); - alert.showAndWait(); - return; - } - runningIndicatorPane.setVisible(true); - new Thread(() -> { - final String method = httpMethod.getValue(); - Optional -