當前位置: 首頁>>代碼示例>>Java>>正文


Java NotifyDescriptor.CLOSED_OPTION屬性代碼示例

本文整理匯總了Java中org.openide.NotifyDescriptor.CLOSED_OPTION屬性的典型用法代碼示例。如果您正苦於以下問題:Java NotifyDescriptor.CLOSED_OPTION屬性的具體用法?Java NotifyDescriptor.CLOSED_OPTION怎麽用?Java NotifyDescriptor.CLOSED_OPTION使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.openide.NotifyDescriptor的用法示例。


在下文中一共展示了NotifyDescriptor.CLOSED_OPTION屬性的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: showDialog

public static boolean showDialog(String displayName, List<ParameterInfo> allParams, 
        Document targetDoc) {
    if (!allParams.isEmpty()) {
        boolean showParamTypes = Util.isJava(targetDoc) || Util.isJsp(targetDoc);
        CodeSetupPanel panel = new CodeSetupPanel(allParams, showParamTypes);

        DialogDescriptor desc = new DialogDescriptor(panel,
                NbBundle.getMessage(CodeSetupPanel.class,
                "LBL_CustomizeSaasService", displayName));

        Dialog d = DialogDisplayer.getDefault().createDialog(desc);
        panel.setDialog(d);
        d.setVisible(true);
        Object response = (desc.getValue() != null) ? desc.getValue() : NotifyDescriptor.CLOSED_OPTION;
        if (response.equals(NotifyDescriptor.CANCEL_OPTION) ||
                response.equals(NotifyDescriptor.CLOSED_OPTION)) {
            return false;
        }
    }
    return true;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:21,代碼來源:Util.java

示例2: stringToNDOption

private static Object stringToNDOption(String string) {
    if (string == null) {
        return null;
    }

    if (string.equals("CANCEL_OPTION")) { //NOI18N

        return NotifyDescriptor.CANCEL_OPTION;
    } else if (string.equals("CLOSED_OPTION")) { //NOI18N

        return NotifyDescriptor.CLOSED_OPTION;
    } else if (string.equals("NO_OPTION")) { //NOI18N

        return NotifyDescriptor.NO_OPTION;
    } else if (string.equals("OK_OPTION")) { //NOI18N

        return NotifyDescriptor.OK_OPTION;
    } else if (string.equals("YES_OPTION")) { //NOI18N

        return NotifyDescriptor.YES_OPTION;
    }

    return null;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:24,代碼來源:ProfilerDialogs.java

示例3: storeSettings

@Override
public void storeSettings(WizardDescriptor wd) {
    Object value = wd.getValue();
    
    if ( NotifyDescriptor.CANCEL_OPTION != value &&
         NotifyDescriptor.CLOSED_OPTION != value ) {        
        try { 

            Project newProject = gui.getProject ();
            project = newProject;
            wd.putProperty(ProjectChooserFactory.WIZARD_KEY_PROJECT, newProject);
            
            if (gui.getTemplate () == null) {
                return ;
            }
            
            if (wd instanceof TemplateWizard) {
                ((TemplateWizard)wd).setTemplate( DataObject.find( gui.getTemplate() ) );
            } else {
                wd.putProperty( ProjectChooserFactory.WIZARD_KEY_TEMPLATE, gui.getTemplate () );
            }
        }
        catch( DataObjectNotFoundException e ) {
            ErrorManager.getDefault().notify (e);
        }
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:27,代碼來源:TemplateChooserPanel.java

示例4: testUserQuestionExceptionDisplayedCancel

public void testUserQuestionExceptionDisplayedCancel() throws Exception {
    class UQE extends UserQuestionException {
        UQE() {
            super("HelloTest");
        }
        
        boolean confirm;
        @Override
        public void confirmed() throws IOException {
            confirm = true;
        }

        @Override
        public String getLocalizedMessage() {
            return "Reboot?";
        }
    }
    MockDD.reply = NotifyDescriptor.CLOSED_OPTION;
    
    UQE ex = new UQE();
    Exceptions.printStackTrace(ex);
    
    waitEDT();

    assertNotNull("Dialog created", MockDD.lastDescriptor);
    assertEquals("Message is localized text", "Reboot?", MockDD.lastDescriptor.getMessage());
    assertFalse("The message has not been confirmed", ex.confirm);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:28,代碼來源:NbErrorManagerUserQuestionTest.java

示例5: notify

public Object notify(org.openide.NotifyDescriptor descriptor) {
try {
	// we need to get into EQ - as the regular DialogDescriptor does
	waitEQ();
} catch (Exception ex) {
	ex.printStackTrace();
}
return NotifyDescriptor.CLOSED_OPTION;
     }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:Deadlock60917Test.java

示例6: ndOptionToString

private static String ndOptionToString(Object option) {
    if (option == NotifyDescriptor.CANCEL_OPTION) {
        return "CANCEL_OPTION"; // NOI18N
    } else if (option == NotifyDescriptor.CLOSED_OPTION) {
        return "CLOSED_OPTION"; // NOI18N
    } else if (option == NotifyDescriptor.NO_OPTION) {
        return "NO_OPTION"; // NOI18N
    } else if (option == NotifyDescriptor.OK_OPTION) {
        return "OK_OPTION"; // NOI18N
    } else if (option == NotifyDescriptor.YES_OPTION) {
        return "YES_OPTION"; // NOI18N
    }

    return null;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:15,代碼來源:ProfilerDialogs.java

示例7: notify

public Object notify(NotifyDescriptor descriptor) {
    return NotifyDescriptor.CLOSED_OPTION;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:3,代碼來源:CloneableEditorSupportCOSRedirectorTest.java

示例8: notify

public Object notify(NotifyDescriptor descriptor) {
    notifyCalled = true;
    return NotifyDescriptor.CLOSED_OPTION;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:4,代碼來源:WritablePreferences131128Test.java

示例9: notify

public Object notify(NotifyDescriptor descriptor) {
    assertNull(d);
    d = descriptor;
    return NotifyDescriptor.CLOSED_OPTION;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:5,代碼來源:InstallerReadPageTest.java

示例10: notify

@Override
public Object notify(NotifyDescriptor descriptor) {
    assertNull(d);
    d = descriptor;
    return NotifyDescriptor.CLOSED_OPTION;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:6,代碼來源:InstallerLittleTest.java


注:本文中的org.openide.NotifyDescriptor.CLOSED_OPTION屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。