27 import java.awt.Graphics;
28 import java.awt.Insets;
29 import java.awt.Color;
30 import java.awt.Component;
31 import java.awt.Graphics2D;
32 import java.awt.Shape;
33 import java.awt.geom.Path2D;
34 import java.awt.geom.Rectangle2D;
35 import java.awt.geom.RoundRectangle2D;
36 import java.beans.ConstructorProperties;
37
38 /**
39 * A class which implements a line border of arbitrary thickness
40 * and of a single color.
41 * <p>
42 * <strong>Warning:</strong>
43 * Serialized objects of this class will not be compatible with
44 * future Swing releases. The current serialization support is
45 * appropriate for short term storage or RMI between applications running
46 * the same version of Swing. As of 1.4, support for long term storage
47 * of all JavaBeans™
48 * has been added to the <code>java.beans</code> package.
49 * Please see {@link java.beans.XMLEncoder}.
50 *
51 * @author David Kloba
52 */
53 @SuppressWarnings("serial") // Same-version serialization only
54 public class LineBorder extends AbstractBorder
55 {
56 private static Border blackLine;
57 private static Border grayLine;
58
59 /**
60 * Thickness of the border.
61 */
62 protected int thickness;
63 /**
64 * Color of the border.
65 */
66 protected Color lineColor;
67 /**
|
27 import java.awt.Graphics;
28 import java.awt.Insets;
29 import java.awt.Color;
30 import java.awt.Component;
31 import java.awt.Graphics2D;
32 import java.awt.Shape;
33 import java.awt.geom.Path2D;
34 import java.awt.geom.Rectangle2D;
35 import java.awt.geom.RoundRectangle2D;
36 import java.beans.ConstructorProperties;
37
38 /**
39 * A class which implements a line border of arbitrary thickness
40 * and of a single color.
41 * <p>
42 * <strong>Warning:</strong>
43 * Serialized objects of this class will not be compatible with
44 * future Swing releases. The current serialization support is
45 * appropriate for short term storage or RMI between applications running
46 * the same version of Swing. As of 1.4, support for long term storage
47 * of all JavaBeans
48 * has been added to the <code>java.beans</code> package.
49 * Please see {@link java.beans.XMLEncoder}.
50 *
51 * @author David Kloba
52 */
53 @SuppressWarnings("serial") // Same-version serialization only
54 public class LineBorder extends AbstractBorder
55 {
56 private static Border blackLine;
57 private static Border grayLine;
58
59 /**
60 * Thickness of the border.
61 */
62 protected int thickness;
63 /**
64 * Color of the border.
65 */
66 protected Color lineColor;
67 /**
|