49 |
{ |
{ |
50 |
private static final long serialVersionUID = -5246739313864538930L; |
private static final long serialVersionUID = -5246739313864538930L; |
51 |
|
|
52 |
|
private boolean borderPaintedFlat; |
53 |
|
|
54 |
|
private void init() |
55 |
|
{ |
56 |
|
borderPainted = false; |
57 |
|
contentAreaFilled = false; |
58 |
|
} |
59 |
|
|
60 |
public JCheckBox() |
public JCheckBox() |
61 |
{ |
{ |
62 |
this(null, null); |
super(); |
63 |
|
init(); |
64 |
} |
} |
65 |
public JCheckBox(Action a) |
|
66 |
|
public JCheckBox(Action action) |
67 |
{ |
{ |
68 |
this(); |
super(action); |
69 |
setAction(a); |
init(); |
70 |
} |
} |
71 |
|
|
72 |
public JCheckBox(Icon icon) |
public JCheckBox(Icon icon) |
73 |
{ |
{ |
74 |
this(null, icon); |
super(icon); |
75 |
|
init(); |
76 |
|
} |
77 |
|
|
78 |
|
public JCheckBox(Icon icon, boolean selected) |
79 |
|
{ |
80 |
|
super(icon, selected); |
81 |
|
init(); |
82 |
} |
} |
83 |
|
|
84 |
public JCheckBox(String text) |
public JCheckBox(String text) |
85 |
{ |
{ |
86 |
this(text, null); |
super(text); |
87 |
|
init(); |
88 |
|
} |
89 |
|
|
90 |
|
public JCheckBox(String text, boolean selected) |
91 |
|
{ |
92 |
|
super(text, selected); |
93 |
|
init(); |
94 |
} |
} |
95 |
|
|
96 |
public JCheckBox(String text, Icon icon) |
public JCheckBox(String text, Icon icon) |
97 |
{ |
{ |
98 |
super(text, icon); |
super(text, icon); |
99 |
paint_border = false; |
init(); |
|
content_area_filled = false; |
|
100 |
} |
} |
101 |
|
|
102 |
|
public JCheckBox(String text, Icon icon, boolean selected) |
103 |
|
{ |
104 |
|
super(text, icon, selected); |
105 |
|
init(); |
106 |
|
} |
107 |
|
|
108 |
|
/** |
109 |
|
* Gets the AccessibleContext associated with this JCheckBox. |
110 |
|
*/ |
111 |
public AccessibleContext getAccessibleContext() |
public AccessibleContext getAccessibleContext() |
112 |
{ |
{ |
|
//Gets the AccessibleContext associated with this JCheckBox. |
|
113 |
return null; |
return null; |
114 |
} |
} |
115 |
|
|
116 |
|
/** |
117 |
|
* Returns a string that specifies the name of the L&F class |
118 |
|
* that renders this component. |
119 |
|
*/ |
120 |
public String getUIClassID() |
public String getUIClassID() |
121 |
{ |
{ |
|
//Returns a string that specifies the name of the Look and Feel |
|
|
//class that renders this component. |
|
122 |
return "CheckBoxUI"; |
return "CheckBoxUI"; |
123 |
} |
} |
124 |
|
|
126 |
{ |
{ |
127 |
return "JCheckBox"; |
return "JCheckBox"; |
128 |
} |
} |
129 |
|
|
130 |
|
public boolean isBorderPaintedFlat() |
131 |
|
{ |
132 |
|
return borderPaintedFlat; |
133 |
|
} |
134 |
|
|
135 |
|
public void setBorderPaintedFlat(boolean newValue) |
136 |
|
{ |
137 |
|
firePropertyChange("borderPaintedFlat", borderPaintedFlat, newValue); |
138 |
|
borderPaintedFlat = newValue; |
139 |
|
} |
140 |
} |
} |