From 0c4454a9fcf728f299662b013476a50ba212161d Mon Sep 17 00:00:00 2001 From: mguessan Date: Wed, 1 Feb 2012 07:33:53 +0000 Subject: [PATCH] Caldav: let users edit outgoing notifications for meeting requests git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1890 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/ui/NotificationDialog.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/java/davmail/ui/NotificationDialog.java b/src/java/davmail/ui/NotificationDialog.java index e5994faa..bfd9df84 100644 --- a/src/java/davmail/ui/NotificationDialog.java +++ b/src/java/davmail/ui/NotificationDialog.java @@ -63,7 +63,7 @@ public class NotificationDialog extends JDialog { * @param cc copy recipients * @param subject notification subject */ - public NotificationDialog(String to, String cc, String subject) { + public NotificationDialog(String to, String cc, String subject, String description) { setModal(true); setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); setTitle(BundleMessage.format("UI_CALDAV_NOTIFICATION")); @@ -85,7 +85,7 @@ public class NotificationDialog extends JDialog { mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); mainPanel.add(getRecipientsPanel()); - mainPanel.add(getBodyPanel()); + mainPanel.add(getBodyPanel(description)); JPanel recipientsPanel = getRecipientsPanel(); if (to != null) { @@ -98,7 +98,7 @@ public class NotificationDialog extends JDialog { subjectField.setText(subject); } add(BorderLayout.NORTH, recipientsPanel); - JPanel bodyPanel = getBodyPanel(); + JPanel bodyPanel = getBodyPanel(description); add(BorderLayout.CENTER, bodyPanel); bodyField.setPreferredSize(recipientsPanel.getPreferredSize()); @@ -156,11 +156,12 @@ public class NotificationDialog extends JDialog { return recipientsPanel; } - protected JPanel getBodyPanel() { + protected JPanel getBodyPanel(String description) { JPanel bodyPanel = new JPanel(); bodyPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_NOTIFICATION_BODY"))); bodyField = new JEditorPane(); + bodyField.setText(description); //HTMLEditorKit htmlEditorKit = new HTMLEditorKit(); //bodyField.setEditorKit(htmlEditorKit); //bodyField.setContentType("text/html");