From 6f154bbf694597926ddc3e52a707661e1b0368f2 Mon Sep 17 00:00:00 2001 From: Finn Date: Thu, 11 Dec 2025 13:24:59 +0100 Subject: [PATCH] Moved classic to own classic branch --- pom.xml | 138 +++++- src/main/java/module-info.java | 22 + .../browser/Client.java | 26 ++ .../browser/Config.java | 87 ++++ .../browser/Main.java | 114 +++++ .../browser/MessageDialog.java | 53 +++ .../browser/controller/Browser.java | 318 +++++++++++++ .../browser/controller/Settings.java | 61 +++ .../browser/history/HistoryItem.java | 31 ++ .../browser/history/HistoryManager.java | 98 ++++ src/main/resources/META-INF/MANIFEST.MF | 3 + src/main/resources/jogl/jogamp/README.jcef | 15 + .../resources/jogl/jogamp/gluegen.LICENSE.txt | 133 ++++++ .../resources/jogl/jogamp/jogl.LICENSE.txt | 430 ++++++++++++++++++ .../browser/Browser.fxml | 24 + .../browser/MessageDialog.fxml | 28 ++ .../browser/controller/Settings.fxml | 59 +++ src/main/resources/version.txt | 1 + 18 files changed, 1639 insertions(+), 2 deletions(-) create mode 100644 src/main/java/module-info.java create mode 100644 src/main/java/org/openautonomousconnection/browser/Client.java create mode 100644 src/main/java/org/openautonomousconnection/browser/Config.java create mode 100644 src/main/java/org/openautonomousconnection/browser/Main.java create mode 100644 src/main/java/org/openautonomousconnection/browser/MessageDialog.java create mode 100644 src/main/java/org/openautonomousconnection/browser/controller/Browser.java create mode 100644 src/main/java/org/openautonomousconnection/browser/controller/Settings.java create mode 100644 src/main/java/org/openautonomousconnection/browser/history/HistoryItem.java create mode 100644 src/main/java/org/openautonomousconnection/browser/history/HistoryManager.java create mode 100644 src/main/resources/META-INF/MANIFEST.MF create mode 100644 src/main/resources/jogl/jogamp/README.jcef create mode 100644 src/main/resources/jogl/jogamp/gluegen.LICENSE.txt create mode 100644 src/main/resources/jogl/jogamp/jogl.LICENSE.txt create mode 100644 src/main/resources/org/openautonomousconnection/browser/Browser.fxml create mode 100644 src/main/resources/org/openautonomousconnection/browser/MessageDialog.fxml create mode 100644 src/main/resources/org/openautonomousconnection/browser/controller/Settings.fxml create mode 100644 src/main/resources/version.txt diff --git a/pom.xml b/pom.xml index 8d96388..dc1b8fa 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.openautonomousconnection WebClient - 1.0-SNAPSHOT + 1.0-CLASSIC Open Autonomous Connection https://open-autonomous-connection.org/ @@ -18,6 +18,7 @@ 23 23 UTF-8 + 5.10.0 @@ -56,6 +57,43 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 21 + 21 + + + + org.openjfx + javafx-maven-plugin + 0.0.8 + + + + default-cli + + + org.openautonomousconnection.browser/org.openautonomousconnection.browser.ViewApplication + + app + app + app + true + true + true + + + + + + + + oac @@ -70,7 +108,7 @@ org.openautonomousconnection protocol - 1.0.0-BETA.1 + 1.0.0-CLASSIC org.projectlombok @@ -78,5 +116,101 @@ 1.18.38 provided + + org.openjfx + javafx-controls + 21 + + + org.openjfx + javafx-fxml + 21 + + + org.openjfx + javafx-web + 21 + + + org.openjfx + javafx-swing + 21 + + + org.openjfx + javafx-media + 21 + + + org.controlsfx + controlsfx + 11.1.2 + + + com.dlsc.formsfx + formsfx-core + 11.6.0 + + + org.openjfx + * + + + + + net.synedra + validatorfx + 0.4.0 + + + org.openjfx + * + + + + + org.kordamp.ikonli + ikonli-javafx + 12.3.1 + + + org.kordamp.bootstrapfx + bootstrapfx-core + 0.4.0 + + + eu.hansolo + tilesfx + 11.48 + + + org.openjfx + * + + + + + com.github.almasb + fxgl + 17.3 + + + org.openjfx + * + + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + \ No newline at end of file diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..c30dce6 --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,22 @@ +module me.openautonomousconnection.browser { + requires javafx.controls; + requires javafx.fxml; + requires javafx.web; + + requires org.controlsfx.controls; + requires com.dlsc.formsfx; + requires net.synedra.validatorfx; + requires org.kordamp.ikonli.javafx; + requires org.kordamp.bootstrapfx.core; + requires eu.hansolo.tilesfx; + requires com.almasb.fxgl.all; + requires java.desktop; + requires java.sql; + requires protocol; + requires unlegitlibrary; + + exports org.openautonomousconnection.browser; + opens org.openautonomousconnection.browser to javafx.fxml; + exports org.openautonomousconnection.browser.controller; + opens org.openautonomousconnection.browser.controller to javafx.fxml; +} \ No newline at end of file diff --git a/src/main/java/org/openautonomousconnection/browser/Client.java b/src/main/java/org/openautonomousconnection/browser/Client.java new file mode 100644 index 0000000..0c6fc90 --- /dev/null +++ b/src/main/java/org/openautonomousconnection/browser/Client.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 Open Autonomous Connection - All Rights Reserved + * + * You are unauthorized to remove this copyright. + * You have to give Credits to the Author in your project and link this GitHub site: https://github.com/Open-Autonomous-Connection + * See LICENSE-File if exists + */ + +package org.openautonomousconnection.browser; + +import org.openautonomousconnection.browser.controller.Browser; +import org.openautonomousconnection.protocol.domain.Domain; +import org.openautonomousconnection.protocol.side.ProtocolClient; +import org.openautonomousconnection.protocol.utils.SiteType; + +public class Client extends ProtocolClient { + @Override + public void handleHTMLContent(SiteType siteType, Domain domain, String htmlContent) { + Browser.getInstance().loadHtml(siteType, domain, htmlContent); + } + + @Override + public void handleMessage(String message) { + MessageDialog.show(message); + } +} diff --git a/src/main/java/org/openautonomousconnection/browser/Config.java b/src/main/java/org/openautonomousconnection/browser/Config.java new file mode 100644 index 0000000..9f0f1ad --- /dev/null +++ b/src/main/java/org/openautonomousconnection/browser/Config.java @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2024 Open Autonomous Connection - All Rights Reserved + * + * You are unauthorized to remove this copyright. + * You have to give Credits to the Author in your project and link this GitHub site: https://github.com/Open-Autonomous-Connection + * See LICENSE-File if exists + */ + +package org.openautonomousconnection.browser; + +import dev.unlegitdqrk.unlegitlibrary.file.ConfigurationManager; +import org.openautonomousconnection.protocol.utils.APIInformation; + +import java.io.File; +import java.io.IOException; + +public class Config { + + private static File configFile = new File("./config.txt"); + private static ConfigurationManager config; + private static APIInformation apiInformation; + + public static void init() throws IOException { + if (!configFile.exists()) configFile.createNewFile(); + config = new ConfigurationManager(configFile); + config.loadProperties(); + + if (!config.isSet("dns.host")) config.set("dns.host", "45.155.173.50"); + if (!config.isSet("dns.port")) config.set("dns.port", 9382); + + if (!config.isSet("api.username")) config.set("api.username", ""); + if (!config.isSet("api.application")) config.set("api.application", ""); + if (!config.isSet("api.key")) config.set("api.key", ""); + + config.saveProperties(); + apiInformation = new APIInformation(getAPIUsername(), getAPIApplication(), getAPIKey()); + } + + public static APIInformation getApiInformation() { + return apiInformation; + } + + public static String getDNSHost() { + return config.getString("dns.host"); + } + + public static void setDNSHost(String host) throws IOException { + config.set("dns.host", host); + config.saveProperties(); + } + + public static int getDNSPort() { + return config.getInt("dns.port"); + } + + public static void setDNSPort(int port) throws IOException { + config.set("dns.port", port); + config.saveProperties(); + } + + public static String getAPIUsername() { + return config.getString("api.username"); + } + + public static void setAPIUsername(String username) throws IOException { + config.set("api.username", username); + config.saveProperties(); + } + + public static String getAPIApplication() { + return config.getString("api.application"); + } + + public static void setAPIApplication(String application) throws IOException { + config.set("api.application", application); + config.saveProperties(); + } + + public static String getAPIKey() { + return config.getString("api.key"); + } + + public static void setAPIKey(String key) throws IOException { + config.set("api.key", key); + config.saveProperties(); + } +} diff --git a/src/main/java/org/openautonomousconnection/browser/Main.java b/src/main/java/org/openautonomousconnection/browser/Main.java new file mode 100644 index 0000000..ac5d319 --- /dev/null +++ b/src/main/java/org/openautonomousconnection/browser/Main.java @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2024 Open Autonomous Connection - All Rights Reserved + * + * You are unauthorized to remove this copyright. + * You have to give Credits to the Author in your project and link this GitHub site: https://github.com/Open-Autonomous-Connection + * See LICENSE-File if exists + */ + +package org.openautonomousconnection.browser; + +import javafx.application.Application; +import javafx.application.Platform; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; +import org.openautonomousconnection.browser.controller.Browser; +import org.openautonomousconnection.browser.history.HistoryManager; +import org.openautonomousconnection.protocol.ProtocolBridge; +import org.openautonomousconnection.protocol.ProtocolSettings; +import org.openautonomousconnection.protocol.ProtocolVersion; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; + +public class Main extends Application { + public static ProtocolBridge protocolBridge; + private static final Thread shutdownThread = new Thread(shutdown()); + private static Runnable shutdown() { + return () -> { + try { + if (protocolBridge == null) return; + protocolBridge.getProtocolClient().disconnectClient(); + } catch (IOException exception) { + exception.printStackTrace(); + } + }; + } + + public static void main(String[] args) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { + try { + Config.init(); + } catch (IOException exception) { + exception.printStackTrace(); + return; + } + + HistoryManager.loadHistory(); + + String host = Config.getDNSHost(); + int port = Config.getDNSPort(); + + final ProtocolSettings protocolSettings = new ProtocolSettings(); + protocolSettings.host = host; + protocolSettings.port = port; + + protocolBridge = new ProtocolBridge(ProtocolVersion.PV_1_0_0, protocolSettings, new Client()); + protocolBridge.getProtocolClient().setProtocolBridge(protocolBridge); + + Runtime.getRuntime().addShutdownHook(shutdownThread); + + try { + protocolBridge.getProtocolClient().startClient(); + } catch (Exception exception) { + exception.printStackTrace(); + + Platform.runLater(() -> { + try { + Parent root2 = FXMLLoader.load(MessageDialog.class.getResource("MessageDialog.fxml")); + Stage stage2 = new Stage(); + stage2.setTitle("Open Autonomous Connection - DNS Message Dialog"); + stage2.setScene(new Scene(root2)); + stage2.setResizable(false); + stage2.requestFocus(); + stage2.show(); + MessageDialog.getInstance().txtServer.setText("Failed to connect to DNS-Server! Please try again later.\n" + exception.getMessage()); + } catch (IOException exception2) { + exception2.printStackTrace(); + return; + } + }); + + launch(args); + return; + } + } + + @Override + public void start(Stage stage) throws Exception { + Parent root = FXMLLoader.load(getClass().getResource("Browser.fxml")); + Scene scene = new Scene(root); + stage.setTitle("Open Autonomous Connection"); + stage.setScene(scene); + stage.show(); + stage.setOnCloseRequest(event -> shutdownThread.start()); + Browser.getInstance().setStage(stage); + + Platform.runLater(() -> { + try { + Parent root2 = FXMLLoader.load(MessageDialog.class.getResource("MessageDialog.fxml")); + Stage stage2 = new Stage(); + stage2.setTitle("Open Autonomous Connection - DNS Message Dialog"); + stage2.setScene(new Scene(root2)); + stage2.setResizable(false); + stage2.requestFocus(); + stage2.show(); + MessageDialog.getInstance().txtServer.setText("Please close this window now!"); + stage2.close(); + } catch (IOException exception) { + exception.printStackTrace(); + } + }); + } +} \ No newline at end of file diff --git a/src/main/java/org/openautonomousconnection/browser/MessageDialog.java b/src/main/java/org/openautonomousconnection/browser/MessageDialog.java new file mode 100644 index 0000000..56beaf8 --- /dev/null +++ b/src/main/java/org/openautonomousconnection/browser/MessageDialog.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Open Autonomous Connection - All Rights Reserved + * + * You are unauthorized to remove this copyright. + * You have to give Credits to the Author in your project and link this GitHub site: https://github.com/Open-Autonomous-Connection + * See LICENSE-File if exists + */ + +package org.openautonomousconnection.browser; + +import javafx.application.Platform; +import javafx.fxml.FXMLLoader; +import javafx.fxml.Initializable; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.stage.Stage; + +import java.io.IOException; +import java.net.URL; +import java.util.ResourceBundle; + +public class MessageDialog implements Initializable { + private static MessageDialog instance; + public Label txtServer; + + public static MessageDialog getInstance() { + return instance; + } + + public static void show(String text) { + Platform.runLater(() -> { + try { + Parent root = FXMLLoader.load(MessageDialog.class.getResource("MessageDialog.fxml")); + Stage stage = new Stage(); + stage.setTitle("Open Autonomous Connection - DNS Message Dialog"); + stage.setScene(new Scene(root)); + stage.setResizable(false); + stage.requestFocus(); + stage.show(); + + MessageDialog.getInstance().txtServer.setText(text); + } catch (IOException exception) { + exception.printStackTrace(); + } + }); + } + + @Override + public void initialize(URL url, ResourceBundle resourceBundle) { + instance = this; + } +} diff --git a/src/main/java/org/openautonomousconnection/browser/controller/Browser.java b/src/main/java/org/openautonomousconnection/browser/controller/Browser.java new file mode 100644 index 0000000..1224d06 --- /dev/null +++ b/src/main/java/org/openautonomousconnection/browser/controller/Browser.java @@ -0,0 +1,318 @@ +/* + * Copyright (C) 2024 Open Autonomous Connection - All Rights Reserved + * + * You are unauthorized to remove this copyright. + * You have to give Credits to the Author in your project and link this GitHub site: https://github.com/Open-Autonomous-Connection + * See LICENSE-File if exists + */ + +package org.openautonomousconnection.browser.controller; + +import javafx.application.Platform; +import javafx.beans.value.ChangeListener; +import javafx.beans.value.ObservableValue; +import javafx.concurrent.Worker; +import javafx.event.ActionEvent; +import javafx.fxml.FXMLLoader; +import javafx.fxml.Initializable; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.TextField; +import javafx.scene.web.WebEngine; +import javafx.scene.web.WebView; +import javafx.stage.Stage; +import org.openautonomousconnection.browser.Main; +import org.openautonomousconnection.browser.MessageDialog; +import org.openautonomousconnection.browser.history.HistoryManager; +import org.openautonomousconnection.protocol.domain.Domain; +import org.openautonomousconnection.protocol.domain.LocalDomain; +import org.openautonomousconnection.protocol.domain.RequestDomain; +import org.openautonomousconnection.protocol.utils.DomainUtils; +import org.openautonomousconnection.protocol.utils.SiteType; +import org.openautonomousconnection.protocol.utils.WebsitesContent; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.events.EventListener; +import org.w3c.dom.events.EventTarget; + +import java.awt.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ResourceBundle; + +public class Browser implements Initializable { + public static Browser instance; + public Button btnHome; + public Button btnBackward; + public Button btnReload; + public Button btnGo; + public Button btnForward; + public Button btnSettings; + public TextField domainInput; + public Button btnHistory; + public WebView webView; + + public static Browser getInstance() { + return instance; + } + + public void onHistoryClick(ActionEvent actionEvent) { + Platform.runLater(() -> { + try { + Parent root = FXMLLoader.load(getClass().getResource("History.fxml")); + Stage stage = new Stage(); + stage.setTitle("Open Autonomous Connection - Settings"); + stage.setScene(new Scene(root)); + stage.setResizable(false); + stage.requestFocus(); + stage.show(); + } catch (IOException exception) { + exception.printStackTrace(); + } + }); + } + + public void onForwardClick(ActionEvent actionEvent) { + try { + navigate(HistoryManager.navigateForward()); + } catch (URISyntaxException | IOException | ClassNotFoundException exception) { + exception.printStackTrace(); + } + } + + public void onBackwardClick(ActionEvent actionEvent) { + try { + navigate(HistoryManager.navigateBack()); + } catch (URISyntaxException | IOException | ClassNotFoundException exception) { + exception.printStackTrace(); + } + } + + public void onHomeClick(ActionEvent actionEvent) { + try { + navigate(SiteType.PUBLIC.name + "://browser-start.root/"); + } catch (IOException | URISyntaxException | ClassNotFoundException exception) { + exception.printStackTrace(); + } + } + + public void onReloadClick(ActionEvent actionEvent) { + try { + navigate(domainInput.getText()); + } catch (URISyntaxException | IOException | ClassNotFoundException exception) { + exception.printStackTrace(); + } + } + + public void onGoClick(ActionEvent actionEvent) { + try { + navigate(domainInput.getText()); + HistoryManager.addHistoryItem(domainInput.getText()); + } catch (URISyntaxException | IOException | ClassNotFoundException exception) { + exception.printStackTrace(); + } + } + + public void navigate(String url) throws IOException, URISyntaxException, ClassNotFoundException { + if (url == null) return; + if (url.isEmpty()) return; + if (url.isBlank()) return; + + if (url.startsWith(SiteType.LOCAL.name)) { + loadLocalDomain(url); + return; + } + + if (url.startsWith("http://")) url = url.substring("http://".length()); + if (url.startsWith("https://")) url = url.substring("https://".length()); + if (url.startsWith("www.")) url = url.substring("www.".length()); + if (!url.startsWith(SiteType.PUBLIC.name)) url = SiteType.PUBLIC.name + "://" + url; + + String tld = DomainUtils.getTopLevelDomain(url); + String name = DomainUtils.getDomainName(url); + String path = DomainUtils.getPath(url); + + // TODO: Navigate + Main.protocolBridge.getProtocolClient().resolveSite(new RequestDomain(name, tld, path)); + } + + private void loadLocalDomain(String url) throws IOException, URISyntaxException, ClassNotFoundException { + if (url == null) return; + if (url.isEmpty()) return; + if (url.isBlank()) return; + + if (url.startsWith(SiteType.PUBLIC.name) || url.startsWith("http://") || url.startsWith("Https://") || url.startsWith("www.")) { + navigate(url); + return; + } + + if (!url.startsWith(SiteType.LOCAL.name)) url = SiteType.LOCAL.name + "://" + url; + File file = new File(url.substring((SiteType.LOCAL.name + "://").length())); + + if (!file.exists()) { + loadHtml(SiteType.PROTOCOL, new LocalDomain("file-not-found", "html", ""), WebsitesContent.FILE_NOT_FOUND); + return; + } + + loadFile(file); + } + + public void onSettingsClick(ActionEvent actionEvent) { + Platform.runLater(() -> { + try { + Parent root = FXMLLoader.load(getClass().getResource("Settings.fxml")); + Stage stage = new Stage(); + stage.setTitle("Open Autonomous Connection - Settings"); + stage.setScene(new Scene(root)); + stage.setResizable(false); + stage.requestFocus(); + stage.show(); + } catch (IOException exception) { + exception.printStackTrace(); + } + }); + } + + private Stage stage; + + public final void setStage(Stage stage) { + this.stage = stage; + stage.setTitle("Open Autonomous Connection - " + getTitle(webView.getEngine())); + } + + private String getTitle(WebEngine webEngine) { + Document doc = webEngine.getDocument(); + if (doc == null) return domainInput.getText(); + NodeList heads = doc.getElementsByTagName("head"); + String titleText = webEngine.getLocation() ; // use location if page does not define a title + if (heads.getLength() > 0) { + Element head = (Element)heads.item(0); + NodeList titles = head.getElementsByTagName("title"); + if (titles.getLength() > 0) { + Node title = titles.item(0); + titleText = title.getTextContent(); + } + } + return titleText ; + } + + @Override + public void initialize(URL url, ResourceBundle resourceBundle) { + instance = this; + btnGo.fire(); + + try { + URL oracle = new URL("https://raw.githubusercontent.com/Open-Autonomous-Connection/browser/master/src/resources/version.txt"); + + BufferedReader in = new BufferedReader(new InputStreamReader(oracle.openStream())); + String version = ""; + String inputLine; + + while ((inputLine = in.readLine()) != null) version += inputLine; + if (!version.equalsIgnoreCase(Files.readString(Path.of(Main.class.getResource("../../../version.txt").toURI())))) { + System.out.println(); + System.out.println("==============================================="); + System.out.println("IMPORTANT: A NEW VERSION IS PUBLISHED ON GITHUB"); + System.out.println("==============================================="); + System.out.println(); + + MessageDialog.show("A new version is published on GitHub:\nhttps://github.com/Open-Autonomous-Connection/"); + } + } catch (IOException | URISyntaxException exception) { + System.out.println(); + System.out.println("==============================================="); + System.out.println("IMPORTANT: VERSION CHECK COULD NOT COMPLETED! VISIT OUR GITHUB"); + System.out.println("https://github.com/Open-Autonomous-Connection"); + System.out.println("==============================================="); + System.out.println(); + + MessageDialog.show("Version check could not completed! Visit our GitHub:\nhttps://github.com/Open-Autonomous-Connection/"); + } + + webView.getEngine().getLoadWorker().stateProperty().addListener((observableValue, oldState, newState) -> { + if (newState == Worker.State.SUCCEEDED) { + EventListener eventListener = evt -> { + String type = evt.getType(); + + if (type.equalsIgnoreCase("click")) { + String href = ((Element) evt.getTarget()).getAttribute("href"); + + try { + if (href.startsWith("http") || href.startsWith("https://")) { + if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) Desktop.getDesktop().browse(new URI(href)); + else MessageDialog.show("Failed to load Website " + href); + + return; + } + + if (href.startsWith(SiteType.PUBLIC.name + "://")) navigate(href); + else { + String base = "oac://" + DomainUtils.getDomainName(domainInput.getText()) + "." + DomainUtils.getTopLevelDomain(domainInput.getText()) + "/"; + navigate(base + (href.startsWith("/") ? href.substring("/".length()) : href)); + } + } catch (IOException | URISyntaxException | ClassNotFoundException exception) { + loadHtml(SiteType.PROTOCOL, new LocalDomain("error-occurred", "html", ""), WebsitesContent.ERROR_OCCURRED(exception.getMessage())); + } + } + }; + + Document doc = webView.getEngine().getDocument(); + NodeList nodeList = doc.getElementsByTagName("a"); + + for (int i = 0; i < nodeList.getLength(); i++) { + ((EventTarget) nodeList.item(i)).addEventListener("click", eventListener, false); + //((EventTarget) nodeList.item(i)).addEventListener(EVENT_TYPE_MOUSEOVER, listener, false); + //((EventTarget) nodeList.item(i)).addEventListener(EVENT_TYPE_MOUSEOVER, listener, false); + } + } + }); + + // TODO: Crash on header redirect. Fixing later +// webView.getEngine().locationProperty().addListener((obs, oldLocation, newLocation) -> { +// try { +// if (newLocation.startsWith("http") || newLocation.startsWith("https://")) { +// if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) Desktop.getDesktop().browse(new URI(newLocation)); +// else MessageDialog.show("Failed to load Website " + newLocation); +// +// return; +// } +// +// if (newLocation.startsWith(SiteType.PUBLIC.name + "://")) navigate(newLocation); +// else { +// String base = "oac://" + DomainUtils.getDomainName(domainInput.getText()) + "." + DomainUtils.getTopLevelDomain(domainInput.getText()) + "/"; +// navigate(base + (newLocation.startsWith("/") ? newLocation.substring("/".length()) : newLocation)); +// } +// } catch (IOException | URISyntaxException | ClassNotFoundException exception) { +// loadHtml(SiteType.PROTOCOL, new LocalDomain("error-occurred", "html", ""), WebsitesContent.ERROR_OCCURRED(exception.getMessage())); +// } +// }); + } + + public void loadFile(File file) { + domainInput.setText(SiteType.LOCAL.name + "://" + file.getAbsolutePath()); + + Platform.runLater(() -> { + webView.getEngine().load(file.toURI().toString()); + if (stage != null) stage.setTitle("Open Autonomous Connection - " + getTitle(webView.getEngine())); + }); + } + + public void loadHtml(SiteType siteType, Domain domain, String htmlContent) { + domainInput.setText(siteType.name + "://" + domain.name + "." + domain.topLevelDomain + "/" + domain.getPath()); + + Platform.runLater(() -> { + webView.getEngine().loadContent(htmlContent); + if (stage != null) stage.setTitle("Open Autonomous Connection - " + getTitle(webView.getEngine())); + }); + } +} diff --git a/src/main/java/org/openautonomousconnection/browser/controller/Settings.java b/src/main/java/org/openautonomousconnection/browser/controller/Settings.java new file mode 100644 index 0000000..cb22de1 --- /dev/null +++ b/src/main/java/org/openautonomousconnection/browser/controller/Settings.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Open Autonomous Connection - All Rights Reserved + * + * You are unauthorized to remove this copyright. + * You have to give Credits to the Author in your project and link this GitHub site: https://github.com/Open-Autonomous-Connection + * See LICENSE-File if exists + */ + +package org.openautonomousconnection.browser.controller; + +import javafx.event.ActionEvent; +import javafx.fxml.Initializable; +import javafx.scene.control.Button; +import javafx.scene.control.TextField; +import org.openautonomousconnection.browser.Config; +import org.openautonomousconnection.browser.MessageDialog; + +import java.io.IOException; +import java.net.URL; +import java.util.ResourceBundle; + +public class Settings implements Initializable { + public TextField hostInput; + public TextField portInput; + public Button btnSave; + public TextField usernameInput; + public TextField applicationInput; + public TextField apiKeyInput; + + public void onSaveClick(ActionEvent actionEvent) { + + try { + Integer.parseInt(portInput.getText()); + } catch (NumberFormatException ignored) { + MessageDialog.show("Please enter a valid port number"); + return; + } + + try { + Config.setDNSHost(hostInput.getText()); + Config.setDNSPort(Integer.parseInt(portInput.getText())); + Config.setAPIApplication(applicationInput.getText()); + Config.setAPIUsername(usernameInput.getText()); + Config.setAPIKey(apiKeyInput.getText()); + } catch (IOException exception) { + MessageDialog.show("Failed to save settings:\n" + exception.getMessage()); + return; + } + + MessageDialog.show("Browser need a restart"); + } + + @Override + public void initialize(URL url, ResourceBundle resourceBundle) { + hostInput.setText(Config.getDNSHost()); + portInput.setText(String.valueOf(Config.getDNSPort())); + usernameInput.setText(Config.getAPIUsername()); + applicationInput.setText(Config.getAPIApplication()); + apiKeyInput.setText(Config.getAPIKey()); + } +} diff --git a/src/main/java/org/openautonomousconnection/browser/history/HistoryItem.java b/src/main/java/org/openautonomousconnection/browser/history/HistoryItem.java new file mode 100644 index 0000000..bdaaf9f --- /dev/null +++ b/src/main/java/org/openautonomousconnection/browser/history/HistoryItem.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Open Autonomous Connection - All Rights Reserved + * + * You are unauthorized to remove this copyright. + * You have to give Credits to the Author in your project and link this GitHub site: https://github.com/Open-Autonomous-Connection + * See LICENSE-File if exists + */ + +package org.openautonomousconnection.browser.history; + +import java.io.Serializable; +import java.text.SimpleDateFormat; + +public class HistoryItem implements Serializable { + + private String url; + private SimpleDateFormat dateFormat; + + public HistoryItem(String url, SimpleDateFormat dateFormat) { + this.url = url; + this.dateFormat = dateFormat; + } + + public final String getUrl() { + return url; + } + + public final SimpleDateFormat getDateFormat() { + return dateFormat; + } +} \ No newline at end of file diff --git a/src/main/java/org/openautonomousconnection/browser/history/HistoryManager.java b/src/main/java/org/openautonomousconnection/browser/history/HistoryManager.java new file mode 100644 index 0000000..17c96ea --- /dev/null +++ b/src/main/java/org/openautonomousconnection/browser/history/HistoryManager.java @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2024 Open Autonomous Connection - All Rights Reserved + * + * You are unauthorized to remove this copyright. + * You have to give Credits to the Author in your project and link this GitHub site: https://github.com/Open-Autonomous-Connection + * See LICENSE-File if exists + */ + +package org.openautonomousconnection.browser.history; + +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; + +public class HistoryManager { + private static final File historyFile = new File("history.txt"); + private static List historyItems = new ArrayList<>(); + private static int currentPosition = -1; + + public static List getHistoryItems() { + return historyItems; + } + + public static void addHistoryItem(String url) { + if (currentPosition < historyItems.size() - 1) + historyItems.subList(currentPosition + 1, historyItems.size()).clear(); + + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); + + historyItems.add(new HistoryItem(url, dateFormat)); + currentPosition++; + + saveHistory(); + } + + public static void saveHistory() { + if (!historyFile.exists()) { + try { + historyFile.createNewFile(); + } catch (IOException exception) { + exception.printStackTrace(); + return; + } + } + + if (historyFile.length() == 0) return; + + try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(historyFile))) { + oos.writeObject(historyItems); + } catch (IOException exception) { + exception.printStackTrace(); + } + } + + public static void loadHistory() { + if (!historyFile.exists()) { + try { + historyFile.createNewFile(); + } catch (IOException exception) { + exception.printStackTrace(); + return; + } + } + + if (historyFile.length() == 0) return; + + try (ObjectInputStream ois = new ObjectInputStream(new FileInputStream(historyFile))) { + historyItems = (List) ois.readObject(); + currentPosition = historyItems.size() - 1; + } catch (IOException | ClassNotFoundException exception) { + exception.printStackTrace(); + } + } + + public static String navigateBack() { + if (currentPosition > 0) { + currentPosition--; + return historyItems.get(currentPosition).getUrl(); + } + + return null; + } + + public static String navigateForward() { + if (currentPosition < historyItems.size() - 1) { + currentPosition++; + return historyItems.get(currentPosition).getUrl(); + } + + return null; + } + + public static void clear() { + historyItems.clear(); + currentPosition = -1; + } +} diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d69f301 --- /dev/null +++ b/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: org.openautonomousconnection.browser.Main + diff --git a/src/main/resources/jogl/jogamp/README.jcef b/src/main/resources/jogl/jogamp/README.jcef new file mode 100644 index 0000000..5f8004d --- /dev/null +++ b/src/main/resources/jogl/jogamp/README.jcef @@ -0,0 +1,15 @@ +Name: Java™ libraries for 3D Graphics, Multimedia and Processing +Short Name: jogamp +URL: http://jogamp.org/ +Version: 2.2.4 (master@78f641de80d1c37cd61e5300eeba369c6aa9b1a1) +License: Mixed (see LICENSE.txt files) + +Description: +This library is used to provide OpenGL bindings. Download +jogamp-all-platforms.7z and copy files from the jar/ directory. + +See http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL for +related documentation. + +Local Modifications: +None. diff --git a/src/main/resources/jogl/jogamp/gluegen.LICENSE.txt b/src/main/resources/jogl/jogamp/gluegen.LICENSE.txt new file mode 100644 index 0000000..8be18df --- /dev/null +++ b/src/main/resources/jogl/jogamp/gluegen.LICENSE.txt @@ -0,0 +1,133 @@ + +The GlueGen source code is mostly licensed under the New BSD 2-clause license, +however it contains other licensed material as well. + +Below you find a detailed list of licenses used in this project. + ++++ + +The content of folder 'make/lib' contains build-time only +Java binaries (JAR) to ease the build setup. +Each JAR file has it's corresponding LICENSE file containing the +source location and license text. None of these binaries are contained in any way +by the generated and deployed GlueGen binaries. + ++++ + +L.1) The GlueGen source tree contains code from the JogAmp Community + which is covered by the Simplified BSD 2-clause license: + + Copyright 2010 JogAmp Community. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of + conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those of the + authors and should not be interpreted as representing official policies, either expressed + or implied, of JogAmp Community. + + You can address the JogAmp Community via: + Web http://jogamp.org/ + Forum/Mailinglist http://jogamp.762907.n3.nabble.com/ + Chatrooms + IRC irc.freenode.net #jogamp + Jabber conference.jabber.org room: jogamp (deprecated!) + Repository http://jogamp.org/git/ + Email mediastream _at_ jogamp _dot_ org + + +L.2) The GlueGen source tree contains code from Sun Microsystems, Inc. + which is covered by the New BSD 3-clause license: + + Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + - Redistribution of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistribution in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + Neither the name of Sun Microsystems, Inc. or the names of + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + This software is provided "AS IS," without a warranty of any kind. ALL + EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, + INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN + MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR + DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR + ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR + DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE + DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, + ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF + SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + You acknowledge that this software is not designed or intended for use + in the design, construction, operation or maintenance of any nuclear + facility. + +L.3) The GlueGen source tree contains CGRAM http://www.antlr.org/grammar/cgram/, + a ANSI-C parser implementation using ANTLR, which is being used + in the compile time part only. + It is covered by the Original BSD 4-clause license: + + Copyright (c) 1998-2000, Non, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + All advertising materials mentioning features or use of this + software must display the following acknowledgement: + + This product includes software developed by Non, Inc. and + its contributors. + + Neither name of the company nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS + IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COMPANY OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + diff --git a/src/main/resources/jogl/jogamp/jogl.LICENSE.txt b/src/main/resources/jogl/jogamp/jogl.LICENSE.txt new file mode 100644 index 0000000..02d605c --- /dev/null +++ b/src/main/resources/jogl/jogamp/jogl.LICENSE.txt @@ -0,0 +1,430 @@ +The JOGL source code is mostly licensed under the 'New BSD 2-Clause License', +however it contains other licensed material as well. + +Other licensed material is compatible with the 'New BSD 2-Clause License', +if not stated otherwise. + +'New BSD 2-Clause License' incompatible materials are optional, they are: + + A.7) The JOGL source tree _may_ contain code from Oculus VR, Inc. + which is covered by it's own permissive Oculus VR Rift SDK Software License. + (Optional, see A.7 below for details) + +Below you find a detailed list of licenses used in this project. + ++++ + +The content of folder 'make/lib' contains build- and test-time only +Java binaries (JAR) to ease the build setup. +Each JAR file has it's corresponding LICENSE file containing the +source location and license text. None of these binaries are contained in any way +by the generated and deployed JOGL binaries. + ++++ + +L.1) The JOGL source tree contains code from the JogAmp Community + which is covered by the Simplified BSD 2-clause license: + + Copyright 2010 JogAmp Community. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of + conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those of the + authors and should not be interpreted as representing official policies, either expressed + or implied, of JogAmp Community. + + You can address the JogAmp Community via: + Web http://jogamp.org/ + Forum/Mailinglist http://forum.jogamp.org + Chatrooms + IRC irc.freenode.net #jogamp + Jabber conference.jabber.org room: jogamp (deprecated!) + Repository http://jogamp.org/git/ + Email mediastream _at_ jogamp _dot_ org + + +L.2) The JOGL source tree contains code from Sun Microsystems, Inc. + which is covered by the New BSD 3-clause license: + + Copyright (c) 2003-2009 Sun Microsystems, Inc. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + - Redistribution of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistribution in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + Neither the name of Sun Microsystems, Inc. or the names of + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + This software is provided "AS IS," without a warranty of any kind. ALL + EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, + INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN + MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR + DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR + ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR + DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE + DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, + ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF + SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + You acknowledge that this software is not designed or intended for use + in the design, construction, operation or maintenance of any nuclear + facility. + +L.3) The JOGL source tree contains code ported from the OpenGL sample + implementation by Silicon Graphics, Inc. This code is licensed under + the SGI Free Software License B, Version 2.0 + + License Applicability. Except to the extent portions of this file are + made subject to an alternative license as permitted in the SGI Free + Software License B, Version 2.0 (the "License"), the contents of this + file are subject only to the provisions of the License. You may not use + this file except in compliance with the License. You may obtain a copy + of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 + Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: + + http://oss.sgi.com/projects/FreeB + http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf + Or within this repository: doc/licenses/SGIFreeSWLicB.2.0.pdf + + Note that, as provided in the License, the Software is distributed on an + "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS + DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND + CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + PARTICULAR PURPOSE, AND NON-INFRINGEMENT. + +L.4) The JOGL source tree contains code from the LWJGL project which is + similarly covered by the New BSD 3-clause license: + + Copyright (c) 2002-2004 LWJGL Project + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of 'LWJGL' nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +L.5) The JOGL source tree also contains a Java port of Brian Paul's Tile + Rendering library, used with permission of the author under the + New BSD 3-clause license instead of the original LGPL: + + Copyright (c) 1997-2005 Brian Paul. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + - Redistribution of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistribution in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + Neither the name of Brian Paul or the names of contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + This software is provided "AS IS," without a warranty of any + kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + EXCLUDED. THE COPYRIGHT HOLDERS AND CONTRIBUTORS SHALL NOT BE + LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, + MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO + EVENT WILL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY + LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + INABILITY TO USE THIS SOFTWARE, EVEN IF THE COPYRIGHT HOLDERS OR + CONTRIBUTORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +A.1) The JOGL source tree also contains header files from Khronos, + reflecting OpenKODE, EGL, OpenGL ES1, OpenGL ES2 and OpenGL. + + http://www.khronos.org/legal/license/ + + Files: + make/stub_includes/opengl/** + make/stub_includes/egl/** + make/stub_includes/khr/** + make/stub_includes/openmax/** + + Copyright (c) 2007-2010 The Khronos Group Inc. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and/or associated documentation files (the + "Materials"), to deal in the Materials without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Materials, and to + permit persons to whom the Materials are furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Materials. + + THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + + +A.2) The JOGL source tree contains code from The Apache Software Foundation + which is covered by the Apache License Version 2.0 + + Apache Harmony - Open Source Java SE + ===================================== + + + + Author: The Apache Software Foundation (http://www.apache.org/). + + Copyright 2006, 2010 The Apache Software Foundation. + + Apache License Version 2.0, January 2004 + http://www.apache.org/licenses/LICENSE-2.0 + Or within this repository: doc/licenses/Apache.LICENSE-2.0 + + Files: + src/jogamp/graph/geom/plane/AffineTransform.java + src/jogamp/graph/geom/plane/IllegalPathStateException.java + src/jogamp/graph/geom/plane/NoninvertibleTransformException.java + src/jogamp/graph/geom/plane/PathIterator.java + src/jogamp/graph/geom/plane/Path2D.java + src/jogamp/graph/math/plane/Crossing.java + src/org/apache/harmony/misc/HashCode.java + + +A.3) The JOGL source tree contains code from David Schweinsberg + which is covered by the Apache License Version 1.1 and Version 2.0 + + Typecast + ======== + + Typecast is a font development environment for OpenType font technology. + + + + Author: David Schweinsberg + + Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. + + Apache Licenses + http://www.apache.org/licenses/ + + Apache License Version 1.1 + http://www.apache.org/licenses/LICENSE-1.1 + Or within this repository: doc/licenses/Apache.LICENSE-1.1 + Files: + src/jogl/classes/jogamp/graph/font/typecast/ot/* + src/jogl/classes/jogamp/graph/font/typecast/ot/table/* + + Apache License Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + Or within this repository: doc/licenses/Apache.LICENSE-2.0 + src/jogl/classes/jogamp/graph/font/typecast/ot/* + src/jogl/classes/jogamp/graph/font/typecast/ot/mac/* + src/jogl/classes/jogamp/graph/font/typecast/ot/table/* + src/jogl/classes/jogamp/graph/font/typecast/tt/engine/* + +A.4) The JOGL source tree contains fonts from Ubuntu + which is covered by the UBUNTU FONT LICENCE Version 1.0 + + Ubuntu Font Family + ================== + + The Ubuntu Font Family are libre fonts funded by Canonical Ltd on behalf of the Ubuntu project. + + + + Copyright 2010 Canonical Ltd. + Licensed under the Ubuntu Font Licence 1.0 + + Author: Canonical Ltd., Dalton Maag + + UBUNTU FONT LICENCE + Version 1.0 + http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt + Or within this repository: doc/licenses/ubuntu-font-licence-1.0.txt + + Files: + src/jogamp/graph/font/fonts/ubuntu/* + +A.5) The JOGL source tree also contains header files from NVIDIA, + reflecting Cg. + + Files: + make/stub_includes/cg/CG/** + + Copyright (c) 2002, NVIDIA Corporation + + NVIDIA Corporation("NVIDIA") supplies this software to you in consideration + of your agreement to the following terms, and your use, installation, + modification or redistribution of this NVIDIA software constitutes + acceptance of these terms. If you do not agree with these terms, please do + not use, install, modify or redistribute this NVIDIA software. + + In consideration of your agreement to abide by the following terms, and + subject to these terms, NVIDIA grants you a personal, non-exclusive license, + under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA + Software"), to use, reproduce, modify and redistribute the NVIDIA + Software, with or without modifications, in source and/or binary forms; + provided that if you redistribute the NVIDIA Software, you must retain the + copyright notice of NVIDIA, this notice and the following text and + disclaimers in all such redistributions of the NVIDIA Software. Neither the + name, trademarks, service marks nor logos of NVIDIA Corporation may be used + to endorse or promote products derived from the NVIDIA Software without + specific prior written permission from NVIDIA. Except as expressly stated + in this notice, no other rights or licenses express or implied, are granted + by NVIDIA herein, including but not limited to any patent rights that may be + infringed by your derivative works or by other works in which the NVIDIA + Software may be incorporated. No hardware is licensed hereunder. + + THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING + WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION + EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. + + IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, + EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST + PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, + REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, + HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING + NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +A.6) The JOGL source tree contains code from Hernan J. Gonzalez and Shawn Hartsock + which is covered by the Apache License Version 2.0 + + PNGJ + ==== + + PNGJ: Java library for reading and writing PNG images. + + Version 1.12 (3 Dec 2012) + + + + Author: Hernan J. Gonzalez and Shawn Hartsock + + Copyright (C) 2004 The Apache Software Foundation. All rights reserved. + + Apache Licenses + http://www.apache.org/licenses/ + + Apache License Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + Or within this repository: doc/licenses/Apache.LICENSE-2.0 + src/jogl/classes/jogamp/opengl/util/pngj/** + + +A.7) The JOGL source tree _may_ contain code from Oculus VR, Inc. + which is covered by it's own permissive Oculus VR Rift SDK Software License. + + This code _can_ be included to produce a binding + and hence support for the Oculus VR Rift. + + The code is included _and_ it's build artifacts will be released, + if the git sub-module oculusvr-sdk is included in the jogl source repository + as true for current official JogAmp builds and releases! + + If using JogAmp JOGL builds with oculusvr-sdk support, + but the user prefers to _not_ use it for license or other reasons, + the user can simply remove the artifacts 'jar/atomics/oculusvr*jar'. + No other produced artifact is affected. + + While the Oculus VR Rift SDK Software License is permissive, + it's differences to the New BSD license shall be mentioned, see below! + + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + Copyright © 2014 Oculus VR, Inc. All rights reserved. + + Oculus VR, Inc. Software Development Kit License Agreement + + Human-Readable Summary: + + - You are Free to: + + - Use, modify, and distribute the Oculus VR Rift SDK in source and binary + form with your applications/software. + + - With the Following Restrictions: + + - You can only distribute or re-distribute the source code to LibOVR in + whole, not in part. + + - Modifications to the Oculus VR Rift SDK in source or binary form must + be shared with Oculus VR. + + - If your applications cause health and safety issues, you may lose your + right to use the Oculus VR Rift SDK, including LibOVR. + + - The Oculus VR Rift SDK may not be used to interface with unapproved commercial + virtual reality mobile or non-mobile products or hardware. + + - This human-readable Summary is not a license. It is simply a convenient + reference for understanding the full Oculus VR Rift SDK License Agreement. + The Summary is written as a user-friendly interface to the full Oculus VR Rift + SDK License below. This Summary itself has no legal value, and its contents do + not appear in the actual license. + + Full-length Legal Copy may be found at: + http://www.oculusvr.com/licenses/LICENSE-3.1 + http://jogamp.org/git/?p=oculusvr-sdk.git;a=blob;f=LICENSE.txt;hb=HEAD + Or within this repository: oculusvr-sdk/LICENSE.txt + diff --git a/src/main/resources/org/openautonomousconnection/browser/Browser.fxml b/src/main/resources/org/openautonomousconnection/browser/Browser.fxml new file mode 100644 index 0000000..6716b0c --- /dev/null +++ b/src/main/resources/org/openautonomousconnection/browser/Browser.fxml @@ -0,0 +1,24 @@ + + + + + + + + + + +