mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-10-29 19:57:28 +00:00
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:
parent
7c8533dddb
commit
b3131e3911
28
core/pom.xml
28
core/pom.xml
@ -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>
|
||||
|
||||
@ -16,71 +16,86 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* Constructs a new LobobrowserViewer
|
||||
*/
|
||||
public EmbeddedBrowserViewer() {
|
||||
browser = new Browser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of "Back"-button
|
||||
*/
|
||||
@Override
|
||||
public void goBack() {
|
||||
browser.goBack();
|
||||
}
|
||||
private static final long serialVersionUID = -8055149462713514766L;
|
||||
private FramePanel browser;
|
||||
|
||||
/**
|
||||
* Initialization of the BrowserViewer
|
||||
*/
|
||||
@Override
|
||||
public void initializeBrowser() {
|
||||
this.setLayout(new BorderLayout());
|
||||
/**
|
||||
* Constructs a new LobobrowserViewer
|
||||
*/
|
||||
public EmbeddedBrowserViewer() {
|
||||
LookAndFeel laf = UIManager.getLookAndFeel();
|
||||
|
||||
final BrowserView view = new BrowserView( browser );
|
||||
this.add(view, BorderLayout.CENTER);
|
||||
}
|
||||
browser = new FramePanel();
|
||||
//substance look and feel
|
||||
try {
|
||||
UIManager.setLookAndFeel(laf);
|
||||
}
|
||||
catch (UnsupportedLookAndFeelException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
browser.addContentListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the given URL
|
||||
*/
|
||||
@Override
|
||||
public void loadURL(String url) {
|
||||
browser.loadURL( url );
|
||||
}
|
||||
/**
|
||||
* Implementation of "Back"-button
|
||||
*/
|
||||
public void goBack() {
|
||||
browser.back();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 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();
|
||||
viewer.initializeBrowser();
|
||||
JFrame frame = new JFrame("Test");
|
||||
/**
|
||||
* Initialization of the BrowserViewer
|
||||
*/
|
||||
public void initializeBrowser() {
|
||||
this.setLayout(new BorderLayout());
|
||||
this.add(browser, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the given URL
|
||||
*/
|
||||
public void loadURL(String 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);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
EmbeddedBrowserViewer viewer = new EmbeddedBrowserViewer();
|
||||
viewer.initializeBrowser();
|
||||
JFrame frame = new JFrame("Test");
|
||||
|
||||
frame.getContentPane().setLayout(new BorderLayout());
|
||||
frame.getContentPane().add(viewer, BorderLayout.CENTER);
|
||||
frame.setVisible(true);
|
||||
frame.pack();
|
||||
frame.setVisible(true);
|
||||
frame.pack();
|
||||
frame.setSize(600, 400);
|
||||
viewer.loadURL("http://igniterealtime.org");
|
||||
}
|
||||
viewer.loadURL("http://igniterealtime.org");
|
||||
}
|
||||
}
|
||||
|
||||
@ -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" />
|
||||
|
||||
@ -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;
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user