25 package javax.swing.border;
26
27 import java.awt.BasicStroke;
28 import java.awt.Component;
29 import java.awt.Graphics;
30 import java.awt.Graphics2D;
31 import java.awt.Insets;
32 import java.awt.Paint;
33 import java.awt.RenderingHints;
34 import java.awt.geom.Rectangle2D;
35 import java.beans.ConstructorProperties;
36
37 /**
38 * A class which implements a border of an arbitrary stroke.
39 * <p>
40 * <strong>Warning:</strong>
41 * Serialized objects of this class will not be compatible with
42 * future Swing releases. The current serialization support is
43 * appropriate for short term storage or RMI
44 * between applications running the same version of Swing.
45 * As of 1.4, support for long term storage of all JavaBeans™
46 * has been added to the <code>java.beans</code> package.
47 * Please see {@link java.beans.XMLEncoder}.
48 *
49 * @author Sergey A. Malenkov
50 *
51 * @since 1.7
52 */
53 @SuppressWarnings("serial") // Same-version serialization only
54 public class StrokeBorder extends AbstractBorder {
55 private final BasicStroke stroke;
56 private final Paint paint;
57
58 /**
59 * Creates a border of the specified {@code stroke}.
60 * The component's foreground color will be used to render the border.
61 *
62 * @param stroke the {@link BasicStroke} object used to stroke a shape
63 *
64 * @throws NullPointerException if the specified {@code stroke} is {@code null}
65 */
|
25 package javax.swing.border;
26
27 import java.awt.BasicStroke;
28 import java.awt.Component;
29 import java.awt.Graphics;
30 import java.awt.Graphics2D;
31 import java.awt.Insets;
32 import java.awt.Paint;
33 import java.awt.RenderingHints;
34 import java.awt.geom.Rectangle2D;
35 import java.beans.ConstructorProperties;
36
37 /**
38 * A class which implements a border of an arbitrary stroke.
39 * <p>
40 * <strong>Warning:</strong>
41 * Serialized objects of this class will not be compatible with
42 * future Swing releases. The current serialization support is
43 * appropriate for short term storage or RMI
44 * between applications running the same version of Swing.
45 * As of 1.4, support for long term storage of all JavaBeans
46 * has been added to the <code>java.beans</code> package.
47 * Please see {@link java.beans.XMLEncoder}.
48 *
49 * @author Sergey A. Malenkov
50 *
51 * @since 1.7
52 */
53 @SuppressWarnings("serial") // Same-version serialization only
54 public class StrokeBorder extends AbstractBorder {
55 private final BasicStroke stroke;
56 private final Paint paint;
57
58 /**
59 * Creates a border of the specified {@code stroke}.
60 * The component's foreground color will be used to render the border.
61 *
62 * @param stroke the {@link BasicStroke} object used to stroke a shape
63 *
64 * @throws NullPointerException if the specified {@code stroke} is {@code null}
65 */
|