Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JBrowser Source Code Files
JBrowser Source Code Files are provided in the source package file.
You can download JBrowser source package as described in the previous tutorial and go to the "src" sub-folder to view Source Code files.
You can also browse JBrowser Source Code files below:
✍: FYIcenter
⏎ ru/atomation/jbrowser/impl/JBrowserURIContentListener.java
/** * No restrictions for this source. * * Author: CA>>> * Site: atomation.ru * Mail: Sashusik_EntXXI@Mail.ru */ package ru.atomation.jbrowser.impl; import static org.mozilla.browser.XPCOMUtils.getService; import static org.mozilla.browser.XPCOMUtils.qi; import org.mozilla.interfaces.nsIRequest; import org.mozilla.interfaces.nsIStreamListener; import org.mozilla.interfaces.nsISupports; import org.mozilla.interfaces.nsIURI; import org.mozilla.interfaces.nsIURIContentListener; import org.mozilla.interfaces.nsIWebNavigation; import org.mozilla.interfaces.nsIWebNavigationInfo; import org.mozilla.xpcom.Mozilla; import ru.atomation.jbrowser.interfaces.JBrowserComponentEvents; /** * * @author caiiiycuk */ public class JBrowserURIContentListener implements nsIURIContentListener { protected final JBrowserComponent<?> component; protected final JBrowserComponentEvents events; protected nsIURIContentListener parent; private nsISupports cookie; /** * @param component must implemets {@link JBrowserComponentEvents} * @param parent */ public JBrowserURIContentListener(JBrowserComponent<?> component) { this.component = component; if (!(component instanceof JBrowserComponentEvents)) { throw new IllegalStateException("JBrowserComponent must implements JBrowserComponentEvents interface"); } this.parent = component.getWebBrowser().getParentURIContentListener(); this.events = (JBrowserComponentEvents) component; } @Override public boolean onStartURIOpen(nsIURI uri) { return !events.fireBeforeOpen(uri.getSpec()); } @Override public boolean doContent(String arg0, boolean arg1, nsIRequest arg2, nsIStreamListener[] arg3) { if (parent != null) { return parent.doContent(arg0, arg1, arg2, arg3); } return false; } @Override public boolean isPreferred(String arg0, String[] arg1) { return canHandleContent(arg0, true, arg1); } @Override public boolean canHandleContent(String aContentType, boolean aIsContentPreferred, String[] aDesiredContentType) { boolean handled = events.canHandleContent(aContentType, aIsContentPreferred, aDesiredContentType); if (handled) { return true; } aDesiredContentType[0] = null; if (aContentType != null) { nsIWebNavigationInfo webNavInfo = getService("@mozilla.org/webnavigation-info;1", nsIWebNavigationInfo.class); //$NON-NLS-1$ if (webNavInfo != null) { nsIWebNavigation webNav = qi(component.getWebBrowser(), nsIWebNavigation.class); long canHandle = webNavInfo.isTypeSupported(aContentType, webNav); return canHandle != nsIWebNavigationInfo.UNSUPPORTED; } } return false; } @Override public nsISupports getLoadCookie() { return cookie; } @Override public void setLoadCookie(nsISupports arg0) { this.cookie = arg0; } @Override public nsIURIContentListener getParentContentListener() { return parent; } @Override public void setParentContentListener(nsIURIContentListener arg0) { this.parent = arg0; } @Override public nsISupports queryInterface(String uuid) { return Mozilla.queryInterface(this, uuid); } }
⏎ ru/atomation/jbrowser/impl/JBrowserURIContentListener.java
Or download all of them as a single archive file:
File name: jbrowser-1.9-fyi.zip File size: 625318 bytes Release date: 2022-11-10 Download
⇐ Download and Install JBrowser Source Package
2017-07-17, 8609👍, 1💬
Popular Posts:
JDK 11 jrt-fs.jar is the JAR file for JDK 11 JRT-FS (Java RunTime - File System) defined in the "jdk...
What Is ojdbc8.jar for Oracle 12c R2? ojdbc8.jar for Oracle 12c R2 is the JAR files of ojdbc.jar, JD...
The JSR 105 XML Digital Signature 1.0.1 FCS implementation provides an API and implementation that a...
JDK 17 jdk.compiler.jmod is the JMOD file for JDK 17 Compiler tool, which can be invoked by the "jav...
Guava is a suite of core and expanded libraries that include utility classes, google's collections, ...