1 | class ReplyToListAction extends AbstractColumbaAction↵ | | 1 | class ReplyAsAttachmentAction extends AbstractColumbaAction↵
|
2 | implements↵ | | 2 | implements↵
|
3 | ISelectionListener {↵ | | 3 | ISelectionListener {↵
|
4 | public ReplyToListAction(IFrameMediator frameMediator) {↵ | | 4 | public ReplyAsAttachmentAction(IFrameMediator frameMediator) {↵
|
5 | super(frameMediator,↵ | | 5 | super(frameMediator,↵
|
6 | MailResourceLoader.getString("menu", "mainframe",↵ | | 6 | MailResourceLoader.getString("menu", "mainframe",↵
|
7 | "menu_message_replyto"));↵ | | 7 | "menu_message_reply↵
|
|
8 | ↵ | | 8 | asattachment"));↵
|
|
9 | // tooltip text↵ | | 9 | // tooltip text↵
|
10 | putValue(SHORT_DESCRIPTION,↵ | | 10 | putValue(SHORT_DESCRIPTION,↵
|
11 | MailResourceLoader.getString("menu",↵ | | 11 | MailResourceLoader.getString("menu",↵
|
12 | "mainframe",↵ | | 12 | "mainframe",↵
|
13 | "menu_message_replyto_tooltip")↵ | | 13 | "menu_message_replyasattachment_tooltip")↵
|
14 | .replaceAll("&", ""));↵ | | 14 | .replaceAll("&", ""));↵
|
|
15 | // putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_L,↵ | | |
|
16 | // Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));↵ | | |
|
|
17 | setEnabled(false);↵ | | 15 | setEnabled(false);↵
|
|
18 | ((MailFrameMediator) frameMediator)↵ | | 16 | ((MailFrameMediator) frameMediator)↵
|
19 | .registerTableSelectionListener(this);↵ | | 17 | .registerTableSelectionListener(this);↵
|
20 | }↵ | | |
|
|
21 | /*↵ | | |
|
22 | ↵ | | 18 | }↵
|
|
23 | * (non-Javadoc)↵ | | 19 | /* (non-Javadoc)↵
|
24 | * ↵ | | |
|
25 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)↵ | | 20 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)↵
|
26 | */↵ | | |
|
27 | ↵ | | 21 | */↵
|
28 | public void actionPerformed(ActionEvent evt) {↵ | | 22 | public void actionPerformed(ActionEvent evt) {↵
|
29 | IMailFolderCommandReference r = ((MailFrameMediator) getFrameMediator())↵ | | 23 | IMailFolderCommandReference r = ((MailFrameMediator) getFrameMediator())↵
|
30 | .getTableSelection();↵ | | 24 | .getTableSelection();↵
|
31 | CommandProcessor.getInstance().addOp(new ReplyToMailingListCommand(r));↵ | | 25 | CommandProcessor.getInstance().addOp(new ReplyAsAttachmentCommand(r));↵
|
32 | }↵ | | |
|
|
33 | /*↵ | | |
|
34 | ↵ | | 26 | }↵
|
|
35 | * (non-Javadoc)↵ | | 27 | /* (non-Javadoc)↵
|
36 | * ↵ | | |
|
37 | * @see org.columba.core.gui.util.ISelectionListener#selectionChanged(org.columba.core.gui.util.SelectionChangedEvent)↵ | | 28 | * @see org.columba.core.gui.util.ISelectionListener#selectionChanged(org.columba.core.gui.util.SelectionChangedEvent)↵
|
38 | */↵ | | |
|
39 | ↵ | | 29 | */↵
|
40 | public void selectionChanged(SelectionChangedEvent e) {↵ | | 30 | public void selectionChanged(SelectionChangedEvent e) {↵
|
41 | setEnabled(((TableSelectionChangedEvent) e).getUids().length > 0);↵ | | 31 | setEnabled(((TableSelectionChangedEvent) e).getUids().length > 0);↵
|
42 | } | | 32 | }
|