Source Code Cross Referenced for MessageFrameController.java in  » Mail-Clients » columba-1.4 » org » columba » mail » gui » messageframe » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Mail Clients » columba 1.4 » org.columba.mail.gui.messageframe 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // The contents of this file are subject to the Mozilla Public License Version
002:        // 1.1
003:        //(the "License"); you may not use this file except in compliance with the
004:        //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
005:        //
006:        //Software distributed under the License is distributed on an "AS IS" basis,
007:        //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
008:        //for the specific language governing rights and
009:        //limitations under the License.
010:        //
011:        //The Original Code is "The Columba Project"
012:        //
013:        //The Initial Developers of the Original Code are Frederik Dietz and Timo
014:        // Stich.
015:        //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
016:        //
017:        //All Rights Reserved.
018:
019:        package org.columba.mail.gui.messageframe;
020:
021:        import java.awt.BorderLayout;
022:        import java.io.IOException;
023:        import java.io.InputStream;
024:
025:        import javax.swing.JComponent;
026:        import javax.swing.JPanel;
027:
028:        import org.columba.api.gui.frame.IContainer;
029:        import org.columba.api.gui.frame.IDock;
030:        import org.columba.api.gui.frame.IDockable;
031:        import org.columba.core.gui.frame.FrameManager;
032:        import org.columba.core.io.DiskIO;
033:        import org.columba.mail.command.IMailFolderCommandReference;
034:        import org.columba.mail.gui.frame.AbstractMailFrameController;
035:        import org.columba.mail.gui.frame.TableViewOwner;
036:        import org.columba.mail.gui.frame.ThreePaneMailFrameController;
037:        import org.columba.mail.gui.table.ITableController;
038:        import org.columba.mail.util.MailResourceLoader;
039:
040:        /**
041:         * Mail frame controller which contains a message viewer only.
042:         * <p>
043:         * Note that this frame depends on its parent frame controller for viewing
044:         * messages.
045:         * 
046:         * @see org.columba.mail.gui.action.NextMessageAction
047:         * @see org.columba.mail.gui.action.PreviousMessageAction
048:         * @see org.columba.mail.gui.action.NextUnreadMessageAction
049:         * @see org.columba.mail.gui.action.PreviousMessageAction
050:         * 
051:         * @author fdietz
052:         */
053:        public class MessageFrameController extends AbstractMailFrameController
054:                implements  TableViewOwner {
055:
056:            IMailFolderCommandReference treeReference;
057:
058:            IMailFolderCommandReference tableReference;
059:
060:            FixedTableSelectionHandler tableSelectionHandler;
061:
062:            private ThreePaneMailFrameController parentController;
063:
064:            private IDockable messageViewerDockable;
065:
066:            /**
067:             * @param viewItem
068:             */
069:            public MessageFrameController() {
070:                super (FrameManager.getInstance().createCustomViewItem(
071:                        "Messageframe"));
072:
073:                //		messageViewerDockable = registerDockable("mail_messageviewer", MailResourceLoader.getString(
074:                //				"global", "dockable_messageviewer"),
075:                //				messageController, null);
076:
077:                tableSelectionHandler = new FixedTableSelectionHandler(
078:                        tableReference);
079:                getSelectionManager()
080:                        .addSelectionHandler(tableSelectionHandler);
081:
082:            }
083:
084:            /**
085:             * @param parent
086:             *            parent frame controller
087:             */
088:            public MessageFrameController(ThreePaneMailFrameController parent) {
089:                this ();
090:
091:                this .parentController = parent;
092:
093:            }
094:
095:            /**
096:             * 
097:             * @see org.columba.mail.gui.frame.MailFrameInterface#getTableSelection()
098:             */
099:            public IMailFolderCommandReference getTableSelection() {
100:                return tableReference;
101:            }
102:
103:            /**
104:             * 
105:             * @see org.columba.mail.gui.frame.MailFrameInterface#getTreeSelection()
106:             */
107:            public IMailFolderCommandReference getTreeSelection() {
108:                return treeReference;
109:            }
110:
111:            /**
112:             * @param references
113:             */
114:            public void setTreeSelection(IMailFolderCommandReference references) {
115:                treeReference = references;
116:            }
117:
118:            /**
119:             * @param references
120:             */
121:            public void setTableSelection(IMailFolderCommandReference references) {
122:                tableReference = references;
123:
124:                // TODO: re-enable feature, the following code violates our
125:                // design, accessing folders is only allowed in Command.execute()
126:                /*
127:                 * try { // Get the subject from the cached Header AbstractMessageFolder
128:                 * folder = (AbstractMessageFolder) references .getSourceFolder();
129:                 * IColumbaHeader header = folder.getHeaderList().get(
130:                 * references.getUids()[0]); String subject = (String)
131:                 * header.get("columba.subject");
132:                 * 
133:                 * getContainer().getFrame().setTitle(subject); } catch (Exception e) {
134:                 * LOG.warning(e.toString()); }
135:                 */
136:
137:                tableSelectionHandler.setSelection(tableReference);
138:            }
139:
140:            /**
141:             * @see org.columba.mail.gui.frame.TableViewOwner#getTableController()
142:             */
143:            public ITableController getTableController() {
144:                if (parentController == null)
145:                    return null;
146:
147:                // pass it along to parent frame
148:                return parentController.getTableController();
149:            }
150:
151:            /**
152:             * @see org.columba.api.gui.frame.IContentPane#getComponent()
153:             */
154:            //	public JComponent getComponent() {
155:            //		JPanel panel = new JPanel();
156:            //		panel.setLayout(new BorderLayout());
157:            //
158:            //		panel.add(messageController, BorderLayout.CENTER);
159:            //
160:            //		
161:            //
162:            //		return panel;
163:            //	}
164:            /**
165:             * @see org.columba.api.gui.frame.IFrameMediator#getString(java.lang.String,
166:             *      java.lang.String, java.lang.String)
167:             */
168:            public String getString(String sPath, String sName, String sID) {
169:                return MailResourceLoader.getString(sPath, sName, sID);
170:            }
171:
172:            /**
173:             * @see org.columba.core.gui.frame.DockFrameController#loadDefaultPosition()
174:             */
175:            public void loadDefaultPosition() {
176:
177:                //super.dock(messageViewerDockable, IDock.REGION.CENTER);
178:
179:            }
180:
181:            /** *********************** container callbacks ************* */
182:
183:            /**
184:             * @see org.columba.api.gui.frame.IFrameMediator#extendMenu(org.columba.api.gui.frame.IContainer)
185:             */
186:            public void extendMenu(IContainer container) {
187:                try {
188:                    InputStream is = DiskIO
189:                            .getResourceStream("org/columba/mail/action/messageframe_menu.xml");
190:
191:                    container.extendMenu(this , is);
192:
193:                } catch (IOException e) {
194:                    e.printStackTrace();
195:                }
196:            }
197:
198:            /**
199:             * @see org.columba.api.gui.frame.IFrameMediator#extendToolBar(org.columba.api.gui.frame.IContainer)
200:             */
201:            public void extendToolBar(IContainer container) {
202:                try {
203:                    InputStream is = DiskIO
204:                            .getResourceStream("org/columba/mail/config/messageframe_toolbar.xml");
205:
206:                    container.extendToolbar(this , is);
207:
208:                } catch (IOException e) {
209:                    e.printStackTrace();
210:                }
211:            }
212:
213:            @Override
214:            public JPanel getContentPane() {
215:                JPanel panel = new JPanel();
216:                panel.setLayout(new BorderLayout());
217:
218:                panel.add(messageController, BorderLayout.CENTER);
219:
220:                return panel;
221:            }
222:
223:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.