27 import java.awt.Graphics;
28 import java.awt.Insets;
29 import java.awt.Rectangle;
30 import java.awt.Color;
31 import java.awt.Component;
32 import java.beans.ConstructorProperties;
33
34 /**
35 * A class which implements a simple etched border which can
36 * either be etched-in or etched-out. If no highlight/shadow
37 * colors are initialized when the border is created, then
38 * these colors will be dynamically derived from the background
39 * color of the component argument passed into the paintBorder()
40 * method.
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 * @author Amy Fowler
53 */
54 @SuppressWarnings("serial") // Same-version serialization only
55 public class EtchedBorder extends AbstractBorder
56 {
57 /** Raised etched type. */
58 public static final int RAISED = 0;
59 /** Lowered etched type. */
60 public static final int LOWERED = 1;
61
62 /**
63 * The type of etch to be drawn by the border.
64 */
65 protected int etchType;
66 /**
67 * The color to use for the etched highlight.
|
27 import java.awt.Graphics;
28 import java.awt.Insets;
29 import java.awt.Rectangle;
30 import java.awt.Color;
31 import java.awt.Component;
32 import java.beans.ConstructorProperties;
33
34 /**
35 * A class which implements a simple etched border which can
36 * either be etched-in or etched-out. If no highlight/shadow
37 * colors are initialized when the border is created, then
38 * these colors will be dynamically derived from the background
39 * color of the component argument passed into the paintBorder()
40 * method.
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 * @author Amy Fowler
53 */
54 @SuppressWarnings("serial") // Same-version serialization only
55 public class EtchedBorder extends AbstractBorder
56 {
57 /** Raised etched type. */
58 public static final int RAISED = 0;
59 /** Lowered etched type. */
60 public static final int LOWERED = 1;
61
62 /**
63 * The type of etch to be drawn by the border.
64 */
65 protected int etchType;
66 /**
67 * The color to use for the etched highlight.
|