Source Code Cross Referenced for DimensionColumnValue.java in  » Report » jmagallanes-1.0 » com » calipso » reportgenerator » userinterface » 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 » Report » jmagallanes 1.0 » com.calipso.reportgenerator.userinterface 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.calipso.reportgenerator.userinterface;
002:
003:        import com.calipso.reportgenerator.common.InfoException;
004:        import com.calipso.reportgenerator.common.ShowExceptionMessageDialog;
005:
006:        import javax.swing.*;
007:        import java.awt.*;
008:        import java.awt.event.WindowAdapter;
009:        import java.awt.event.WindowEvent;
010:        import java.util.Vector;
011:
012:        public class DimensionColumnValue extends javax.swing.JDialog {
013:            public int x;
014:            public int y;
015:            private javax.swing.JScrollPane centerScrollPanel;
016:            private int width;
017:            private Point point;
018:            public JFrame frame;
019:            private Vector jcheckVector;
020:            private String name;
021:            private String panelName;
022:            private JList list;
023:            private CheckDataListCellRenderer render;
024:            private PivotTable table;
025:            private CheckDataListener lst;
026:
027:            /**
028:             * Retorna la JList list
029:             * @return
030:             */
031:            public JList getList() {
032:                return list;
033:            }
034:
035:            /**
036:             * Crea un Objeto DimensionColumnValue
037:             * @param width
038:             * @param location
039:
040:             * @param jcheckVector
041:             */
042:            public DimensionColumnValue(int width, Point location,
043:                    PivotTable pivotTable, Vector jcheckVector, String name,
044:                    String panelName) throws InfoException {
045:                this .jcheckVector = jcheckVector;
046:                this .name = name;
047:                this .panelName = panelName;
048:                this .x = 0;
049:                this .y = 0;
050:                this .width = width;
051:                this .point = location;
052:                this .point.y += 18;
053:                this .frame = pivotTable.getFrame();
054:                table = pivotTable;
055:                initComponents();
056:                setProperties();
057:            }
058:
059:            /**
060:             * Setea las propiedades del JDialog
061:             */
062:            private void setProperties() {
063:                setUndecorated(true);
064:                setSize(width + 15, Math.min((int) list.getPreferredSize()
065:                        .getHeight(), 180));
066:                setLocation(point);
067:                setVisible(true);
068:                list.revalidate();
069:            }
070:
071:            /**
072:             * Inicializa el Dialog , seteando paneles , listeners , etc...
073:             */
074:            private void initComponents() {
075:                getContentPane().add(createCenterScrollPanel(),
076:                        java.awt.BorderLayout.CENTER);
077:                frame
078:                        .addWindowFocusListener(new java.awt.event.WindowFocusListener() {
079:                            public void windowGainedFocus(
080:                                    java.awt.event.WindowEvent evt) {
081:                                formWindowGainedFocus();
082:                            }
083:
084:                            public void windowLostFocus(
085:                                    java.awt.event.WindowEvent evt) {
086:                                formWindowLostFocus();
087:                            }
088:                        });
089:                addWindowFocusListener(new java.awt.event.WindowFocusListener() {
090:                    public void windowGainedFocus(java.awt.event.WindowEvent evt) {
091:                        dialogWindowGainedFocus();
092:                    }
093:
094:                    public void windowLostFocus(java.awt.event.WindowEvent evt) {
095:                        dialogWindowLostFocus();
096:                    }
097:
098:                });
099:                addWindowListener(new WindowAdapter() {
100:                    public void windowClosed(WindowEvent e) {
101:                        try {
102:                            lst.run(jcheckVector);
103:                        } catch (InfoException ex) {
104:                            ShowExceptionMessageDialog
105:                                    .initExceptionDialogMessage(
106:                                            com.calipso.reportgenerator.common.LanguageTraslator
107:                                                    .traslate("214"), ex);
108:                        }
109:                    }
110:                });
111:            }
112:
113:            /**
114:             * Implemntación de la interface WindowFocusListener
115:             *
116:             */
117:            private void dialogWindowGainedFocus() {
118:            }
119:
120:            /**
121:             * Implemntación de la interface WindowFocusListener
122:             *
123:             * */
124:            private void dialogWindowLostFocus() {
125:                setVisible(false);
126:                dispose();
127:            }
128:
129:            /**
130:             * Implemntación de la interface WindowFocusListener
131:             *
132:             */
133:            private void formWindowLostFocus() {
134:                requestFocus();
135:                toFront();
136:            }
137:
138:            /**
139:             * Implemntación de la interface WindowFocusListener
140:             *
141:             */
142:            private void formWindowGainedFocus() {
143:                requestFocus();
144:                toBack();
145:            }
146:
147:            /**
148:             * Retorna el JSCrollPane centerScrollPanel ubicado al centro del JDialog con el JScrollBar Verical visible siempre  y
149:             * el JScrollBar nunca visible
150:             * @return
151:             */
152:            private Component createCenterScrollPanel() {
153:                centerScrollPanel = new javax.swing.JScrollPane();
154:                centerScrollPanel
155:                        .setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
156:                centerScrollPanel
157:                        .setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
158:                centerScrollPanel.getViewport().add(createListDataComponents());
159:                centerScrollPanel.getViewport().setVisible(true);
160:                return centerScrollPanel;
161:            }
162:
163:            /**
164:             * Crea la JList con los JButtonChech con sus respectivos estados
165:             * @return
166:             */
167:            private Component createListDataComponents() {
168:                ListDataModel[] options = new ListDataModel[jcheckVector.size()];
169:                Object[] vec;
170:                for (int index = 0; index < jcheckVector.size(); index++) {
171:                    vec = (Object[]) jcheckVector.get(index);
172:                    Object nameLabel = vec[0];
173:                    boolean isSelected = new Boolean(vec[1].toString())
174:                            .booleanValue();
175:                    ListDataModel aux = new ListDataModel(nameLabel,
176:                            (new Boolean(isSelected)).booleanValue());
177:                    options[index] = aux;
178:                }
179:                list = new JList(options);
180:                render = new CheckDataListCellRenderer();
181:                list.setCellRenderer(render);
182:                lst = new CheckDataListener(this , table);
183:                list.addMouseListener(lst);
184:                list.addKeyListener(lst);
185:
186:                return list;
187:            }
188:
189:            /**
190:             * Retorna la ubicacion del panel seleccionado (ROW - COLUMN - PAGE)
191:             * @return
192:             */
193:            public String getName() {
194:                return name;
195:            }
196:
197:            /**
198:             * Retorna el vector con los estados de los valores
199:             * @return
200:             */
201:            public Vector getJcheckVector() {
202:                return jcheckVector;
203:            }
204:
205:            /**
206:             * Setea el vector con los estados de los valores actualizados
207:             * @param jcheckVector
208:             */
209:            public void setJcheckVector(Vector jcheckVector) {
210:                this .jcheckVector = jcheckVector;
211:            }
212:
213:            /**
214:             * Retorna el nombre del panel el cual fue seleccionado
215:             * @return
216:             */
217:            public String getPanelName() {
218:                return panelName;
219:            }
220:
221:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.