56 |
{ |
{ |
57 |
// Do nothing. |
// Do nothing. |
58 |
} |
} |
59 |
|
|
60 |
/** |
/** |
61 |
* Creates a line border withe the specified color. |
* Creates a line border withe the specified color. |
62 |
* |
* |
63 |
* @param color A color to use for the line. |
* @param color A color to use for the line. |
64 |
* |
* |
65 |
* @return The Border object |
* @return The Border object |
66 |
*/ |
*/ |
67 |
public static Border createLineBorder(Color color) |
public static Border createLineBorder(Color color) |
68 |
{ |
{ |
69 |
return null; |
return null; |
79 |
* @param thickness An int specifying the width in pixels. |
* @param thickness An int specifying the width in pixels. |
80 |
* |
* |
81 |
* @return The Border object |
* @return The Border object |
82 |
*/ |
*/ |
83 |
public static Border createLineBorder (Color color, int thickness) |
public static Border createLineBorder(Color color, int thickness) |
84 |
{ |
{ |
85 |
return new LineBorder (color, thickness); |
return new LineBorder(color, thickness); |
86 |
} |
} |
87 |
|
|
88 |
/** |
/** |
92 |
* shadows are underneath.) |
* shadows are underneath.) |
93 |
* |
* |
94 |
* @return The Border object |
* @return The Border object |
95 |
*/ |
*/ |
96 |
public static Border createRaisedBevelBorder () |
public static Border createRaisedBevelBorder() |
97 |
{ |
{ |
98 |
return new BevelBorder (BevelBorder.RAISED); |
return new BevelBorder(BevelBorder.RAISED); |
99 |
} |
} |
100 |
|
|
101 |
/** |
/** |
105 |
* highlights are underneath.) |
* highlights are underneath.) |
106 |
* |
* |
107 |
* @return The Border object |
* @return The Border object |
108 |
*/ |
*/ |
109 |
public static Border createLoweredBevelBorder () |
public static Border createLoweredBevelBorder() |
110 |
{ |
{ |
111 |
return new BevelBorder (BevelBorder.LOWERED); |
return new BevelBorder(BevelBorder.LOWERED); |
112 |
} |
} |
113 |
|
|
114 |
/** |
/** |
118 |
* highlights are underneath.). |
* highlights are underneath.). |
119 |
* |
* |
120 |
* @param type An int specifying either BevelBorder.LOWERED or |
* @param type An int specifying either BevelBorder.LOWERED or |
121 |
* BevelBorder.RAISED |
* BevelBorder.RAISED |
122 |
* |
* |
123 |
* @Return The Border object |
* @return The Border object |
124 |
*/ |
*/ |
125 |
public static Border createBevelBorder (int type) |
public static Border createBevelBorder(int type) |
126 |
{ |
{ |
127 |
return new BevelBorder (type); |
return new BevelBorder(type); |
128 |
} |
} |
129 |
|
|
130 |
/** |
/** |
134 |
* area uses a brighter shade of the shadaw color. |
* area uses a brighter shade of the shadaw color. |
135 |
* |
* |
136 |
* @param type An int specifying either BevelBorder.LOWERED or |
* @param type An int specifying either BevelBorder.LOWERED or |
137 |
* BevelBorder.RAISED |
* BevelBorder.RAISED |
138 |
* @param highlight A Color object for highlights |
* @param highlight A Color object for highlights |
139 |
* @param shadow A Color object for shadows |
* @param shadow A Color object for shadows |
140 |
* |
* |
141 |
* @return The Border object |
* @return The Border object |
142 |
*/ |
*/ |
143 |
public static Border createBevelBorder (int type, Color highlight, |
public static Border createBevelBorder(int type, Color highlight, Color shadow) |
|
Color shadow) |
|
144 |
{ |
{ |
145 |
return new BevelBorder (type, highlight, shadow); |
return new BevelBorder(type, highlight, shadow); |
146 |
} |
} |
147 |
|
|
148 |
/** |
/** |
150 |
* for the inner and outer highlight and shadow areas. |
* for the inner and outer highlight and shadow areas. |
151 |
* |
* |
152 |
* @param type An int specifying either BevelBorder.LOWERED or |
* @param type An int specifying either BevelBorder.LOWERED or |
153 |
* BevelBorder.RAISED |
* BevelBorder.RAISED |
154 |
* @param highlightOuter A Color object for the outer edge of the |
* @param highlightOuter A Color object for the outer edge of the |
155 |
* highlight area |
* highlight area |
156 |
* @param highlightInner A Color object for the inner edge of the |
* @param highlightInner A Color object for the inner edge of the |
157 |
* highlight area |
* highlight area |
158 |
* @param shadowOuter A Color object for the outer edge of the shadow area |
* @param shadowOuter A Color object for the outer edge of the shadow area |
159 |
* @param shadowInner A Color object for the inner edge of the shadow area |
* @param shadowInner A Color object for the inner edge of the shadow area |
160 |
* |
* |
161 |
* @return The Border object |
* @return The Border object |
162 |
*/ |
*/ |
163 |
public static Border createBevelBorder (int type, Color highlightOuter, |
public static Border createBevelBorder(int type, Color highlightOuter, |
164 |
Color highlightInner, |
Color highlightInner, |
165 |
Color shadowOuter, Color shadowInner) |
Color shadowOuter, Color shadowInner) |
166 |
{ |
{ |
167 |
return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter, |
return new BevelBorder(type, highlightOuter, highlightInner, shadowOuter, |
168 |
shadowInner); |
shadowInner); |
169 |
} |
} |
170 |
|
|
171 |
/** |
/** |
173 |
* background color for highlighting and shading. |
* background color for highlighting and shading. |
174 |
* |
* |
175 |
* @return The Border object |
* @return The Border object |
176 |
*/ |
*/ |
177 |
public static Border createEtchedBorder () |
public static Border createEtchedBorder() |
178 |
{ |
{ |
179 |
return new EtchedBorder (); |
return new EtchedBorder(); |
180 |
} |
} |
181 |
|
|
182 |
/** |
/** |
184 |
* background color for highlighting and shading. |
* background color for highlighting and shading. |
185 |
* |
* |
186 |
* @return The Border object |
* @return The Border object |
187 |
*/ |
*/ |
188 |
public static Border createEtchedBorder (int etchType) |
public static Border createEtchedBorder(int etchType) |
189 |
{ |
{ |
190 |
return new EtchedBorder (etchType); |
return new EtchedBorder(etchType); |
191 |
} |
} |
192 |
|
|
193 |
/** |
/** |
198 |
* @param shadow A Color object for the border shadows |
* @param shadow A Color object for the border shadows |
199 |
* |
* |
200 |
* @return The Border object |
* @return The Border object |
201 |
*/ |
*/ |
202 |
public static Border createEtchedBorder (Color highlight, Color shadow) |
public static Border createEtchedBorder(Color highlight, Color shadow) |
203 |
{ |
{ |
204 |
return new EtchedBorder (highlight, shadow); |
return new EtchedBorder(highlight, shadow); |
205 |
} |
} |
206 |
|
|
207 |
/** |
/** |
212 |
* @param shadow A Color object for the border shadows |
* @param shadow A Color object for the border shadows |
213 |
* |
* |
214 |
* @return The Border object |
* @return The Border object |
215 |
*/ |
*/ |
216 |
public static Border createEtchedBorder (int etchType, Color highlight, |
public static Border createEtchedBorder(int etchType, Color highlight, |
217 |
Color shadow) |
Color shadow) |
218 |
{ |
{ |
219 |
return new EtchedBorder (etchType, highlight, shadow); |
return new EtchedBorder(etchType, highlight, shadow); |
220 |
} |
} |
221 |
|
|
222 |
/** |
/** |
228 |
* @param title A String containing the text of the title |
* @param title A String containing the text of the title |
229 |
* |
* |
230 |
* @return The TitledBorder object |
* @return The TitledBorder object |
231 |
*/ |
*/ |
232 |
public static TitledBorder createTitledBorder (String title) |
public static TitledBorder createTitledBorder(String title) |
233 |
{ |
{ |
234 |
return new TitledBorder (title); |
return new TitledBorder(title); |
235 |
} |
} |
236 |
|
|
237 |
/** |
/** |
245 |
* @param border The Border object to add the title to |
* @param border The Border object to add the title to |
246 |
* |
* |
247 |
* @return The TitledBorder object |
* @return The TitledBorder object |
248 |
*/ |
*/ |
249 |
public static TitledBorder createTitledBorder (Border border) |
public static TitledBorder createTitledBorder(Border border) |
250 |
{ |
{ |
251 |
return new TitledBorder (border); |
return new TitledBorder(border); |
252 |
} |
} |
253 |
|
|
254 |
/** |
/** |
261 |
* @param title A String containing the text of the title |
* @param title A String containing the text of the title |
262 |
* |
* |
263 |
* @return The TitledBorder object |
* @return The TitledBorder object |
264 |
*/ |
*/ |
265 |
public static TitledBorder createTitledBorder (Border border, String title) |
public static TitledBorder createTitledBorder(Border border, String title) |
266 |
{ |
{ |
267 |
return new TitledBorder (border, title); |
return new TitledBorder(border, title); |
268 |
} |
} |
269 |
|
|
270 |
/** |
/** |
275 |
* @param border The Border object to add the title to |
* @param border The Border object to add the title to |
276 |
* @param title A String containing the text of the title |
* @param title A String containing the text of the title |
277 |
* @param titleJustification An int specifying the left/right position of |
* @param titleJustification An int specifying the left/right position of |
278 |
* the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or |
* the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or |
279 |
* TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left). |
* TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left). |
280 |
* @param titlePosition An int specifying the vertical position of the text |
* @param titlePosition An int specifying the vertical position of the text |
281 |
* in relation to the border -- one of: TitledBorder.ABOVE_TOP, |
* in relation to the border -- one of: TitledBorder.ABOVE_TOP, |
282 |
* TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, |
* TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, |
283 |
* TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom |
* TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom |
284 |
* line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top). |
* line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION |
285 |
|
* (top). |
286 |
* |
* |
287 |
* @return The TitledBorder object |
* @return The TitledBorder object |
288 |
*/ |
*/ |
289 |
public static TitledBorder createTitledBorder (Border border, String title, |
public static TitledBorder createTitledBorder(Border border, String title, |
290 |
int titleJustification, |
int titleJustification, |
291 |
int titlePosition) |
int titlePosition) |
292 |
{ |
{ |
293 |
return new TitledBorder (border, title, titleJustification, titlePosition); |
return new TitledBorder(border, title, titleJustification, titlePosition); |
294 |
} |
} |
295 |
|
|
296 |
/** |
/** |
301 |
* @param border - the Border object to add the title to |
* @param border - the Border object to add the title to |
302 |
* @param title - a String containing the text of the title |
* @param title - a String containing the text of the title |
303 |
* @param titleJustification - an int specifying the left/right position of |
* @param titleJustification - an int specifying the left/right position of |
304 |
* the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or |
* the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or |
305 |
* TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left). |
* TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left). |
306 |
* @param titlePosition - an int specifying the vertical position of the |
* @param titlePosition - an int specifying the vertical position of the |
307 |
* text in relation to the border -- one of: TitledBorder.ABOVE_TOP, |
* text in relation to the border -- one of: TitledBorder.ABOVE_TOP, |
308 |
* TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, |
* TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, |
309 |
* TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom |
* TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom |
310 |
* line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top). |
* line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top). |
311 |
* @param titleFont - a Font object specifying the title font |
* @param titleFont - a Font object specifying the title font |
312 |
* |
* |
313 |
* @return The TitledBorder object |
* @return The TitledBorder object |
314 |
*/ |
*/ |
315 |
public static TitledBorder createTitledBorder (Border border, String title, |
public static TitledBorder createTitledBorder(Border border, String title, |
316 |
int titleJustification, |
int titleJustification, |
317 |
int titlePosition, |
int titlePosition, |
318 |
Font titleFont) |
Font titleFont) |
319 |
{ |
{ |
320 |
return new TitledBorder (border, title, titleJustification, titlePosition, |
return new TitledBorder(border, title, titleJustification, titlePosition, |
321 |
titleFont); |
titleFont); |
322 |
} |
} |
323 |
|
|
324 |
/** |
/** |
328 |
* @param border - the Border object to add the title to |
* @param border - the Border object to add the title to |
329 |
* @param title - a String containing the text of the title |
* @param title - a String containing the text of the title |
330 |
* @param titleJustification - an int specifying the left/right position of |
* @param titleJustification - an int specifying the left/right position of |
331 |
* the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or |
* the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or |
332 |
* TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left). |
* TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left). |
333 |
* @param titlePosition - an int specifying the vertical position of the text |
* @param titlePosition - an int specifying the vertical position of the text |
334 |
* in relation to the border -- one of: TitledBorder.ABOVE_TOP, |
* in relation to the border -- one of: TitledBorder.ABOVE_TOP, |
335 |
* TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, |
* TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP, |
336 |
* TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom |
* TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom |
337 |
* line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top). |
* line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top). |
338 |
* @param titleFont - a Font object specifying the title font |
* @param titleFont - a Font object specifying the title font |
339 |
* @param titleColor - a Color object specifying the title color |
* @param titleColor - a Color object specifying the title color |
340 |
* |
* |
341 |
* @return The TitledBorder object |
* @return The TitledBorder object |
342 |
*/ |
*/ |
343 |
public static TitledBorder createTitledBorder (Border border, |
public static TitledBorder createTitledBorder(Border border, String title, |
344 |
String title, |
int titleJustification, |
345 |
int titleJustification, |
int titlePosition, |
346 |
int titlePosition, |
Font titleFont, Color titleColor) |
|
Font titleFont, |
|
|
Color titleColor) |
|
347 |
{ |
{ |
348 |
return new TitledBorder (border, title, titleJustification, titlePosition, |
return new TitledBorder(border, title, titleJustification, titlePosition, |
349 |
titleFont, titleColor); |
titleFont, titleColor); |
350 |
} |
} |
351 |
|
|
352 |
/** |
/** |
354 |
* bottom, left, and right sides are all zero.) |
* bottom, left, and right sides are all zero.) |
355 |
* |
* |
356 |
* @return The Border object |
* @return The Border object |
357 |
*/ |
*/ |
358 |
public static Border createEmptyBorder () |
public static Border createEmptyBorder() |
359 |
{ |
{ |
360 |
return new EmptyBorder (0, 0, 0, 0); |
return new EmptyBorder(0, 0, 0, 0); |
361 |
} |
} |
362 |
|
|
363 |
/** |
/** |
370 |
* @param right An int specifying the width of the bottom in pixels |
* @param right An int specifying the width of the bottom in pixels |
371 |
* |
* |
372 |
* @return The Border object |
* @return The Border object |
373 |
*/ |
*/ |
374 |
public static Border createEmptyBorder (int top, int left, int bottom, |
public static Border createEmptyBorder(int top, int left, int bottom, |
375 |
int right) |
int right) |
376 |
{ |
{ |
377 |
return new EmptyBorder (top, left, bottom, right); |
return new EmptyBorder(top, left, bottom, right); |
378 |
} |
} |
379 |
|
|
380 |
/** |
/** |
381 |
* Create a compound border with a null inside edge and a null outside edge. |
* Create a compound border with a null inside edge and a null outside edge. |
382 |
* |
* |
383 |
* @return The CompoundBorder object |
* @return The CompoundBorder object |
384 |
*/ |
*/ |
385 |
public static CompoundBorder createCompoundBorder () |
public static CompoundBorder createCompoundBorder() |
386 |
{ |
{ |
387 |
return new CompoundBorder (); |
return new CompoundBorder(); |
388 |
} |
} |
389 |
|
|
390 |
/** |
/** |
392 |
* outside and inside edges. |
* outside and inside edges. |
393 |
* |
* |
394 |
* @param outsideBorder A Border object for the outer edge of the |
* @param outsideBorder A Border object for the outer edge of the |
395 |
* compound border |
* compound border |
396 |
* @param insideBorder A Border object for the inner edge of the |
* @param insideBorder A Border object for the inner edge of the |
397 |
* compound border |
* compound border |
398 |
* |
* |
399 |
* @return The CompoundBorder object |
* @return The CompoundBorder object |
400 |
*/ |
*/ |
401 |
public static CompoundBorder createCompoundBorder (Border outsideBorder, |
public static CompoundBorder createCompoundBorder(Border outsideBorder, |
402 |
Border insideBorder) |
Border insideBorder) |
403 |
{ |
{ |
404 |
return new CompoundBorder (outsideBorder, insideBorder); |
return new CompoundBorder(outsideBorder, insideBorder); |
405 |
} |
} |
406 |
|
|
407 |
/** |
/** |
408 |
* Create a matte-look border using a solid color. (The difference between |
* Create a matte-look border using a solid color. (The difference between |
409 |
* this border and a line border is that you can specify the individual |
* this border and a line border is that you can specify the individual border |
410 |
* border dimensions.) |
* dimensions.) |
411 |
* |
* |
412 |
* @param top An int specifying the width of the top in pixels |
* @param top |
413 |
* @param left An int specifying the width of the left side in pixels |
* An int specifying the width of the top in pixels |
414 |
* @param bottom An int specifying the width of the right side in pixels |
* @param left |
415 |
* @param right An int specifying the width of the bottom in pixels |
* An int specifying the width of the left side in pixels |
416 |
* @param color A Color to use for the border |
* @param bottom |
417 |
* |
* An int specifying the width of the right side in pixels |
418 |
|
* @param right |
419 |
|
* An int specifying the width of the bottom in pixels |
420 |
|
* @param color |
421 |
|
* A Color to use for the border |
422 |
* @return The MatteBorder object |
* @return The MatteBorder object |
423 |
*/ |
*/ |
424 |
public static MatteBorder createMatteBorder (int top, int left, int bottom, |
public static MatteBorder createMatteBorder(int top, int left, int bottom, |
425 |
int right, Color color) |
int right, Color color) |
426 |
{ |
{ |
427 |
return new MatteBorder (top, left, bottom, right, color); |
return new MatteBorder(top, left, bottom, right, color); |
428 |
} |
} |
429 |
|
|
430 |
/** |
/** |
442 |
* @param tileIcon The Icon object used for the border tiles |
* @param tileIcon The Icon object used for the border tiles |
443 |
* |
* |
444 |
* @return The MatteBorder object |
* @return The MatteBorder object |
445 |
*/ |
*/ |
446 |
public static MatteBorder createMatteBorder (int top, int left, int bottom, |
public static MatteBorder createMatteBorder(int top, int left, int bottom, |
447 |
int right, Icon tileIcon) |
int right, Icon tileIcon) |
448 |
{ |
{ |
449 |
return new MatteBorder (top, left, bottom, right, tileIcon); |
return new MatteBorder(top, left, bottom, right, tileIcon); |
450 |
} |
} |
451 |
} |
} |