public void run() { String message = NbBundle.getMessage(XmlMultiViewDataObject.class, "TXT_OverwriteUnparsableDocument", getPrimaryFile().getNameExt()); NotifyDescriptor desc = new NotifyDescriptor.Confirmation(message, NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); DialogDisplayer.getDefault().notify(desc); overwriteUnparseable = Boolean.valueOf(desc.getValue() == NotifyDescriptor.YES_OPTION); handleUnparseableTimeout = new Date().getTime() + HANDLE_UNPARSABLE_TIMEOUT; } });
return NotifyDescriptor.YES_OPTION.equals (descriptor.getValue ());
NotifyDescriptor d = new NotifyDescriptor(panel, title, JOptionPane.DEFAULT_OPTION, messageType, null, null); DialogDisplayer.getDefault().notify(d); if (d.getValue() != NotifyDescriptor.CANCEL_OPTION) { boolean storeResult = dontShowCheckBox.isSelected(); if (storeResult) {
if (d.getValue() == NotifyDescriptor.YES_OPTION) { Resampler selectedResampler; if (availableResamplers.size() == 1) {
@Override public void actionPerformed(ActionEvent e) { String state = e.getActionCommand(); if (state.equals(JFileChooser.APPROVE_SELECTION)) { VCSFileProxy destination = VCSFileProxySupport.getSelectedFile(chooser); destination = getTargetFile(destination); if (destination.exists()) { NotifyDescriptor nd = new NotifyDescriptor.Confirmation(NbBundle.getMessage(ExportDiffSupport.class, "BK3005", destination.getPath())); nd.setOptionType(NotifyDescriptor.YES_NO_OPTION); DialogDisplayer.getDefault().notify(nd); if (nd.getValue().equals(NotifyDescriptor.OK_OPTION) == false) { return; } } preferences.put("ExportDiff.saveFolder", destination.getParentFile().getPath()); // NOI18N panel.setOutputFileText(destination.getPath()); } else { dd.setValue(null); } if(dialog != null) { dialog.dispose(); } } });
nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if(nd.getValue() != NotifyDescriptor.YES_OPTION) return; changeEncodingToDefault = true; nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if(nd.getValue() != NotifyDescriptor.YES_OPTION) return;
nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if (nd.getValue() != NotifyDescriptor.YES_OPTION) { throw new UserCancelException(); nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if (nd.getValue() != NotifyDescriptor.YES_OPTION) { throw new UserCancelException();