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, ≈46🔥, 1💬
Popular Posts:
How to download and install JDK (Java Development Kit) 8? If you want to write Java applications, yo...
What Is XMLBeans xbean.jar 2.6.0? XMLBeans xbean.jar 2.6.0 is the JAR file for Apache XMLBeans 2.6.0...
What is the jaxp\TypeInfoWriter.java provided in the Apache Xerces package? I have Apache Xerces 2.1...
This package is the backport of java.util.concurrent API, introduced in Java 5.0 and further refined...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...