1 package info.mikethomas.fahview.v6project.properties;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 import info.mikethomas.fahview.v6project.ClientProject;
25 import java.awt.Dialog;
26 import java.awt.event.ActionEvent;
27 import java.awt.event.ActionListener;
28 import org.netbeans.api.project.ProjectUtils;
29 import org.netbeans.spi.project.ui.CustomizerProvider;
30 import org.netbeans.spi.project.ui.support.ProjectCustomizer;
31 import org.openide.awt.StatusDisplayer;
32 import org.openide.util.lookup.Lookups;
33
34
35
36
37
38
39
40 public class ClientCustomizerProvider implements CustomizerProvider {
41
42
43 public static final String CUSTOMIZER_FOLDER_PATH =
44 "Projects/info-mikethomas-fahview/Customizer";
45
46 private final ClientProject project;
47
48
49
50
51
52
53 public ClientCustomizerProvider(ClientProject project) {
54 this.project = project;
55 }
56
57
58 @Override
59 public void showCustomizer() {
60 Dialog dialog = ProjectCustomizer.createCustomizerDialog(
61
62 CUSTOMIZER_FOLDER_PATH,
63
64 Lookups.fixed(project),
65
66 "",
67
68 new OKOptionListener(),
69
70 null);
71 dialog.setTitle(ProjectUtils.getInformation(project).getDisplayName());
72 dialog.setVisible(true);
73 }
74
75 private class OKOptionListener implements ActionListener {
76
77 @Override
78 public void actionPerformed(ActionEvent e) {
79 StatusDisplayer.getDefault().setStatusText("OK button clicked for "
80 + project.getProjectDirectory().getName() + " customizer!");
81 }
82 }
83 }