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