-
CSR
-
Resolution: Approved
-
P3
-
None
-
behavioral
-
minimal
-
No behavior change - specification only so minimal risk
-
Java API
-
SE
Summary
Make it clear in the specification of
javax.swing.plaf.border.BorderUIResource.BevelBorderUIResource(int, Color, Color)
and
javax.swing.plaf.BevelBorderUIResource(int, Color, Color)
the inner/outer highlight color and inner/outer shadow color is derived from same specified highlight and shadow color respectilvely.
Problem
The specification of
javax.swing.plaf.border.BorderUIResource.BevelBorderUIResource(int, Color, Color)
and
javax.swing.plaf.BevelBorderUIResource(int, Color, Color)
is not clear about the mapping between highlight color to inner/outer highlight color and shadow color to inner/outer shadow color.
Solution
Update the specification to clearly specify that inner/outer highlight color and inner/outer shadow color is derived from the specified highlight and shadow color.
Specification
src/java.desktop/share/classes/javax/swing/border/BevelBorder.java
/**
* Creates a bevel border with the specified type, highlight and
* shadow colors.
+ * The bevel outer highlight color and bevel inner highlight color
+ * will be derived from specified highlight color and
+ * bevel outer shadow color and bevel inner shadow color
+ * will be derived from specified shadow color.
* @param bevelType the type of bevel for the border
* @param highlight the color to use for the bevel highlight
* @param shadow the color to use for the bevel shadow
*/
public BevelBorder(int bevelType, Color highlight, Color shadow) {
src/java.desktop/share/classes/javax/swing/plaf/BorderUIResource.java
/**
* Constructs a {@code BevelBorderUIResource}.
+ * The bevel outer highlight color and bevel inner highlight color
+ * will be derived from specified highlight color and
+ * bevel outer shadow color and bevel inner shadow color
+ * will be derived from specified shadow color.
* @param bevelType the type of bevel for the border
* @param highlight the color to use for the bevel highlight
* @param shadow the color to use for the bevel shadow
*/
public BevelBorderUIResource(int bevelType, Color highlight, Color shadow) {
- csr of
-
JDK-8264398 BevelBorderUIResource​(int, Color, Color) and BevelBoder(int, Color, Color) spec should clarify about usage of highlight and shadow color
-
- Resolved
-