01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * When distributing Covered Code, include this CDDL Header Notice in each file
10: * and include the License file at http://www.netbeans.org/cddl.txt.
11: * If applicable, add the following below the CDDL Header, with the fields
12: * enclosed by brackets [] replaced by your own identifying information:
13: * "Portions Copyrighted [year] [name of copyright owner]"
14: *
15: * The Original Software is NetBeans. The Initial Developer of the Original
16: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17: * Microsystems, Inc. All Rights Reserved.
18: */
19:
20: package org.netbeans.modules.bpel.project.ui.customizer;
21:
22: import java.util.Map;
23: import javax.swing.JComponent;
24:
25: import org.netbeans.spi.project.ui.support.ProjectCustomizer;
26: import org.openide.util.NbBundle;
27:
28: import org.netbeans.modules.xml.catalogsupport.ui.customizer.CustomizerProviderImpl;
29:
30: import org.netbeans.modules.bpel.project.BpelproProject;
31: import org.netbeans.modules.compapp.projects.base.ui.customizer.IcanproProjectProperties;
32:
33: /**
34: * Customization of BPEL project
35: *
36: * @author Ajit Bhate
37: */
38: public class BpelProjectCustomizerProvider extends
39: CustomizerProviderImpl {
40:
41: private static final String GENERAL = "General";
42: private IcanproProjectProperties projectProperties;
43:
44: public BpelProjectCustomizerProvider(BpelproProject project) {
45: super (project, project.getAntProjectHelper(), project
46: .getReferenceHelper());
47: }
48:
49: @Override
50: protected Map<ProjectCustomizer.Category, JComponent> createCategoriesMap() {
51: ProjectCustomizer.Category general = ProjectCustomizer.Category
52: .create(GENERAL, NbBundle.getMessage(
53: BpelProjectCustomizerProvider.class,
54: "LBL_Config_General"), // NOI18N
55: null);
56: getCategories().add(general);
57: Map<ProjectCustomizer.Category, JComponent> map = super
58: .createCategoriesMap();
59: projectProperties = ((BpelproProject) getProject())
60: .getProjectProperties();
61: CustomizerGeneral generalPanel = new CustomizerGeneral(
62: projectProperties);
63: generalPanel.initValues();
64: map.put(general, generalPanel);
65: return map;
66: }
67:
68: @Override
69: protected void storeProjectData() {
70: super.storeProjectData();
71: projectProperties.store();
72: }
73: }
|