Source Code Cross Referenced for PreInstallSummaryPanel.java in  » IDE-Netbeans » nbi » org » netbeans » installer » wizard » components » panels » 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 » IDE Netbeans » nbi » org.netbeans.installer.wizard.components.panels 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003:         * 
004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005:         * 
006:         * The contents of this file are subject to the terms of either the GNU General
007:         * Public License Version 2 only ("GPL") or the Common Development and Distribution
008:         * License("CDDL") (collectively, the "License"). You may not use this file except in
009:         * compliance with the License. You can obtain a copy of the License at
010:         * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
011:         * License for the specific language governing permissions and limitations under the
012:         * License.  When distributing the software, include this License Header Notice in
013:         * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Sun
014:         * designates this particular file as subject to the "Classpath" exception as
015:         * provided by Sun in the GPL Version 2 section of the License file that
016:         * accompanied this code. If applicable, add the following below the License Header,
017:         * with the fields enclosed by brackets [] replaced by your own identifying
018:         * information: "Portions Copyrighted [year] [name of copyright owner]"
019:         * 
020:         * Contributor(s):
021:         * 
022:         * The Original Software is NetBeans. The Initial Developer of the Original Software
023:         * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
024:         * Rights Reserved.
025:         * 
026:         * If you wish your version of this file to be governed by only the CDDL or only the
027:         * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
028:         * this software in this distribution under the [CDDL or GPL Version 2] license." If
029:         * you do not indicate a single choice of license, a recipient has the option to
030:         * distribute your version of this file under either the CDDL, the GPL Version 2 or
031:         * to extend the choice of license to its licensees as provided above. However, if
032:         * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
033:         * the option applies only if the new code is made subject to such option by the
034:         * copyright holder.
035:         */
036:
037:        package org.netbeans.installer.wizard.components.panels;
038:
039:        import java.awt.GridBagConstraints;
040:        import java.awt.Insets;
041:        import java.io.File;
042:        import java.io.IOException;
043:        import java.util.HashMap;
044:        import java.util.List;
045:        import java.util.Map;
046:        import org.netbeans.installer.Installer;
047:        import org.netbeans.installer.product.components.Product;
048:        import org.netbeans.installer.product.Registry;
049:        import org.netbeans.installer.utils.ErrorManager;
050:        import org.netbeans.installer.utils.FileUtils;
051:        import org.netbeans.installer.utils.LogManager;
052:        import org.netbeans.installer.utils.ResourceUtils;
053:        import org.netbeans.installer.utils.StringUtils;
054:        import org.netbeans.installer.utils.SystemUtils;
055:        import org.netbeans.installer.utils.exceptions.NativeException;
056:        import org.netbeans.installer.utils.helper.swing.NbiLabel;
057:        import org.netbeans.installer.utils.helper.swing.NbiPanel;
058:        import org.netbeans.installer.utils.helper.swing.NbiTextPane;
059:        import org.netbeans.installer.wizard.ui.SwingUi;
060:        import org.netbeans.installer.wizard.ui.WizardUi;
061:        import org.netbeans.installer.wizard.containers.SwingContainer;
062:
063:        /**
064:         *
065:         * @author Kirill Sorokin
066:         */
067:        public class PreInstallSummaryPanel extends ErrorMessagePanel {
068:            /////////////////////////////////////////////////////////////////////////////////
069:            // Instance
070:            public PreInstallSummaryPanel() {
071:                setProperty(TITLE_PROPERTY, DEFAULT_TITLE);
072:
073:                setProperty(MESSAGE_TEXT_PROPERTY, DEFAULT_MESSAGE_TEXT);
074:                setProperty(MESSAGE_CONTENT_TYPE_PROPERTY,
075:                        DEFAULT_MESSAGE_CONTENT_TYPE);
076:                setProperty(COMPONENTS_TO_INSTALL_LABEL_TEXT_PROPERTY,
077:                        DEFAULT_COMPONENTS_TO_INSTALL_LABEL_TEXT);
078:                setProperty(COMPONENTS_TO_INSTALL_TEXT_PROPERTY,
079:                        DEFAULT_COMPONENTS_TO_INSTALL_TEXT);
080:                setProperty(COMPONENTS_TO_INSTALL_CONTENT_TYPE_PROPERTY,
081:                        DEFAULT_COMPONENTS_TO_INSTALL_CONTENT_TYPE);
082:                setProperty(COMPONENTS_TO_UNINSTALL_LABEL_TEXT_PROPERTY,
083:                        DEFAULT_COMPONENTS_TO_UNINSTALL_LABEL_TEXT);
084:                setProperty(COMPONENTS_TO_UNINSTALL_TEXT_PROPERTY,
085:                        DEFAULT_COMPONENTS_TO_UNINSTALL_TEXT);
086:                setProperty(COMPONENTS_TO_UNINSTALL_CONTENT_TYPE_PROPERTY,
087:                        DEFAULT_COMPONENTS_TO_UNINSTALL_CONTENT_TYPE);
088:                setProperty(COMPONENTS_LIST_SEPARATOR_PROPERTY,
089:                        DEFAULT_COMPONENTS_LIST_SEPARATOR);
090:                setProperty(DOWNLOAD_SIZE_LABEL_TEXT_PROPERTY,
091:                        DEFAULT_DOWNLOAD_SIZE_LABEL_TEXT);
092:                setProperty(REQUIRED_DISK_SPACE_LABEL_TEXT_PROPERTY,
093:                        DEFAULT_REQUIRED_DISK_SPACE_LABEL_TEXT);
094:                setProperty(INSTALL_BUTTON_TEXT_PROPERTY,
095:                        DEFAULT_INSTALL_BUTTON_TEXT);
096:
097:                setProperty(ERROR_NOT_ENOUGH_SPACE_PROPERTY,
098:                        DEFAULT_ERROR_NOT_ENOUGH_SPACE);
099:                setProperty(ERROR_CANNOT_CHECK_SPACE_PROPERTY,
100:                        DEFAULT_ERROR_CANNOT_CHECK_SPACE);
101:                setProperty(ERROR_LOGIC_ACCESS_PROPERTY,
102:                        DEFAULT_ERROR_LOGIC_ACCESS);
103:                setProperty(ERROR_FSROOTS_PROPERTY, DEFAULT_ERROR_FSROOTS);
104:                setProperty(ERROR_NON_EXISTENT_ROOT_PROPERTY,
105:                        DEFAULT_ERROR_NON_EXISTENT_ROOT);
106:                setProperty(ERROR_CANNOT_WRITE_PROPERTY,
107:                        DEFAULT_ERROR_CANNOT_WRITE);
108:            }
109:
110:            @Override
111:            public boolean canExecuteForward() {
112:                return Registry.getInstance().getProductsToInstall().size()
113:                        + Registry.getInstance().getProductsToUninstall()
114:                                .size() > 0;
115:            }
116:
117:            @Override
118:            public boolean canExecuteBackward() {
119:                return Registry.getInstance().getProductsToInstall().size()
120:                        + Registry.getInstance().getProductsToUninstall()
121:                                .size() > 0;
122:            }
123:
124:            @Override
125:            public WizardUi getWizardUi() {
126:                if (wizardUi == null) {
127:                    wizardUi = new PreInstallSummaryPanelUi(this );
128:                }
129:
130:                return wizardUi;
131:            }
132:
133:            /////////////////////////////////////////////////////////////////////////////////
134:            // Inner Classes
135:            public static class PreInstallSummaryPanelUi extends
136:                    ErrorMessagePanelUi {
137:                protected PreInstallSummaryPanel panel;
138:
139:                public PreInstallSummaryPanelUi(PreInstallSummaryPanel panel) {
140:                    super (panel);
141:
142:                    this .panel = panel;
143:                }
144:
145:                @Override
146:                public SwingUi getSwingUi(SwingContainer container) {
147:                    if (swingUi == null) {
148:                        swingUi = new PreInstallSummaryPanelSwingUi(panel,
149:                                container);
150:                    }
151:
152:                    return super .getSwingUi(container);
153:                }
154:            }
155:
156:            public static class PreInstallSummaryPanelSwingUi extends
157:                    ErrorMessagePanelSwingUi {
158:                protected PreInstallSummaryPanel panel;
159:
160:                private NbiTextPane messagePane;
161:                private NbiLabel componentsToInstallLabel;
162:                private NbiTextPane componentsToInstallPane;
163:                private NbiLabel componentsToUninstallLabel;
164:                private NbiTextPane componentsToUninstallPane;
165:                private NbiLabel downloadSizeLabel;
166:                private NbiLabel requiredDiskSpaceLabel;
167:
168:                private NbiPanel spacer;
169:
170:                public PreInstallSummaryPanelSwingUi(
171:                        final PreInstallSummaryPanel panel,
172:                        final SwingContainer container) {
173:                    super (panel, container);
174:
175:                    this .panel = panel;
176:
177:                    initComponents();
178:                }
179:
180:                // protected ////////////////////////////////////////////////////////////////
181:                @Override
182:                protected void initializeContainer() {
183:                    super .initializeContainer();
184:                    container.getNextButton().setText(
185:                            panel.getProperty(INSTALL_BUTTON_TEXT_PROPERTY));
186:                }
187:
188:                @Override
189:                protected void initialize() {
190:                    final String messageContentType = panel
191:                            .getProperty(MESSAGE_CONTENT_TYPE_PROPERTY);
192:                    messagePane.setContentType(messageContentType);
193:
194:                    final String messageText = panel
195:                            .getProperty(MESSAGE_TEXT_PROPERTY);
196:                    messagePane.setText(messageText);
197:
198:                    List<Product> componentsToInstall = Registry.getInstance()
199:                            .getProductsToInstall();
200:                    List<Product> componentsToUninstall = Registry
201:                            .getInstance().getProductsToUninstall();
202:
203:                    if (componentsToUninstall.size() > 0) {
204:                        componentsToUninstallLabel.setVisible(true);
205:                        componentsToUninstallPane.setVisible(true);
206:
207:                        final String componentsToUninstallLabelText = panel
208:                                .getProperty(COMPONENTS_TO_UNINSTALL_LABEL_TEXT_PROPERTY);
209:                        componentsToUninstallLabel
210:                                .setText(componentsToUninstallLabelText);
211:
212:                        final String componentsToUninstallContentType = panel
213:                                .getProperty(COMPONENTS_TO_UNINSTALL_CONTENT_TYPE_PROPERTY);
214:                        componentsToUninstallPane
215:                                .setContentType(componentsToUninstallContentType);
216:
217:                        final String componentsToUninstallText = StringUtils
218:                                .format(
219:                                        panel
220:                                                .getProperty(COMPONENTS_TO_UNINSTALL_TEXT_PROPERTY),
221:                                        StringUtils
222:                                                .asString(
223:                                                        componentsToUninstall,
224:                                                        panel
225:                                                                .getProperty(COMPONENTS_LIST_SEPARATOR_PROPERTY)));
226:                        componentsToUninstallPane
227:                                .setText(componentsToUninstallText);
228:                    } else {
229:                        componentsToUninstallLabel.setVisible(false);
230:                        componentsToUninstallPane.setVisible(false);
231:                    }
232:
233:                    if (componentsToInstall.size() > 0) {
234:                        componentsToInstallLabel.setVisible(true);
235:                        componentsToInstallPane.setVisible(true);
236:                        downloadSizeLabel.setVisible(true);
237:                        requiredDiskSpaceLabel.setVisible(true);
238:
239:                        final String componentsToInstallLabelText = panel
240:                                .getProperty(COMPONENTS_TO_INSTALL_LABEL_TEXT_PROPERTY);
241:                        componentsToInstallLabel
242:                                .setText(componentsToInstallLabelText);
243:
244:                        final String componentsToInstallContentType = panel
245:                                .getProperty(COMPONENTS_TO_INSTALL_CONTENT_TYPE_PROPERTY);
246:                        componentsToInstallPane
247:                                .setContentType(componentsToInstallContentType);
248:
249:                        final String componentsToInstallText = StringUtils
250:                                .format(
251:                                        panel
252:                                                .getProperty(COMPONENTS_TO_INSTALL_TEXT_PROPERTY),
253:                                        StringUtils
254:                                                .asString(
255:                                                        componentsToInstall,
256:                                                        panel
257:                                                                .getProperty(COMPONENTS_LIST_SEPARATOR_PROPERTY)));
258:
259:                        componentsToInstallPane
260:                                .setText(componentsToInstallText);
261:
262:                        long downloadSize = 0;
263:                        for (Product component : componentsToInstall) {
264:                            downloadSize += component.getDownloadSize();
265:                        }
266:
267:                        long requiredDiskSpace = 0;
268:                        for (Product component : componentsToInstall) {
269:                            requiredDiskSpace += component
270:                                    .getRequiredDiskSpace();
271:                        }
272:
273:                        final String downloadSizeLabelText = StringUtils
274:                                .format(
275:                                        panel
276:                                                .getProperty(DOWNLOAD_SIZE_LABEL_TEXT_PROPERTY),
277:                                        StringUtils.formatSize(downloadSize));
278:
279:                        downloadSizeLabel.setText(downloadSizeLabelText);
280:
281:                        final String requiredDiskSpaceLabelText = StringUtils
282:                                .format(
283:                                        panel
284:                                                .getProperty(REQUIRED_DISK_SPACE_LABEL_TEXT_PROPERTY),
285:                                        StringUtils
286:                                                .formatSize(requiredDiskSpace));
287:
288:                        requiredDiskSpaceLabel
289:                                .setText(requiredDiskSpaceLabelText);
290:                    } else {
291:                        componentsToInstallLabel.setVisible(false);
292:                        componentsToInstallPane.setVisible(false);
293:                        downloadSizeLabel.setVisible(false);
294:                        requiredDiskSpaceLabel.setVisible(false);
295:                    }
296:                }
297:
298:                @Override
299:                protected String validateInput() {
300:                    try {
301:                        if (!Boolean
302:                                .getBoolean(SystemUtils.NO_SPACE_CHECK_PROPERTY)) {
303:                            final List<File> roots = SystemUtils
304:                                    .getFileSystemRoots();
305:                            final List<Product> toInstall = Registry
306:                                    .getInstance().getProductsToInstall();
307:                            final Map<File, Long> spaceMap = new HashMap<File, Long>();
308:
309:                            LogManager.log("Available roots : "
310:                                    + StringUtils.asString(roots));
311:
312:                            File downloadDataDirRoot = FileUtils
313:                                    .getRoot(Installer.getInstance()
314:                                            .getLocalDirectory(), roots);
315:                            long downloadSize = 0;
316:                            for (Product product : toInstall) {
317:                                downloadSize += product.getDownloadSize();
318:                            }
319:                            // the critical check point - we download all the data
320:                            spaceMap.put(downloadDataDirRoot, new Long(
321:                                    downloadSize));
322:                            long lastDataSize = 0;
323:
324:                            for (Product product : toInstall) {
325:                                final File installLocation = product
326:                                        .getInstallationLocation();
327:                                final File root = FileUtils.getRoot(
328:                                        installLocation, roots);
329:                                final long productSize = product
330:                                        .getRequiredDiskSpace();
331:
332:                                LogManager.log("    [" + root + "] <- "
333:                                        + installLocation);
334:
335:                                if (root != null) {
336:                                    Long ddSize = spaceMap
337:                                            .get(downloadDataDirRoot);
338:                                    // remove space that was freed after the remove of previos product data
339:                                    spaceMap.put(downloadDataDirRoot, Long
340:                                            .valueOf(ddSize - lastDataSize));
341:
342:                                    Long size = spaceMap.get(root);
343:                                    size = Long.valueOf((size != null ? size
344:                                            .longValue() : 0L)
345:                                            + productSize);
346:                                    spaceMap.put(root, size);
347:                                    lastDataSize = product.getDownloadSize();
348:                                } else {
349:                                    return StringUtils
350:                                            .format(
351:                                                    panel
352:                                                            .getProperty(ERROR_NON_EXISTENT_ROOT_PROPERTY),
353:                                                    product, installLocation);
354:                                }
355:                            }
356:
357:                            for (File root : spaceMap.keySet()) {
358:                                try {
359:                                    final long availableSpace = SystemUtils
360:                                            .getFreeSpace(root);
361:                                    final long requiredSpace = spaceMap
362:                                            .get(root)
363:                                            + REQUIRED_SPACE_ADDITION;
364:
365:                                    if (availableSpace < requiredSpace) {
366:                                        return StringUtils
367:                                                .format(
368:                                                        panel
369:                                                                .getProperty(ERROR_NOT_ENOUGH_SPACE_PROPERTY),
370:                                                        root,
371:                                                        StringUtils
372:                                                                .formatSize(requiredSpace
373:                                                                        - availableSpace));
374:                                    }
375:                                } catch (NativeException e) {
376:                                    ErrorManager
377:                                            .notifyError(
378:                                                    panel
379:                                                            .getProperty(ERROR_CANNOT_CHECK_SPACE_PROPERTY),
380:                                                    e);
381:                                }
382:                            }
383:                        }
384:                        final List<Product> toUninstall = Registry
385:                                .getInstance().getProductsToUninstall();
386:                        for (Product product : toUninstall) {
387:                            if (!FileUtils.canWrite(product
388:                                    .getInstallationLocation())) {
389:                                return StringUtils
390:                                        .format(
391:                                                panel
392:                                                        .getProperty(ERROR_CANNOT_WRITE_PROPERTY),
393:                                                product,
394:                                                product
395:                                                        .getInstallationLocation());
396:                            }
397:                        }
398:
399:                    } catch (IOException e) {
400:                        ErrorManager.notifyError(panel
401:                                .getProperty(ERROR_FSROOTS_PROPERTY), e);
402:                    }
403:
404:                    return null;
405:                }
406:
407:                // private //////////////////////////////////////////////////////////////////
408:                private void initComponents() {
409:                    // messagePane //////////////////////////////////////////////////////////
410:                    messagePane = new NbiTextPane();
411:
412:                    // componentsToUninstallPane ////////////////////////////////////////////
413:                    componentsToUninstallPane = new NbiTextPane();
414:
415:                    // componentsToUninstallLabel ///////////////////////////////////////////
416:                    componentsToUninstallLabel = new NbiLabel();
417:                    componentsToUninstallLabel
418:                            .setLabelFor(componentsToUninstallPane);
419:
420:                    // componentsToInstallPane //////////////////////////////////////////////
421:                    componentsToInstallPane = new NbiTextPane();
422:
423:                    // componentsToInstallLabel /////////////////////////////////////////////
424:                    componentsToInstallLabel = new NbiLabel();
425:                    componentsToInstallLabel
426:                            .setLabelFor(componentsToInstallPane);
427:
428:                    // downloadSizeLabel ////////////////////////////////////////////////////
429:                    downloadSizeLabel = new NbiLabel();
430:                    downloadSizeLabel.setFocusable(true);
431:
432:                    // requiredDiskSpaceLabel ///////////////////////////////////////////////
433:                    requiredDiskSpaceLabel = new NbiLabel();
434:                    requiredDiskSpaceLabel.setFocusable(true);
435:
436:                    // spacer ///////////////////////////////////////////////////////////////
437:                    spacer = new NbiPanel();
438:
439:                    // this /////////////////////////////////////////////////////////////////
440:                    add(messagePane, new GridBagConstraints(0, 0, // x, y
441:                            1, 1, // width, height
442:                            1.0, 0.0, // weight-x, weight-y
443:                            GridBagConstraints.CENTER, // anchor
444:                            GridBagConstraints.BOTH, // fill
445:                            new Insets(11, 11, 0, 11), // padding
446:                            0, 0)); // padx, pady - ???
447:                    add(componentsToUninstallLabel, new GridBagConstraints(0,
448:                            1, // x, y
449:                            1, 1, // width, height
450:                            1.0, 0.0, // weight-x, weight-y
451:                            GridBagConstraints.CENTER, // anchor
452:                            GridBagConstraints.BOTH, // fill
453:                            new Insets(15, 11, 0, 11), // padding
454:                            0, 0)); // padx, pady - ???
455:                    add(componentsToUninstallPane, new GridBagConstraints(0, 2, // x, y
456:                            1, 1, // width, height
457:                            1.0, 0.0, // weight-x, weight-y
458:                            GridBagConstraints.CENTER, // anchor
459:                            GridBagConstraints.BOTH, // fill
460:                            new Insets(3, 11, 0, 11), // padding
461:                            0, 0)); // padx, pady - ???
462:                    add(componentsToInstallLabel, new GridBagConstraints(0, 3, // x, y
463:                            1, 1, // width, height
464:                            1.0, 0.0, // weight-x, weight-y
465:                            GridBagConstraints.CENTER, // anchor
466:                            GridBagConstraints.BOTH, // fill
467:                            new Insets(15, 11, 0, 11), // padding
468:                            0, 0)); // padx, pady - ???
469:                    add(componentsToInstallPane, new GridBagConstraints(0, 4, // x, y
470:                            1, 1, // width, height
471:                            1.0, 0.0, // weight-x, weight-y
472:                            GridBagConstraints.CENTER, // anchor
473:                            GridBagConstraints.BOTH, // fill
474:                            new Insets(3, 11, 0, 11), // padding
475:                            0, 0)); // padx, pady - ???
476:                    add(downloadSizeLabel, new GridBagConstraints(0, 5, // x, y
477:                            1, 1, // width, height
478:                            1.0, 0.0, // weight-x, weight-y
479:                            GridBagConstraints.CENTER, // anchor
480:                            GridBagConstraints.BOTH, // fill
481:                            new Insets(25, 11, 0, 11), // padding
482:                            0, 0)); // padx, pady - ???
483:                    add(requiredDiskSpaceLabel, new GridBagConstraints(0, 6, // x, y
484:                            1, 1, // width, height
485:                            1.0, 0.0, // weight-x, weight-y
486:                            GridBagConstraints.CENTER, // anchor
487:                            GridBagConstraints.BOTH, // fill
488:                            new Insets(3, 11, 0, 11), // padding
489:                            0, 0)); // padx, pady - ???
490:                    add(spacer, new GridBagConstraints(0, 7, // x, y
491:                            1, 1, // width, height
492:                            1.0, 1.0, // weight-x, weight-y
493:                            GridBagConstraints.CENTER, // anchor
494:                            GridBagConstraints.BOTH, // fill
495:                            new Insets(0, 11, 11, 11), // padding
496:                            0, 0)); // padx, pady - ???
497:                }
498:            }
499:
500:            /////////////////////////////////////////////////////////////////////////////////
501:            // Constants
502:            public static final String DEFAULT_TITLE = ResourceUtils.getString(
503:                    PreInstallSummaryPanel.class, "PrISP.title");
504:
505:            public static final String MESSAGE_TEXT_PROPERTY = "message.text";
506:            public static final String MESSAGE_CONTENT_TYPE_PROPERTY = "message.content.type";
507:            public static final String COMPONENTS_TO_INSTALL_LABEL_TEXT_PROPERTY = "components.to.install.label.text";
508:            public static final String COMPONENTS_TO_INSTALL_TEXT_PROPERTY = "components.to.install.text";
509:            public static final String COMPONENTS_TO_INSTALL_CONTENT_TYPE_PROPERTY = "components.to.install.content.type";
510:            public static final String COMPONENTS_TO_UNINSTALL_LABEL_TEXT_PROPERTY = "components.to.uninstall.label.text";
511:            public static final String COMPONENTS_TO_UNINSTALL_TEXT_PROPERTY = "components.to.uninstall.text";
512:            public static final String COMPONENTS_TO_UNINSTALL_CONTENT_TYPE_PROPERTY = "components.to.uninstall.content.type";
513:            public static final String COMPONENTS_LIST_SEPARATOR_PROPERTY = "components.list.separator";
514:            public static final String DOWNLOAD_SIZE_LABEL_TEXT_PROPERTY = "download.size.label.text";
515:            public static final String REQUIRED_DISK_SPACE_LABEL_TEXT_PROPERTY = "required.disk.space.label.text";
516:            public static final String INSTALL_BUTTON_TEXT_PROPERTY = "install.button.text";
517:
518:            public static final String ERROR_NOT_ENOUGH_SPACE_PROPERTY = "error.not.enough.space"; // NOI18N
519:            public static final String ERROR_CANNOT_CHECK_SPACE_PROPERTY = "error.cannot.check.space"; // NOI18N
520:            public static final String ERROR_LOGIC_ACCESS_PROPERTY = "error.logic.access"; // NOI18N
521:            public static final String ERROR_FSROOTS_PROPERTY = "error.fsroots"; // NOI18N
522:            public static final String ERROR_NON_EXISTENT_ROOT_PROPERTY = "error.non.existent.root"; // NOI18N
523:            public static final String ERROR_CANNOT_WRITE_PROPERTY = "error.cannot.write"; // NOI18N
524:
525:            public static final String DEFAULT_MESSAGE_TEXT = ResourceUtils
526:                    .getString(PreInstallSummaryPanel.class,
527:                            "PrISP.message.text");
528:            public static final String DEFAULT_MESSAGE_CONTENT_TYPE = ResourceUtils
529:                    .getString(PreInstallSummaryPanel.class,
530:                            "PrISP.message.content.type");
531:            public static final String DEFAULT_COMPONENTS_TO_INSTALL_LABEL_TEXT = ResourceUtils
532:                    .getString(PreInstallSummaryPanel.class,
533:                            "PrISP.components.to.install.label.text");
534:            public static final String DEFAULT_COMPONENTS_TO_INSTALL_TEXT = ResourceUtils
535:                    .getString(PreInstallSummaryPanel.class,
536:                            "PrISP.components.to.install.text");
537:            public static final String DEFAULT_COMPONENTS_TO_INSTALL_CONTENT_TYPE = ResourceUtils
538:                    .getString(PreInstallSummaryPanel.class,
539:                            "PrISP.components.to.install.content.type");
540:            public static final String DEFAULT_COMPONENTS_TO_UNINSTALL_LABEL_TEXT = ResourceUtils
541:                    .getString(PreInstallSummaryPanel.class,
542:                            "PrISP.components.to.uninstall.label.text");
543:            public static final String DEFAULT_COMPONENTS_TO_UNINSTALL_TEXT = ResourceUtils
544:                    .getString(PreInstallSummaryPanel.class,
545:                            "PrISP.components.to.uninstall.text");
546:            public static final String DEFAULT_COMPONENTS_TO_UNINSTALL_CONTENT_TYPE = ResourceUtils
547:                    .getString(PreInstallSummaryPanel.class,
548:                            "PrISP.components.to.uninstall.content.type");
549:            public static final String DEFAULT_COMPONENTS_LIST_SEPARATOR = ResourceUtils
550:                    .getString(PreInstallSummaryPanel.class,
551:                            "PrISP.components.list.separator");
552:            public static final String DEFAULT_DOWNLOAD_SIZE_LABEL_TEXT = ResourceUtils
553:                    .getString(PreInstallSummaryPanel.class,
554:                            "PrISP.download.size.label.text");
555:            public static final String DEFAULT_REQUIRED_DISK_SPACE_LABEL_TEXT = ResourceUtils
556:                    .getString(PreInstallSummaryPanel.class,
557:                            "PrISP.required.disk.space.label.text");
558:            public static final String DEFAULT_INSTALL_BUTTON_TEXT = ResourceUtils
559:                    .getString(PreInstallSummaryPanel.class,
560:                            "PrISP.install.button.text");
561:            public static final String DEFAULT_ERROR_NOT_ENOUGH_SPACE = ResourceUtils
562:                    .getString(PreInstallSummaryPanel.class,
563:                            "PrISP.error.not.enough.space"); // NOI18N
564:            public static final String DEFAULT_ERROR_CANNOT_CHECK_SPACE = ResourceUtils
565:                    .getString(PreInstallSummaryPanel.class,
566:                            "PrISP.error.cannot.check.space");// NOI8N
567:            public static final String DEFAULT_ERROR_LOGIC_ACCESS = ResourceUtils
568:                    .getString(PreInstallSummaryPanel.class,
569:                            "PrISP.error.logic.access");// NOI18N
570:            public static final String DEFAULT_ERROR_FSROOTS = ResourceUtils
571:                    .getString(PreInstallSummaryPanel.class,
572:                            "PrISP.error.fsroots"); // NOI18N
573:            public static final String DEFAULT_ERROR_NON_EXISTENT_ROOT = ResourceUtils
574:                    .getString(PreInstallSummaryPanel.class,
575:                            "PrISP.error.non.existent.root"); // NOI18N
576:            public static final String DEFAULT_ERROR_CANNOT_WRITE = ResourceUtils
577:                    .getString(PreInstallSummaryPanel.class,
578:                            "PrISP.error.cannot.write"); // NOI18N
579:
580:            public static final long REQUIRED_SPACE_ADDITION = 10L * 1024L * 1024L; // 10MB
581:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.