-
Notifications
You must be signed in to change notification settings - Fork 2
/
WizardPanel.java
executable file
·91 lines (76 loc) · 2.89 KB
/
WizardPanel.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
public abstract class WizardPanel extends javax.swing.JPanel implements java.awt.event.FocusListener
{
private javax.swing.JLabel wizardLabel = null;
private String stepText = null;
private java.awt.Component firstFocusable = null;
/** Creates new form WizardPanel */
public WizardPanel(String stepText)
{
this.stepText = stepText;
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents()
{ //GEN-BEGIN:initComponents
setLayout(new java.awt.BorderLayout());
} //GEN-END:initComponents
public void focusGained(java.awt.event.FocusEvent focusEvent)
{
//javax.swing.JOptionPane.showMessageDialog(this,"Gain");
if( wizardLabel == null ) return;
wizardLabel.setFont(wizardLabel.getFont().deriveFont(java.awt.Font.BOLD));
if( firstFocusable != null ) firstFocusable.requestFocus();
}
public void focusLost(java.awt.event.FocusEvent focusEvent) {
//javax.swing.JOptionPane.showMessageDialog(this,"Loss");
if( wizardLabel == null ) return;
wizardLabel.setFont(wizardLabel.getFont().deriveFont(java.awt.Font.PLAIN));
}
public abstract boolean doValidation();
/** Getter for property wizardLabel.
* @return Value of property wizardLabel.
*/
public javax.swing.JLabel getWizardLabel() {
return wizardLabel;
}
/** Setter for property wizardLabel.
* @param wizardLabel New value of property wizardLabel.
*/
public void setWizardLabel(javax.swing.JLabel wizardLabel)
{
this.wizardLabel = wizardLabel;
}
/** Getter for property stepText.
* @return Value of property stepText.
*/
public java.lang.String getStepText() {
return stepText;
}
/** Setter for property stepText.
* @param stepText New value of property stepText.
*/
public void setStepText(java.lang.String stepText)
{
this.stepText = stepText;
}
/** Getter for property firstFocusable.
* @return Value of property firstFocusable.
*/
public java.awt.Component getFirstFocusable()
{
return firstFocusable;
}
/** Setter for property firstFocusable.
* @param firstFocusable New value of property firstFocusable.
*/
public void setFirstFocusable(java.awt.Component firstFocusable)
{
this.firstFocusable = firstFocusable;
}
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}