574 |
} |
} |
575 |
|
|
576 |
|
|
577 |
|
/** |
578 |
|
* An {@link javax.swing.border.LineBorder} that also implements the |
579 |
|
* {@link UIResource} marker interface. This is useful for |
580 |
|
* implementing pluggable look-and-feels: When switching the current |
581 |
|
* LookAndFeel, only those borders are replaced that are marked as |
582 |
|
* {@link UIResource}. For this reason, a look-and-feel should |
583 |
|
* always install borders that implement <code>UIResource</code>, |
584 |
|
* such as the borders provided by this class. |
585 |
|
* |
586 |
|
* <p><img src="../border/LineBorder-1.png" width="500" height="200" |
587 |
|
* alt="[An illustration of two LineBorders] /> |
588 |
|
* |
589 |
|
* @author Brian Jones (cbj@gnu.org) |
590 |
|
* @author Sascha Brawer (brawer@dandelis.ch) |
591 |
|
*/ |
592 |
|
public static class LineBorderUIResource |
593 |
|
extends LineBorder |
594 |
|
implements UIResource, Serializable |
595 |
|
{ |
596 |
/** |
/** |
597 |
* @serial */ |
* Constructs a LineBorderUIResource given its color. The border |
598 |
public static class LineBorderUIResource |
* will be one pixel thick and have plain corners. |
599 |
extends LineBorder |
* |
600 |
implements UIResource, Serializable |
* @param color the color for drawing the border. |
601 |
|
*/ |
602 |
|
public LineBorderUIResource(Color color) |
603 |
{ |
{ |
604 |
public LineBorderUIResource(Color color) |
super(color); |
|
{ |
|
|
super (color); |
|
|
} |
|
|
public LineBorderUIResource(Color color, |
|
|
int thickness) |
|
|
{ |
|
|
super (color, thickness); |
|
|
} |
|
605 |
} |
} |
606 |
|
|
607 |
|
|
608 |
/** |
/** |
609 |
* @serial |
* Constructs a LineBorder given its color and thickness. The |
610 |
|
* border will have plain corners. |
611 |
|
* |
612 |
|
* @param color the color for drawing the border. |
613 |
|
* @param thickness the width of the line in pixels. |
614 |
*/ |
*/ |
615 |
|
public LineBorderUIResource(Color color, int thickness) |
616 |
|
{ |
617 |
|
super(color, thickness); |
618 |
|
} |
619 |
|
|
620 |
|
|
621 |
|
/* Note: Since JDK1.3, javax.swing.border.LineBorder also has a |
622 |
|
* constructor which accepts a value for the roundedCorners |
623 |
|
* property. However, as of JDK1.4.1, the LineBorderUIResource |
624 |
|
* subclass does not have a corresponding constructor. |
625 |
|
* |
626 |
|
* A request for enhancing the Swing API has been filed with Sun. |
627 |
|
* It currently is under review, its "review ID" is 188305. |
628 |
|
* |
629 |
|
* -- Sascha Brawer (brawer@dandelis.ch) |
630 |
|
*/ |
631 |
|
} |
632 |
|
|
633 |
|
/** |
634 |
|
* @serial */ |
635 |
public static class MatteBorderUIResource |
public static class MatteBorderUIResource |
636 |
extends MatteBorder |
extends MatteBorder |
637 |
implements UIResource, Serializable |
implements UIResource, Serializable |