SPARK-2132: Replace JxBrowser with Lobobrowser

This commit reverts back the change from Lobobrowser to JxBrowser, as we failed to get a license for JxBrowser.

As a result, the Meet plugin (which depends features not supported by Lobobrowser) was excluded from the Maven project.
This commit is contained in:
Guus der Kinderen 2020-08-02 22:44:08 +02:00
parent 7c8533dddb
commit b3131e3911
5 changed files with 74 additions and 103 deletions

View File

@ -179,27 +179,9 @@
</dependency>
<dependency>
<groupId>com.teamdev.jxbrowser</groupId>
<artifactId>jxbrowser-win</artifactId>
<version>6.20</version>
</dependency>
<dependency>
<groupId>com.teamdev.jxbrowser</groupId>
<artifactId>jxbrowser-linux32</artifactId>
<version>6.14.2</version>
</dependency>
<dependency>
<groupId>com.teamdev.jxbrowser</groupId>
<artifactId>jxbrowser-linux64</artifactId>
<version>6.23.1</version>
</dependency>
<dependency>
<groupId>com.teamdev.jxbrowser</groupId>
<artifactId>jxbrowser-mac</artifactId>
<version>6.23.1</version>
<groupId>org.lobobrowser</groupId>
<artifactId>LoboBrowser</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
@ -257,10 +239,6 @@
<id>ej-technologies</id>
<url>https://maven.ej-technologies.com/repository/</url>
</repository>
<repository>
<id>com.teamdev</id>
<url>https://maven.teamdev.com/repository/products</url>
</repository>
</repositories>
</project>

View File

@ -16,60 +16,75 @@
package org.jivesoftware.spark.component.browser;
import java.awt.BorderLayout;
import java.net.MalformedURLException;
import javax.swing.JFrame;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import com.teamdev.jxbrowser.chromium.*;
import com.teamdev.jxbrowser.chromium.swing.BrowserView;
import org.lobobrowser.gui.ContentEvent;
import org.lobobrowser.gui.ContentListener;
import org.lobobrowser.gui.FramePanel;
public class EmbeddedBrowserViewer extends BrowserViewer {
public class EmbeddedBrowserViewer extends BrowserViewer implements ContentListener {
private static final long serialVersionUID = -8055149462713514766L;
private Browser browser;
private FramePanel browser;
/**
* Constructs a new LobobrowserViewer
*/
public EmbeddedBrowserViewer() {
browser = new Browser();
LookAndFeel laf = UIManager.getLookAndFeel();
browser = new FramePanel();
//substance look and feel
try {
UIManager.setLookAndFeel(laf);
}
catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
browser.addContentListener(this);
}
/**
* Implementation of "Back"-button
*/
@Override
public void goBack() {
browser.goBack();
browser.back();
}
/**
* Initialization of the BrowserViewer
*/
@Override
public void initializeBrowser() {
this.setLayout(new BorderLayout());
final BrowserView view = new BrowserView( browser );
this.add(view, BorderLayout.CENTER);
this.add(browser, BorderLayout.CENTER);
}
/**
* Load the given URL
*/
@Override
public void loadURL(String url) {
browser.loadURL( url );
try {
browser.navigate(url);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
// /**
// * React to an event by updating the address bar
// */
// public void contentSet(ContentEvent event) {
// if (browser == null || browser.getCurrentNavigationEntry() == null) {
// return;
// }
// String url = browser.getCurrentNavigationEntry().getUrl().toExternalForm();
// documentLoaded(url);
// }
/**
* React to an event by updating the address bar
*/
public void contentSet(ContentEvent event) {
if (browser == null || browser.getCurrentNavigationEntry() == null) {
return;
}
String url = browser.getCurrentNavigationEntry().getUrl().toExternalForm();
documentLoaded(url);
}
public static void main(String[] args) {
EmbeddedBrowserViewer viewer = new EmbeddedBrowserViewer();

View File

@ -576,12 +576,9 @@
<excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude>
<entry location="lib/jxbrowser-linux32-6.14.2.jar" fileType="regular" />
<entry location="lib/linux64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/linux" fileType="regular" />
<entry location="lib/mac" fileType="regular" />
<entry location="lib/jxbrowser-linux64-6.23.1.jar" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" />
<entry location="bin/startup.bat" fileType="regular" />
@ -599,10 +596,8 @@
<excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/mac" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" />
@ -621,13 +616,10 @@
<excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/jxbrowser-linux32-6.14.2.jar" fileType="regular" />
<entry location="lib/linux64" fileType="regular" />
<entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" />
<entry location="lib/linux" fileType="regular" />
<entry location="lib/jxbrowser-linux64-6.23.1.jar" fileType="regular" />
<entry location="plugins/flashing.jar" fileType="regular" />
<entry location="bin/startup.bat" fileType="regular" />
</exclude>
@ -645,10 +637,8 @@
<excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/mac" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" />
@ -671,10 +661,8 @@
<excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/mac" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" />
@ -706,10 +694,8 @@
<excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude>
<entry location="lib/jxbrowser-win-6.120.jar" fileType="regular" />
<entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/mac" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" />
@ -740,13 +726,10 @@
<excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/jxbrowser-linux32-6.14.2.jar" fileType="regular" />
<entry location="lib/linux64" fileType="regular" />
<entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" />
<entry location="lib/linux" fileType="regular" />
<entry location="lib/jxbrowser-linux64-6.23.1.jar" fileType="regular" />
<entry location="plugins/flashing.jar" fileType="regular" />
<entry location="bin/startup.bat" fileType="regular" />
</exclude>
@ -764,12 +747,9 @@
<excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude>
<entry location="lib/jxbrowser-linux32-6.14.2.jar" fileType="regular" />
<entry location="lib/linux64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/linux" fileType="regular" />
<entry location="lib/mac" fileType="regular" />
<entry location="lib/jxbrowser-linux64-6.23.1.jar" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" />
<entry location="bin/startup.bat" fileType="regular" />

View File

@ -17,8 +17,6 @@
package org.jivesoftware.spark.plugin.ofmeet;
import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.swing.BrowserView;
import org.jivesoftware.Spark;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.spark.SparkManager;

View File

@ -77,7 +77,7 @@
<module>plugins/flashing</module>
<module>plugins/growl</module>
<!--<module>plugins/jingle</module>-->
<module>plugins/meet</module>
<!--<module>plugins/meet</module>-->
<!--<module>plugins/otr</module>-->
<module>plugins/reversi</module>
<module>plugins/roar</module>