Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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
⏎ org/mozilla/browser/impl/PromptService.java
package org.mozilla.browser.impl;
import java.awt.Frame;
import org.mozilla.browser.mt;
import org.mozilla.browser.impl.components.JUsernamePasswordDialog;
import org.mozilla.interfaces.nsIDOMWindow;
import org.mozilla.interfaces.nsIPromptService;
import org.mozilla.interfaces.nsISupports;
import org.mozilla.xpcom.Mozilla;
/**
* Re-implementation of a mozilla service
* for handling displaying of various message
* dialogs in the swing way.
*
* http://developer.mozilla.org/en/docs/nsIPromptService
* http://www.xulplanet.com/references/xpcomref/ifaces/nsIPromptService.html
*/
public class PromptService implements nsIPromptService {
public void alert(nsIDOMWindow arg0, String arg1, String arg2) {
}
public void alertCheck(nsIDOMWindow arg0, String arg1, String arg2, String arg3, boolean[] arg4) {
}
public boolean confirm(nsIDOMWindow arg0, String arg1, String arg2) {
return false;
}
public boolean confirmCheck(nsIDOMWindow arg0, String arg1, String arg2, String arg3, boolean[] arg4) {
return false;
}
public int confirmEx(nsIDOMWindow arg0, String arg1, String arg2, long arg3, String arg4, String arg5, String arg6, String arg7, boolean[] arg8) {
return 0;
}
public boolean prompt(nsIDOMWindow arg0, String arg1, String arg2, String[] arg3, String arg4, boolean[] arg5) {
return false;
}
public boolean promptPassword(nsIDOMWindow parent, String dialogTitle, String text, String[] password, String checkMsg, boolean[] checkState) {
Frame f = null; //FIXME
JUsernamePasswordDialog dialog =
new JUsernamePasswordDialog(f,
dialogTitle.length()==0 ? dialogTitle : mt.t("PromptService.Title1"), //$NON-NLS-1$
text,
password[0],
checkMsg!=null,
checkMsg,
checkState[0]);
boolean ret = dialog.run();
checkState[0] = dialog.getCheckState();
password[0] = dialog.getPassword();
//return true for OK, and false for Cancel
return ret;
}
public boolean promptUsernameAndPassword(nsIDOMWindow parent, String dialogTitle, String text, String[] username, String[] password, String checkMsg, boolean[] checkState)
{
Frame f = null; //FIXME
JUsernamePasswordDialog dialog =
new JUsernamePasswordDialog(f,
dialogTitle.length()==0 ? dialogTitle : mt.t("PromptService.Title1"), //$NON-NLS-1$
text,
username[0],
password[0],
checkMsg!=null,
checkMsg,
checkState[0]);
boolean ret = dialog.run();
checkState[0] = dialog.getCheckState();
username[0] = dialog.getUsername();
password[0] = dialog.getPassword();
//return true for OK, and false for Cancel
return ret;
}
public boolean select(nsIDOMWindow arg0, String arg1, String arg2, long arg3, String[] arg4, int[] arg5) {
return false;
}
public nsISupports queryInterface(String iid) {
return Mozilla.queryInterface(this, iid);
}
}
⏎ org/mozilla/browser/impl/PromptService.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, ≈40🔥, 1💬
Popular Posts:
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module. JDK 11 Desktop module compiled ...
SLF4J API is a simple API that allows to plug in any desired logging library at deployment time. Her...
JDK 17 java.xml.jmod is the JMOD file for JDK 17 XML (eXtensible Markup Language) module. JDK 17 XML...
MP3SPI is a Java Service Provider Interface that adds MP3 (MPEG 1/2/2.5 Layer 1/2/3) audio format su...
What Is log4j-1.2.13.jar? I got the JAR file from logging-log4j-1.2.13.zip .log4j-1.2.13.jar is the ...