下面列出了java.awt.Dialog#ModalityType ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public HelpDialog(final Frame owner, final String title, final Dialog.ModalityType modalityType) {
super(owner, title, modalityType);
setBounds(232, 232, 500, 800);
String helpText = "";
InputStream is = getClass().getResourceAsStream(HELP_FILE_PATH);
byte[] buf = new byte[1024 * 100];
try {
int cnt = is.read(buf);
helpText = new String(buf, 0, cnt);
} catch (IOException e) {
helpText = "Couldn't read the help file... Please contact [email protected]";
}
JEditorPane jEditorPane = new JEditorPane("text/html", helpText);
jEditorPane.setEditable(false);
jEditorPane.setVisible(true);
JScrollPane scroller = new JScrollPane(jEditorPane);
getContentPane().add(scroller);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
}
public JEscDialog(Window owner, String title, Dialog.ModalityType modalityType) {
super(owner, title, modalityType);
}
public JEscDialog(Window owner, String title, Dialog.ModalityType modalityType, GraphicsConfiguration gc) {
super(owner, title, modalityType, gc);
}
/**
* Creates new DError dialog where the parent is a frame.
*
* @param modality
* Create the dialog as modal?
* @param title
* Dialog title
* @param parent
* Parent frame
* @param error
* Error to display
*/
public DError(JFrame parent, String title, Dialog.ModalityType modality, Throwable error) {
super(parent, modality);
setTitle(title);
this.error = error;
initComponents();
}
/**
* Creates new DChangePassword dialog where the parent is a frame.
*
* @param parent
* Parent frame
* @param modality
* The dialog's title
* @param title
* Is dialog modal?
* @param oldPassword
* The password to be changed
* @param passwordQualityConfig
* Password quality configuration
*/
public DChangePassword(JFrame parent, Dialog.ModalityType modality, String title, Password oldPassword,
PasswordQualityConfig passwordQualityConfig) {
super(parent, title, modality);
this.oldPassword = oldPassword;
this.passwordQualityConfig = passwordQualityConfig;
initComponents();
}
/**
* Creates new DGetNewPassword dialog where the parent is a frame.
*
* @param parent
* Parent frame
* @param modality
* Dialog modality
* @param passwordQualityConfig
* Password quality configuration
*/
public DGetNewPassword(JFrame parent, Dialog.ModalityType modality, PasswordQualityConfig passwordQualityConfig) {
super(parent, res.getString("DGetNewPassword.Title"), modality);
this.passwordQualityConfig = passwordQualityConfig;
initComponents();
}
/**
* Creates a new DViewKeyPair dialog where the parent is a frame.
*
* @param parent
* The parent frame
* @param title
* The dialog title
* @param modality
* Dialog modality
* @param privateKey
* Private Private key part of keypair
* @param certificateChain
* Certificates Certificates part of keypair
*/
public DViewKeyPair(JFrame parent, String title, Dialog.ModalityType modality, PrivateKey privateKey,
X509Certificate[] certificateChain) {
super(parent, title, modality);
this.privateKey = privateKey;
this.certificateChain = certificateChain;
initComponents();
}
/**
* Creates new DJarInfo dialog where the parent is a frame.
*
* @param parent
* Parent frame
* @param title
* The title of the dialog
* @param modality
* Dialog modality
* @throws IOException
* Problem occurred getting JAR information
*/
public DJarInfo(JFrame parent, String title, Dialog.ModalityType modality) throws IOException {
super(parent, title, modality);
initComponents();
}
/**
* Creates new DErrorDetail dialog where the parent is a frame.
*
* @param parent
* Parent frame
* @param modality
* Dialog modality
* @param error
* Error to display
*/
public DErrorDetail(JFrame parent, Dialog.ModalityType modality, Throwable error) {
super(parent, modality);
this.error = error;
initComponents();
}
/**
* Creates new DSystemProperties dialog where the parent is a dialog.
*
* @param parent
* Parent dialog
* @param title
* The title of the dialog
* @param modality
* Dialog modality
*/
public DSystemProperties(JDialog parent, String title, Dialog.ModalityType modality) {
super(parent, title, modality);
initComponents();
}
/**
* Creates new DSystemInformation dialog where the parent is a dialog.
*
* @param parent
* Parent dialog
* @param title
* The title of the dialog
* @param modality
* Dialog modality
*/
public DSystemInformation(JDialog parent, String title, Dialog.ModalityType modality) {
super(parent, title, modality);
initComponents();
}
/**
* Creates new DEnvironmentVariables dialog where the parent is a dialog.
*
* @param parent
* Parent dialog
* @param title
* The title of the dialog
* @param modality
* Dialog modality
*/
public DEnvironmentVariables(JDialog parent, String title, Dialog.ModalityType modality) {
super(parent, title, modality);
initComponents();
}
/**
* Creates new DChangePassword dialog where the parent is a frame.
*
* @param parent
* Parent frame
* @param modality
* The dialog's title
* @param oldPassword
* The password to be changed
* @param passwordQualityConfig
* Password quality configuration
*/
public DChangePassword(JFrame parent, Dialog.ModalityType modality, Password oldPassword,
PasswordQualityConfig passwordQualityConfig) {
this(parent, modality, res.getString("DChangePassword.Title"), oldPassword, passwordQualityConfig);
}
/**
* Creates new DChangePassword dialog where the parent is a dialog.
*
* @param parent
* Parent frame
* @param modality
* Dialog modality
* @param oldPassword
* The password to be changed
* @param passwordQualityConfig
* Password quality configuration
*/
public DChangePassword(JDialog parent, Dialog.ModalityType modality, Password oldPassword,
PasswordQualityConfig passwordQualityConfig) {
this(parent, res.getString("DChangePassword.Title"), modality, oldPassword, passwordQualityConfig);
}
/**
* Creates new DGetPassword dialog where the parent is a dialog.
*
* @param parent
* Parent dialog
* @param title
* The dialog's title
* @param modality
* Dialog modality
*/
public DGetPassword(JDialog parent, String title, Dialog.ModalityType modality) {
super(parent, title, modality);
initComponents();
}
/**
* Creates new DGetNewPassword dialog where the parent is a dialog.
*
* @param parent
* Parent dialog
* @param modality
* Dialog modality
* @param passwordQualityConfig
* Password quality configuration
*/
public DGetNewPassword(JDialog parent, Dialog.ModalityType modality, PasswordQualityConfig passwordQualityConfig) {
this(parent, res.getString("DGetNewPassword.Title"), modality, passwordQualityConfig);
}
/**
* Creates a new DCryptoStrength dialog where the parent is a dialog.
*
* @param parent
* Parent dialog
* @param modality
* Dialog modality
* @throws CryptoException
* If a crypto problem occurred
*/
public DCryptoStrength(JDialog parent, Dialog.ModalityType modality) throws CryptoException {
super(parent, res.getString("DCryptoStrength.Title"), modality);
initComponents();
}
/**
* Creates new DViewCrl dialog where the parent is a dialog.
*
* @param parent
* Parent dialog
* @param title
* The dialog title
* @param modality
* Dialog modality
* @param crl
* CRL to display
*/
public DViewCrl(JDialog parent, String title, Dialog.ModalityType modality, X509CRL crl) {
super(parent, title, modality);
this.crl = crl;
initComponents();
}
/**
* Creates new DGetAlias dialog where the parent is a dialog.
*
* @param parent
* The parent dialog
* @param title
* The dialog's title
* @param modality
* Is the dialog modal?
* @param alias
* The alias to display initially
*/
public DGetAlias(JDialog parent, String title, Dialog.ModalityType modality, String alias) {
super(parent, title, modality);
initComponents(alias);
}
/**
* Creates new DProviderInfo dialog where the parent is a dialog.
*
* @param parent
* Parent dialog
* @param modality
* Dialog modality
*/
public DProviderInfo(JDialog parent, Dialog.ModalityType modality) {
super(parent, modality);
initComponents();
}