88 // Ocean icons |
88 // Ocean icons |
89 private static Icon oceanHorizontalSliderThumb; |
89 private static Icon oceanHorizontalSliderThumb; |
90 private static Icon oceanVerticalSliderThumb; |
90 private static Icon oceanVerticalSliderThumb; |
91 |
91 |
92 // Constants |
92 // Constants |
|
93 /** |
|
94 * {@code DARK} is used for the property {@code Tree.expandedIcon}. |
|
95 */ |
93 public static final boolean DARK = false; |
96 public static final boolean DARK = false; |
|
97 |
|
98 /** |
|
99 * {@code LIGHT} is used for the property {@code Tree.collapsedIcon}. |
|
100 */ |
94 public static final boolean LIGHT = true; |
101 public static final boolean LIGHT = true; |
95 |
102 |
96 // Accessor functions for Icons. Does the caching work. |
103 // Accessor functions for Icons. Does the caching work. |
|
104 /** |
|
105 * Returns the instance of {@code FileChooserDetailViewIcon}. |
|
106 * |
|
107 * @return the instance of {@code FileChooserDetailViewIcon} |
|
108 */ |
97 public static Icon getFileChooserDetailViewIcon() { |
109 public static Icon getFileChooserDetailViewIcon() { |
98 if (fileChooserDetailViewIcon == null) { |
110 if (fileChooserDetailViewIcon == null) { |
99 fileChooserDetailViewIcon = new FileChooserDetailViewIcon(); |
111 fileChooserDetailViewIcon = new FileChooserDetailViewIcon(); |
100 } |
112 } |
101 return fileChooserDetailViewIcon; |
113 return fileChooserDetailViewIcon; |
102 } |
114 } |
103 |
115 |
|
116 /** |
|
117 * Returns the instance of {@code FileChooserHomeFolderIcon}. |
|
118 * |
|
119 * @return the instance of {@code FileChooserHomeFolderIcon} |
|
120 */ |
104 public static Icon getFileChooserHomeFolderIcon() { |
121 public static Icon getFileChooserHomeFolderIcon() { |
105 if (fileChooserHomeFolderIcon == null) { |
122 if (fileChooserHomeFolderIcon == null) { |
106 fileChooserHomeFolderIcon = new FileChooserHomeFolderIcon(); |
123 fileChooserHomeFolderIcon = new FileChooserHomeFolderIcon(); |
107 } |
124 } |
108 return fileChooserHomeFolderIcon; |
125 return fileChooserHomeFolderIcon; |
109 } |
126 } |
110 |
127 |
|
128 /** |
|
129 * Returns the instance of {@code FileChooserListViewIcon}. |
|
130 * |
|
131 * @return the instance of {@code FileChooserListViewIcon} |
|
132 */ |
111 public static Icon getFileChooserListViewIcon() { |
133 public static Icon getFileChooserListViewIcon() { |
112 if (fileChooserListViewIcon == null) { |
134 if (fileChooserListViewIcon == null) { |
113 fileChooserListViewIcon = new FileChooserListViewIcon(); |
135 fileChooserListViewIcon = new FileChooserListViewIcon(); |
114 } |
136 } |
115 return fileChooserListViewIcon; |
137 return fileChooserListViewIcon; |
116 } |
138 } |
117 |
139 |
|
140 /** |
|
141 * Returns the instance of {@code FileChooserNewFolderIcon}. |
|
142 * |
|
143 * @return the instance of {@code FileChooserNewFolderIcon} |
|
144 */ |
118 public static Icon getFileChooserNewFolderIcon() { |
145 public static Icon getFileChooserNewFolderIcon() { |
119 if (fileChooserNewFolderIcon == null) { |
146 if (fileChooserNewFolderIcon == null) { |
120 fileChooserNewFolderIcon = new FileChooserNewFolderIcon(); |
147 fileChooserNewFolderIcon = new FileChooserNewFolderIcon(); |
121 } |
148 } |
122 return fileChooserNewFolderIcon; |
149 return fileChooserNewFolderIcon; |
123 } |
150 } |
124 |
151 |
|
152 /** |
|
153 * Returns the instance of {@code FileChooserUpFolderIcon}. |
|
154 * |
|
155 * @return the instance of {@code FileChooserUpFolderIcon} |
|
156 */ |
125 public static Icon getFileChooserUpFolderIcon() { |
157 public static Icon getFileChooserUpFolderIcon() { |
126 if (fileChooserUpFolderIcon == null) { |
158 if (fileChooserUpFolderIcon == null) { |
127 fileChooserUpFolderIcon = new FileChooserUpFolderIcon(); |
159 fileChooserUpFolderIcon = new FileChooserUpFolderIcon(); |
128 } |
160 } |
129 return fileChooserUpFolderIcon; |
161 return fileChooserUpFolderIcon; |
130 } |
162 } |
131 |
163 |
|
164 /** |
|
165 * Constructs a new instance of {@code InternalFrameAltMaximizeIcon}. |
|
166 * |
|
167 * @param size the size of the icon |
|
168 * @return a new instance of {@code InternalFrameAltMaximizeIcon} |
|
169 */ |
132 public static Icon getInternalFrameAltMaximizeIcon(int size) { |
170 public static Icon getInternalFrameAltMaximizeIcon(int size) { |
133 return new InternalFrameAltMaximizeIcon(size); |
171 return new InternalFrameAltMaximizeIcon(size); |
134 } |
172 } |
135 |
173 |
|
174 /** |
|
175 * Constructs a new instance of {@code InternalFrameCloseIcon}. |
|
176 * |
|
177 * @param size the size of the icon |
|
178 * @return a new instance of {@code InternalFrameCloseIcon} |
|
179 */ |
136 public static Icon getInternalFrameCloseIcon(int size) { |
180 public static Icon getInternalFrameCloseIcon(int size) { |
137 return new InternalFrameCloseIcon(size); |
181 return new InternalFrameCloseIcon(size); |
138 } |
182 } |
139 |
183 |
|
184 /** |
|
185 * Returns the instance of {@code InternalFrameDefaultMenuIcon}. |
|
186 * |
|
187 * @return the instance of {@code InternalFrameDefaultMenuIcon} |
|
188 */ |
140 public static Icon getInternalFrameDefaultMenuIcon() { |
189 public static Icon getInternalFrameDefaultMenuIcon() { |
141 if (internalFrameDefaultMenuIcon == null) { |
190 if (internalFrameDefaultMenuIcon == null) { |
142 internalFrameDefaultMenuIcon = new InternalFrameDefaultMenuIcon(); |
191 internalFrameDefaultMenuIcon = new InternalFrameDefaultMenuIcon(); |
143 } |
192 } |
144 return internalFrameDefaultMenuIcon; |
193 return internalFrameDefaultMenuIcon; |
145 } |
194 } |
146 |
195 |
|
196 /** |
|
197 * Constructs a new instance of {@code InternalFrameMaximizeIcon}. |
|
198 * |
|
199 * @param size the size of the icon |
|
200 * @return a new instance of {@code InternalFrameMaximizeIcon} |
|
201 */ |
147 public static Icon getInternalFrameMaximizeIcon(int size) { |
202 public static Icon getInternalFrameMaximizeIcon(int size) { |
148 return new InternalFrameMaximizeIcon(size); |
203 return new InternalFrameMaximizeIcon(size); |
149 } |
204 } |
150 |
205 |
|
206 /** |
|
207 * Constructs a new instance of {@code InternalFrameMinimizeIcon}. |
|
208 * |
|
209 * @param size the size of the icon |
|
210 * @return a new instance of {@code InternalFrameMinimizeIcon} |
|
211 */ |
151 public static Icon getInternalFrameMinimizeIcon(int size) { |
212 public static Icon getInternalFrameMinimizeIcon(int size) { |
152 return new InternalFrameMinimizeIcon(size); |
213 return new InternalFrameMinimizeIcon(size); |
153 } |
214 } |
154 |
215 |
|
216 /** |
|
217 * Returns the instance of {@code RadioButtonIcon}. |
|
218 * |
|
219 * @return the instance of {@code RadioButtonIcon} |
|
220 */ |
155 public static Icon getRadioButtonIcon() { |
221 public static Icon getRadioButtonIcon() { |
156 if (radioButtonIcon == null) { |
222 if (radioButtonIcon == null) { |
157 radioButtonIcon = new RadioButtonIcon(); |
223 radioButtonIcon = new RadioButtonIcon(); |
158 } |
224 } |
159 return radioButtonIcon; |
225 return radioButtonIcon; |
160 } |
226 } |
161 |
227 |
162 /** |
228 /** |
163 * Returns a checkbox icon. |
229 * Returns a checkbox icon. |
|
230 * |
|
231 * @return a checkbox icon |
164 * @since 1.3 |
232 * @since 1.3 |
165 */ |
233 */ |
166 public static Icon getCheckBoxIcon() { |
234 public static Icon getCheckBoxIcon() { |
167 if (checkBoxIcon == null) { |
235 if (checkBoxIcon == null) { |
168 checkBoxIcon = new CheckBoxIcon(); |
236 checkBoxIcon = new CheckBoxIcon(); |
169 } |
237 } |
170 return checkBoxIcon; |
238 return checkBoxIcon; |
171 } |
239 } |
172 |
240 |
|
241 /** |
|
242 * Returns the instance of {@code TreeComputerIcon}. |
|
243 * |
|
244 * @return the instance of {@code TreeComputerIcon} |
|
245 */ |
173 public static Icon getTreeComputerIcon() { |
246 public static Icon getTreeComputerIcon() { |
174 if ( treeComputerIcon == null ) { |
247 if ( treeComputerIcon == null ) { |
175 treeComputerIcon = new TreeComputerIcon(); |
248 treeComputerIcon = new TreeComputerIcon(); |
176 } |
249 } |
177 return treeComputerIcon; |
250 return treeComputerIcon; |
178 } |
251 } |
179 |
252 |
|
253 /** |
|
254 * Returns the instance of {@code TreeFloppyDriveIcon}. |
|
255 * |
|
256 * @return the instance of {@code TreeFloppyDriveIcon} |
|
257 */ |
180 public static Icon getTreeFloppyDriveIcon() { |
258 public static Icon getTreeFloppyDriveIcon() { |
181 if ( treeFloppyDriveIcon == null ) { |
259 if ( treeFloppyDriveIcon == null ) { |
182 treeFloppyDriveIcon = new TreeFloppyDriveIcon(); |
260 treeFloppyDriveIcon = new TreeFloppyDriveIcon(); |
183 } |
261 } |
184 return treeFloppyDriveIcon; |
262 return treeFloppyDriveIcon; |
185 } |
263 } |
186 |
264 |
|
265 /** |
|
266 * Constructs a new instance of {@code TreeFolderIcon}. |
|
267 * |
|
268 * @return a new instance of {@code TreeFolderIcon} |
|
269 */ |
187 public static Icon getTreeFolderIcon() { |
270 public static Icon getTreeFolderIcon() { |
188 return new TreeFolderIcon(); |
271 return new TreeFolderIcon(); |
189 } |
272 } |
190 |
273 |
|
274 /** |
|
275 * Returns the instance of {@code TreeHardDriveIcon}. |
|
276 * |
|
277 * @return the instance of {@code TreeHardDriveIcon} |
|
278 */ |
191 public static Icon getTreeHardDriveIcon() { |
279 public static Icon getTreeHardDriveIcon() { |
192 if ( treeHardDriveIcon == null ) { |
280 if ( treeHardDriveIcon == null ) { |
193 treeHardDriveIcon = new TreeHardDriveIcon(); |
281 treeHardDriveIcon = new TreeHardDriveIcon(); |
194 } |
282 } |
195 return treeHardDriveIcon; |
283 return treeHardDriveIcon; |
196 } |
284 } |
197 |
285 |
|
286 /** |
|
287 * Constructs a new instance of {@code TreeLeafIcon}. |
|
288 * |
|
289 * @return a new instance of {@code TreeLeafIcon} |
|
290 */ |
198 public static Icon getTreeLeafIcon() { |
291 public static Icon getTreeLeafIcon() { |
199 return new TreeLeafIcon(); |
292 return new TreeLeafIcon(); |
200 } |
293 } |
201 |
294 |
|
295 /** |
|
296 * Constructs a new instance of {@code TreeControlIcon}. |
|
297 * |
|
298 * @param isCollapsed if {@code true} the icon is collapsed |
|
299 * @return a new instance of {@code TreeControlIcon} |
|
300 */ |
202 public static Icon getTreeControlIcon( boolean isCollapsed ) { |
301 public static Icon getTreeControlIcon( boolean isCollapsed ) { |
203 return new TreeControlIcon( isCollapsed ); |
302 return new TreeControlIcon( isCollapsed ); |
204 } |
303 } |
205 |
304 |
|
305 /** |
|
306 * Returns an icon to be used by {@code JMenu}. |
|
307 * |
|
308 * @return an icon to be used by {@code JMenu} |
|
309 */ |
206 public static Icon getMenuArrowIcon() { |
310 public static Icon getMenuArrowIcon() { |
207 if (menuArrowIcon == null) { |
311 if (menuArrowIcon == null) { |
208 menuArrowIcon = new MenuArrowIcon(); |
312 menuArrowIcon = new MenuArrowIcon(); |
209 } |
313 } |
210 return menuArrowIcon; |
314 return menuArrowIcon; |
218 */ |
322 */ |
219 public static Icon getMenuItemCheckIcon() { |
323 public static Icon getMenuItemCheckIcon() { |
220 return null; |
324 return null; |
221 } |
325 } |
222 |
326 |
|
327 /** |
|
328 * Returns an icon to be used by {@code JMenuItem}. |
|
329 * |
|
330 * @return an icon to be used by {@code JMenuItem} |
|
331 */ |
223 public static Icon getMenuItemArrowIcon() { |
332 public static Icon getMenuItemArrowIcon() { |
224 if (menuItemArrowIcon == null) { |
333 if (menuItemArrowIcon == null) { |
225 menuItemArrowIcon = new MenuItemArrowIcon(); |
334 menuItemArrowIcon = new MenuItemArrowIcon(); |
226 } |
335 } |
227 return menuItemArrowIcon; |
336 return menuItemArrowIcon; |
228 } |
337 } |
229 |
338 |
|
339 /** |
|
340 * Returns an icon to be used by {@code JCheckBoxMenuItem}. |
|
341 * |
|
342 * @return an icon to be used by {@code JCheckBoxMenuItem} |
|
343 */ |
230 public static Icon getCheckBoxMenuItemIcon() { |
344 public static Icon getCheckBoxMenuItemIcon() { |
231 if (checkBoxMenuItemIcon == null) { |
345 if (checkBoxMenuItemIcon == null) { |
232 checkBoxMenuItemIcon = new CheckBoxMenuItemIcon(); |
346 checkBoxMenuItemIcon = new CheckBoxMenuItemIcon(); |
233 } |
347 } |
234 return checkBoxMenuItemIcon; |
348 return checkBoxMenuItemIcon; |
235 } |
349 } |
236 |
350 |
|
351 /** |
|
352 * Returns an icon to be used by {@code JRadioButtonMenuItem}. |
|
353 * |
|
354 * @return an icon to be used by {@code JRadioButtonMenuItem} |
|
355 */ |
237 public static Icon getRadioButtonMenuItemIcon() { |
356 public static Icon getRadioButtonMenuItemIcon() { |
238 if (radioButtonMenuItemIcon == null) { |
357 if (radioButtonMenuItemIcon == null) { |
239 radioButtonMenuItemIcon = new RadioButtonMenuItemIcon(); |
358 radioButtonMenuItemIcon = new RadioButtonMenuItemIcon(); |
240 } |
359 } |
241 return radioButtonMenuItemIcon; |
360 return radioButtonMenuItemIcon; |
242 } |
361 } |
243 |
362 |
|
363 /** |
|
364 * Returns a thumb icon to be used by horizontal slider. |
|
365 * |
|
366 * @return a thumb icon to be used by horizontal slider |
|
367 */ |
244 public static Icon getHorizontalSliderThumbIcon() { |
368 public static Icon getHorizontalSliderThumbIcon() { |
245 if (MetalLookAndFeel.usingOcean()) { |
369 if (MetalLookAndFeel.usingOcean()) { |
246 if (oceanHorizontalSliderThumb == null) { |
370 if (oceanHorizontalSliderThumb == null) { |
247 oceanHorizontalSliderThumb = |
371 oceanHorizontalSliderThumb = |
248 new OceanHorizontalSliderThumbIcon(); |
372 new OceanHorizontalSliderThumbIcon(); |
1821 g.drawLine( xoff + 4, 6, xoff + 4, 9 ); // left |
1991 g.drawLine( xoff + 4, 6, xoff + 4, 9 ); // left |
1822 g.drawLine( xoff + 5, 5, xoff + 5, 5 ); // top left dot |
1992 g.drawLine( xoff + 5, 5, xoff + 5, 5 ); // top left dot |
1823 g.drawLine( xoff + 6, 4, xoff + 9, 4 ); // top |
1993 g.drawLine( xoff + 6, 4, xoff + 9, 4 ); // top |
1824 g.drawLine( xoff + 10, 5, xoff + 10, 5 ); // top right dot |
1994 g.drawLine( xoff + 10, 5, xoff + 10, 5 ); // top right dot |
1825 g.drawLine( xoff + 11, 6, xoff + 11, 9 ); // right |
1995 g.drawLine( xoff + 11, 6, xoff + 11, 9 ); // right |
1826 g.drawLine( xoff + 10, 10, xoff + 10, 10 ); // botom right dot |
1996 g.drawLine( xoff + 10, 10, xoff + 10, 10 ); // bottom right dot |
1827 g.drawLine( xoff + 6, 11, xoff + 9, 11 ); // bottom |
1997 g.drawLine( xoff + 6, 11, xoff + 9, 11 ); // bottom |
1828 g.drawLine( xoff + 5, 10, xoff + 5, 10 ); // bottom left dot |
1998 g.drawLine( xoff + 5, 10, xoff + 5, 10 ); // bottom left dot |
1829 |
1999 |
1830 // Draw Center Dot |
2000 // Draw Center Dot |
1831 g.drawLine( xoff + 7, 7, xoff + 8, 7 ); |
2001 g.drawLine( xoff + 7, 7, xoff + 8, 7 ); |