01: /*
02: * Created on Jun 13, 2003
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.columba.mail.gui.messageframe;
08:
09: import org.columba.api.command.ICommandReference;
10: import org.columba.core.selection.SelectionHandler;
11: import org.columba.mail.command.IMailFolderCommandReference;
12: import org.columba.mail.command.MailFolderCommandReference;
13: import org.columba.mail.folder.IMailbox;
14: import org.columba.mail.gui.table.selection.TableSelectionChangedEvent;
15: import org.columba.mail.gui.table.selection.TableSelectionHandler;
16:
17: /**
18: * @author frd
19: *
20: * To change the template for this generated type comment go to
21: * Window>Preferences>Java>Code Generation>Code and Comments
22: */
23: public class FixedTableSelectionHandler extends SelectionHandler {
24: IMailFolderCommandReference tableReference;
25:
26: /**
27: * @param id
28: */
29: public FixedTableSelectionHandler(
30: IMailFolderCommandReference tableReference) {
31: super (TableSelectionHandler.HANDLER_ID);
32: this .tableReference = tableReference;
33: }
34:
35: /*
36: * (non-Javadoc)
37: *
38: * @see org.columba.core.gui.selection.SelectionHandler#getSelection()
39: */
40: public ICommandReference getSelection() {
41: return tableReference;
42: }
43:
44: /*
45: * (non-Javadoc)
46: *
47: * @see org.columba.core.gui.selection.SelectionHandler#setSelection(org.columba.api.command.DefaultCommandReference[])
48: */
49: public void setSelection(ICommandReference selection) {
50: this .tableReference = (MailFolderCommandReference) selection;
51:
52: fireSelectionChanged(new TableSelectionChangedEvent(
53: (IMailbox) tableReference.getSourceFolder(),
54: tableReference.getUids()));
55: }
56: }
|