public void windowClosing(WindowEvent ev) { if (!haveFinalValue) { StandardDialog.this.nd.setValue(NotifyDescriptor.CLOSED_OPTION); } } }
private void cancel() { nd.setValue(NotifyDescriptor.CANCEL_OPTION); haveFinalValue = true; dispose(); }
@Override public void actionPerformed( ActionEvent e ) { nd.setValue(option); if (buttonListener != null) { // #34485: some listeners expect that the action source is the option, not the button ActionEvent e2 = new ActionEvent( option, e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers() ); buttonListener.actionPerformed(e2); } if ((closingOptions == null) || Arrays.asList(closingOptions).contains(option)) { haveFinalValue = true; setVisible(false); } } }
@Override public void windowClosing(WindowEvent ev) { if (!haveFinalValue) { TopDialog.this.nd.setValue(NotifyDescriptor.CLOSED_OPTION); } } });
private void cancel() { nd.setValue(NotifyDescriptor.CANCEL_OPTION); haveFinalValue = true; dispose(); }
private void cancel() { nd.setValue(NotifyDescriptor.CANCEL_OPTION); haveFinalValue = true; dispose(); }
private void cancel() { nd.setValue(NotifyDescriptor.CANCEL_OPTION); haveFinalValue = true; dispose(); }
@Override public void actionPerformed(ActionEvent e) { //System.err.println("actionPerformed: " + option); nd.setValue(option); if (buttonListener != null) { // #34485: some listeners expect that the action source is the option, not the button ActionEvent e2 = new ActionEvent( option, e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers()); buttonListener.actionPerformed(e2); } if ((closingOptions == null) || Arrays.asList(closingOptions).contains(option)) { haveFinalValue = true; setVisible(false); } } };
NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if (nd.getValue() != NotifyDescriptor.YES_OPTION) { NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if (nd.getValue() != NotifyDescriptor.YES_OPTION) {
NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if(nd.getValue() != NotifyDescriptor.YES_OPTION) return; NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if(nd.getValue() != NotifyDescriptor.YES_OPTION) return;
NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if (nd.getValue() != NotifyDescriptor.YES_OPTION) { NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE); nd.setValue(NotifyDescriptor.NO_OPTION); DialogDisplayer.getDefault().notify(nd); if (nd.getValue() != NotifyDescriptor.YES_OPTION) {