Source Code Cross Referenced for ModulePanel.java in  » Project-Management » airTODO » org » airtodo » gui » panel_open » 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 » Project Management » airTODO » org.airtodo.gui.panel_open 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.airtodo.gui.panel_open;
002:
003:        import static org.air.framework.gui.box.Gap.small;
004:
005:        import java.awt.Component;
006:        import java.awt.Dialog;
007:        import java.awt.event.ActionEvent;
008:        import java.util.Map;
009:
010:        import javax.swing.Box;
011:        import javax.swing.SwingUtilities;
012:
013:        import org.air.framework.core.Registry;
014:        import org.air.framework.core.Utils;
015:        import org.air.framework.gui.actions.basic.BasicAbstractAction;
016:        import org.air.framework.gui.dialogs.grid.AbstractGridDialog;
017:        import org.air.framework.gui.dialogs.input.AbstractOpenTabbedPanel;
018:        import org.air.framework.gui.widgets.Button;
019:        import org.air.framework.gui.widgets.WidgetTextArea;
020:        import org.air.framework.gui.widgets.WidgetTextField;
021:        import org.air.framework.properties.Icons;
022:        import org.air.framework.records.Common;
023:        import org.airtodo.gui.dialog_table.AttachmentGridNonSelectableDialog;
024:        import org.airtodo.gui.dialog_table.NoteGridNonSelectableDialog;
025:        import org.airtodo.gui.dialog_table.TaskGridNonSelectableDialog;
026:        import org.airtodo.gui_common.actions.other.ActionAttachments;
027:        import org.airtodo.gui_common.actions.other.ActionNotes;
028:        import org.airtodo.records.Modules;
029:
030:        public class ModulePanel extends AbstractOpenTabbedPanel {
031:            //
032:            private long projectId;
033:
034:            private long moduleId;
035:
036:            public ModulePanel() {
037:                getTabGeneral().add(getWidgetTextFieldName());
038:                getTabGeneral().add(getWidgetTextFieldDescription());
039:                getTabGeneral().add(getWidgetTextAreaComment());
040:                //
041:                getButtonPanel().addAll(getButtonNotes(), small(),
042:                        getButtonAttachments(), small(), getButtonTasks(),
043:                        Box.createHorizontalGlue());
044:            }
045:
046:            //
047:            //	getButtonNotes
048:            //
049:            private Button buttonNotes;
050:
051:            private Component getButtonNotes() {
052:                if (buttonNotes == null) {
053:                    buttonNotes = new Button(new ActionNotes() {
054:                        public void actionPerformed(ActionEvent e) {
055:                            Dialog owner = (Dialog) SwingUtilities
056:                                    .windowForComponent(getOwner());
057:                            NoteGridNonSelectableDialog dialog = new NoteGridNonSelectableDialog(
058:                                    owner, getWidgetTextFieldName().getText());
059:                            dialog.setMasterId(moduleId);
060:                            dialog.loadAndSelect();
061:                            dialog.setVisible(true);
062:                        }
063:                    });
064:                }
065:                return buttonNotes;
066:            }
067:
068:            //
069:            //	getButtonTasks
070:            //
071:            private Button buttonTasks;
072:
073:            private Component getButtonTasks() {
074:                if (buttonTasks == null) {
075:                    buttonTasks = new Button(
076:                            new BasicAbstractAction(
077:                                    new TaskGridNonSelectableDialog()
078:                                            .getDialogTitle()
079:                                            + BasicAbstractAction.ELLIPSIS,
080:                                    Icons.TABLE) {
081:                                public void actionPerformed(ActionEvent e) {
082:                                    Dialog owner = (Dialog) SwingUtilities
083:                                            .windowForComponent(ModulePanel.this );
084:                                    TaskGridNonSelectableDialog taskDialog = new TaskGridNonSelectableDialog(
085:                                            owner);
086:                                    Registry.getFilterId().put(Modules.class,
087:                                            moduleId);
088:                                    Map moduleMap = ((AbstractGridDialog) owner
089:                                            .getOwner()).getTable()
090:                                            .getSelectedRecord();
091:                                    Registry.getFilterMap().put(Modules.class,
092:                                            moduleMap);
093:                                    fromGui(moduleMap);
094:                                    taskDialog.loadAndSelect();
095:                                    taskDialog.setVisible(true);
096:                                    Registry.getFilterId()
097:                                            .remove(Modules.class);
098:                                    Registry.getFilterMap().remove(
099:                                            Modules.class);
100:                                }
101:                            });
102:                }
103:                return buttonTasks;
104:            }
105:
106:            //
107:            //	getButtonAttachments
108:            //
109:            private Button buttonAttachments;
110:
111:            private Component getButtonAttachments() {
112:                if (buttonAttachments == null) {
113:                    buttonAttachments = new Button(new ActionAttachments() {
114:                        public void actionPerformed(ActionEvent e) {
115:                            Dialog owner = (Dialog) SwingUtilities
116:                                    .windowForComponent(ModulePanel.this );
117:                            AttachmentGridNonSelectableDialog dialog = new AttachmentGridNonSelectableDialog(
118:                                    owner, getWidgetTextFieldName().getText());
119:                            dialog.setMasterId(moduleId);
120:                            dialog.loadAndSelect();
121:                            dialog.setVisible(true);
122:                        }
123:                    });
124:                }
125:                return buttonAttachments;
126:            }
127:
128:            //
129:            //	getWidgetTextFieldName
130:            //
131:            private WidgetTextField widgetTextFieldName;
132:
133:            private WidgetTextField getWidgetTextFieldName() {
134:                if (widgetTextFieldName == null)
135:                    widgetTextFieldName = new WidgetTextField(Modules.NAME,
136:                            true);
137:                return widgetTextFieldName;
138:            }
139:
140:            //
141:            //	getWidgetTextFieldDescription
142:            //
143:            private WidgetTextField widgetTextFieldDescription;
144:
145:            private WidgetTextField getWidgetTextFieldDescription() {
146:                if (widgetTextFieldDescription == null)
147:                    widgetTextFieldDescription = new WidgetTextField(
148:                            Modules.DESCRIPTION);
149:                return widgetTextFieldDescription;
150:            }
151:
152:            //
153:            //	getWidgetTextAreaComment
154:            //
155:            private WidgetTextArea widgetTextAreaComment;
156:
157:            private WidgetTextArea getWidgetTextAreaComment() {
158:                if (widgetTextAreaComment == null)
159:                    widgetTextAreaComment = new WidgetTextArea(Modules.COMMENT);
160:                return widgetTextAreaComment;
161:            }
162:
163:            //
164:            //	isFormValid
165:            //
166:            @Override
167:            public boolean isFormValid() {
168:                return getWidgetTextFieldName().isTextValid();
169:            }
170:
171:            @Override
172:            public void fromGui(Map map) {
173:                map.put(Utils.getColumnIdentifier(Modules.PROJECT_ID),
174:                        projectId);
175:                getWidgetTextFieldName().fromGui(map);
176:                getWidgetTextFieldDescription().fromGui(map);
177:                getWidgetTextAreaComment().fromGui(map);
178:            }
179:
180:            @Override
181:            public void toGui(Map map) {
182:                projectId = (Long) map.get(Utils
183:                        .getColumnIdentifier(Modules.PROJECT_ID));
184:                getWidgetTextFieldName().toGui(map);
185:                getWidgetTextFieldDescription().toGui(map);
186:                getWidgetTextAreaComment().toGui(map);
187:                //
188:                moduleId = (Long) map.get(Utils.getColumnIdentifier(Common.ID));
189:            }
190:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.