/** * Returns a basic info dialog (ok). * * @param owner the owner of the dialog * @param modal the modality of the dialog */ public static ApprovalDialog getInformationDialog(Dialog owner, ModalityType modal) { ApprovalDialog result; result = new ApprovalDialog(owner, modal); result.setApproveVisible(true); result.setDiscardVisible(false); result.setCancelVisible(false); return result; }
/** * Returns a basic info dialog (ok). * * @param owner the owner of the dialog * @param modal whether to create a modal dialog */ public static ApprovalDialog getInformationDialog(Frame owner, boolean modal) { ApprovalDialog result; result = new ApprovalDialog(owner, modal); result.setApproveVisible(true); result.setDiscardVisible(false); result.setCancelVisible(false); return result; } }
/** * Returns a basic confirmation dialog (yes/no/cancel). * * @param owner the owner of the dialog * @param modal the modality of the dialog */ public static ApprovalDialog getConfirmationDialog(Dialog owner, ModalityType modal) { ApprovalDialog result; result = new ApprovalDialog(owner, modal); result.setApproveCaption("Yes"); result.setApproveMnemonic(KeyEvent.VK_Y); result.setDiscardCaption("No"); result.setDiscardMnemonic(KeyEvent.VK_N); result.setDiscardVisible(true); return result; }
/** * Returns a basic confirmation dialog (yes/no/cancel). * * @param owner the owner of the dialog * @param modal whether to create a modal dialog */ public static ApprovalDialog getConfirmationDialog(Frame owner, boolean modal) { ApprovalDialog result; result = new ApprovalDialog(owner, modal); result.setApproveCaption("Yes"); result.setApproveMnemonic(KeyEvent.VK_Y); result.setDiscardCaption("No"); result.setDiscardMnemonic(KeyEvent.VK_N); result.setDiscardVisible(true); return result; }