Lines 24-71
Link Here
|
24 |
* |
24 |
* |
25 |
* @author __USER__ |
25 |
* @author __USER__ |
26 |
*/ |
26 |
*/ |
27 |
public class __Sample_Wizard__Panel extends javax.swing.JPanel implements WizardDescriptor.Panel /* .FinishPanel */ { |
27 |
public class __Sample_Wizard__Panel implements WizardDescriptor.Panel /* .FinishPanel */ { |
28 |
|
28 |
|
29 |
/** Create the wizard panel and set up some basic properties. */ |
29 |
/** the actual GUI component we are using */ |
|
|
30 |
private VisualPanel visualPanel = null; |
31 |
|
32 |
/** Construct the panel implementation. */ |
30 |
public __Sample_Wizard__Panel () { |
33 |
public __Sample_Wizard__Panel () { |
31 |
initComponents (); |
|
|
32 |
// Provide a name in the title bar. |
33 |
setName (NbBundle.getMessage (__NAME__.class, "TITLE_WizardPanel")); |
34 |
/* |
35 |
// Optional: provide a special description for this pane. |
36 |
// You must have turned on WizardDescriptor.WizardPanel_helpDisplayed |
37 |
// (see descriptor in standard iterator template for an example of this). |
38 |
try { |
39 |
putClientProperty ("WizardPanel_helpURL", // NOI18N |
40 |
new URL ("nbresloc:/__PACKAGE_AND_NAME_SLASHES$Panel$$somewhere/My__Help.html")); // NOI18N |
41 |
} catch (MalformedURLException mfue) { |
42 |
throw new IllegalStateException (mfue.toString ()); |
43 |
} |
44 |
*/ |
45 |
} |
34 |
} |
46 |
|
35 |
|
47 |
// --- VISUAL DESIGN OF PANEL --- |
36 |
// --- VISUAL DESIGN OF PANEL --- |
48 |
|
37 |
|
49 |
/** This method is called from within the constructor to |
38 |
/** The actual GUI component to be displayed in the wizard. |
50 |
* initialize the form. |
39 |
* You may customize its appearance using the Form Editor. |
51 |
* WARNING: Do NOT modify this code. The content of this method is |
|
|
52 |
* always regenerated by the Form Editor. |
53 |
*/ |
40 |
*/ |
54 |
private void initComponents() {//GEN-BEGIN:initComponents |
41 |
private class VisualPanel extends javax.swing.JPanel { |
55 |
setLayout(new java.awt.BorderLayout()); |
42 |
|
|
|
43 |
/** Create the wizard panel and set up some basic properties. */ |
44 |
public VisualPanel () { |
45 |
initComponents (); |
46 |
// Provide a name in the title bar. |
47 |
setName (NbBundle.getMessage (__NAME__.class, "TITLE_WizardPanel")); |
48 |
/* |
49 |
// Optional: provide a special description for this pane. |
50 |
// You must have turned on WizardDescriptor.WizardPanel_helpDisplayed |
51 |
// (see descriptor in standard iterator template for an example of this). |
52 |
try { |
53 |
putClientProperty ("WizardPanel_helpURL", // NOI18N |
54 |
new URL ("nbresloc:/__PACKAGE_AND_NAME_SLASHES$Panel$$somewhere/My__Help.html")); // NOI18N |
55 |
} catch (MalformedURLException mfue) { |
56 |
throw new IllegalStateException (mfue.toString ()); |
57 |
} |
58 |
*/ |
59 |
} |
56 |
|
60 |
|
57 |
}//GEN-END:initComponents |
61 |
/** This method is called from within the constructor to |
|
|
62 |
* initialize the form. |
63 |
* WARNING: Do NOT modify this code. The content of this method is |
64 |
* always regenerated by the Form Editor. |
65 |
*/ |
66 |
private void initComponents() {//GEN-BEGIN:initComponents |
67 |
setLayout(new java.awt.BorderLayout()); |
58 |
|
68 |
|
59 |
// Variables declaration - do not modify//GEN-BEGIN:variables |
69 |
}//GEN-END:initComponents |
60 |
// End of variables declaration//GEN-END:variables |
70 |
|
|
|
71 |
// Variables declaration - do not modify//GEN-BEGIN:variables |
72 |
// End of variables declaration//GEN-END:variables |
73 |
|
74 |
} |
61 |
|
75 |
|
62 |
// --- WizardDescriptor.Panel METHODS --- |
76 |
// --- WizardDescriptor.Panel METHODS --- |
63 |
|
77 |
|
64 |
// Get the visual component for the panel. In this template, the same class |
|
|
65 |
// serves as the component and the Panel interface, but you could keep |
66 |
// them separate if you wished. |
67 |
public Component getComponent () { |
78 |
public Component getComponent () { |
68 |
return this; |
79 |
// In some cases can be helpful to be lazy about creating the GUI |
|
|
80 |
// components. They are typically more expensive to create than |
81 |
// other things, and the wizard descriptor might be created but |
82 |
// never shown or only partially shown, for example. |
83 |
if (visualPanel == null) { |
84 |
visualPanel = new VisualPanel (); |
85 |
} |
86 |
return visualPanel; |
69 |
} |
87 |
} |
70 |
|
88 |
|
71 |
public HelpCtx getHelp () { |
89 |
public HelpCtx getHelp () { |