001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: /*
043: *
044: * Created on Jul 1, 2003
045: * @author Trey Spiva
046: */
047: package org.netbeans.modules.uml.ui.support.commondialogs;
048:
049: import java.awt.Window;
050:
051: import org.netbeans.modules.uml.ui.support.QuestionResponse;
052:
053: /**
054: *
055: * @author Trey Spiva
056: */
057: public interface IQuestionDialog extends ISilentDialog {
058: public static int IDOK = 1;
059: public static int IDCANCEL = 2;
060: public static int IDABORT = 3;
061: public static int IDRETRY = 4;
062: public static int IDIGNORE = 5;
063: public static int IDYES = 6;
064: public static int IDNO = 7;
065: public static int IDALWAYS = 8;
066: public static int IDNEVER = 9;
067:
068: /**
069: * Displays a question dialog that also has a checkbox. The checkbox can be
070: * use to prompt the user whether the dialog should be shown again.
071: *
072: * @param dialogType The type of the dialog. The dialog type should be one
073: * of the MessageDialogKindEnum values.
074: * @param dialogIcon The type of icon to display. The icon tyep must be one
075: * of the MessageIconKindEnum values.
076: * @param message The message to be displayed in the dialog.
077: * @param checkboxMsg The message to be displayed on the check box.
078: * @param defaultResult The default result of the dialog. The result should
079: * be one of the MessageDialogKindEnum values.
080: * @param defaultIsChecked Specifies if the check box is checked by default.
081: * @return Specifes the users response to the question and the value of the
082: * check box.
083: */
084: public QuestionResponse displaySimpleQuestionDialogWithCheckbox(
085: int dialogType, int dialogIcon, String message,
086: String checkboxMsg, int defaultResult,
087: boolean defaultIsChecked);
088:
089: public QuestionResponse displaySimpleQuestionDialogWithCheckbox(
090: int dialogType, int dialogIcon, String message,
091: String checkboxMsg, String title, int defaultResult,
092: boolean defaultIsChecked);
093:
094: public QuestionResponse displaySimpleQuestionDialog(int dialogType,
095: int errorDialogIcon, String messageString,
096: int defaultResult, Window parent, String title);
097:
098: /**
099: * The default button (ie IDOK). See the return values for AfxMessageBox
100: */
101: public void setDefaultButton(int value);
102: }
|