< prev index next >

modules/javafx.graphics/src/main/java/javafx/scene/layout/BorderStroke.java

Print this page

        

@@ -68,85 +68,85 @@
 
     /**
      * Defines the fill of top side of this border.
      *
      * @return the fill of top side of this border
-     * @defaultValue black
+     * @defaultValue Color.BLACK
      */
     public final Paint getTopStroke() { return topStroke; }
     final Paint topStroke;
     // TODO: The spec says the default color is "currentColor", which appears to mean
     // by default the color is "inherit". So we should file a JIRA on this so that
     // we use inherit. But first I'd like a performance analysis.
 
     /**
-     * Defines the fill of right side of this border. If {@code null} then the
+     * Defines the fill of right side of this border. If {@code null}, then the
      * topFill is used.
      *
      * @return the fill of right side of this border
-     * @defaultValue null = same as topFill
+     * @defaultValue null (same as topFill)
      */
     public final Paint getRightStroke() { return rightStroke; }
     final Paint rightStroke;
 
     /**
-     * Defines the fill of bottom side of this border. If {@code null} then the
+     * Defines the fill of bottom side of this border. If {@code null}, then the
      * topFill is used.
      *
      * @return the fill of bottom side of this border
-     * @defaultValue null = same as topFill
+     * @defaultValue null (same as topFill)
      */
     public final Paint getBottomStroke() { return bottomStroke; }
     final Paint bottomStroke;
 
     /**
-     * Defines the fill of left side of this border. If {@code null} then the
+     * Defines the fill of left side of this border. If {@code null}, then the
      * rightFill is used.
      *
      * @return the fill of left side of this border
-     * @defaultValue null = same sa rightFill
+     * @defaultValue null (same as rightFill)
      */
     public final Paint getLeftStroke() { return leftStroke; }
     final Paint leftStroke;
 
     /**
      * Defines the style of top side of this border.
      *
      * @return the style of top side of this border
-     * @defaultValue none
+     * @defaultValue BorderStrokeStyle.NONE
      */
     public final BorderStrokeStyle getTopStyle() { return topStyle; }
     final BorderStrokeStyle topStyle;
 
     /**
-     * Defines the style of right side of this border. If {@code null} then
+     * Defines the style of right side of this border. If {@code null}, then
      * topStyle is used;
      *
      * @return the style of right side of this border
-     * @defaultValue null = same as topStyle
+     * @defaultValue null (same as topStyle)
      */
     public final BorderStrokeStyle getRightStyle() { return rightStyle; }
     final BorderStrokeStyle rightStyle;
 
     /**
-     * Defines the style of bottom side of this border. If {@code null} then
+     * Defines the style of bottom side of this border. If {@code null}, then
      * topStyle is used;  Use BorderStyle.NONE to set the border to
      * have no border style.
      *
      * @return the style of bottom side of this border
-     * @defaultValue null = same as topStyle
+     * @defaultValue null (same as topStyle)
      */
     public final BorderStrokeStyle getBottomStyle() { return bottomStyle; }
     final BorderStrokeStyle bottomStyle;
 
     /**
-     * Defines the style of left side of this border. If {@code null} then
+     * Defines the style of left side of this border. If {@code null}, then
      * rightStyle is used. Use BorderStyle.NONE to set the border to
      * have no border style.
      *
      * @return the style of left side of this border
-     * @defaultValue null = same as rightStyle
+     * @defaultValue null (same as rightStyle)
      */
     public final BorderStrokeStyle getLeftStyle() { return leftStyle; }
     final BorderStrokeStyle leftStyle;
 
     /**

@@ -179,13 +179,13 @@
      * where each corner is a horizontal / vertical radius! I think that would
      * be cleaner. */
     private final CornerRadii radii;
 
     /**
-     * An uniform stroke has all (top, bottom, left, right) strokes of
-     * same color, width and style
-     * @return true if border stroke is uniform as defined above
+     * Checks if the stroke of this region is uniform. A uniform stroke has all its side
+     * strokes (top, bottom, left, right) of same color, width and style.
+     * @return true if border stroke is uniform
      */
     public final boolean isStrokeUniform() { return strokeUniform; }
     private final boolean strokeUniform;
 
     /**

@@ -194,14 +194,14 @@
     private final int hash;
 
     /**
      * Creates a new BorderStroke.
      *
-     * @param stroke    The stroke to use for all sides. If null, we default to Color.BLACK.
-     * @param style     The style to use for all sides. If null, we default to BorderStrokeStyle.NONE
-     * @param radii     The radii to use. If null, we default to CornerRadii.EMPTY
-     * @param widths    The widths to use. If null, we default to DEFAULT_WIDTHS
+     * @param stroke    The stroke to use for all sides. If null, defaults to Color.BLACK.
+     * @param style     The style to use for all sides. If null, defaults to BorderStrokeStyle.NONE.
+     * @param radii     The radii to use. If null, defaults to CornerRadii.EMPTY.
+     * @param widths    The widths to use. If null, defaults to DEFAULT_WIDTHS.
      */
     public BorderStroke(@NamedArg("stroke") Paint stroke, @NamedArg("style") BorderStrokeStyle style, @NamedArg("radii") CornerRadii radii, @NamedArg("widths") BorderWidths widths) {
         // TODO: Note that we default to THIN, not to MEDIUM as the CSS spec says. So it will be
         // up to our CSS converter code to make sure the default is MEDIUM in that case.
         this.leftStroke = this.topStroke = this.rightStroke = this.bottomStroke = stroke == null ? Color.BLACK : stroke;

@@ -236,34 +236,36 @@
     }
 
     /**
      * Creates a new BorderStroke.
      *
-     * @param stroke    The stroke to use for all sides. If null, we default to Color.BLACK.
-     * @param style     The style to use for all sides. If null, we default to BorderStrokeStyle.NONE
-     * @param radii     The radii to use. If null, we default to CornerRadii.EMPTY
-     * @param widths    The widths to use. If null, we default to DEFAULT_WIDTHS
+     * @param stroke    The stroke to use for all sides. If null, defaults to Color.BLACK.
+     * @param style     The style to use for all sides. If null, defaults to BorderStrokeStyle.NONE.
+     * @param radii     The radii to use. If null, defaults to CornerRadii.EMPTY.
+     * @param widths    The widths to use. If null, defaults to DEFAULT_WIDTHS.
      * @param insets    The insets indicating where to draw the border relative to the region edges.
+     *                  If null, defaults to Insets.EMPTY.
      */
     public BorderStroke(@NamedArg("stroke") Paint stroke, @NamedArg("style") BorderStrokeStyle style, @NamedArg("radii") CornerRadii radii, @NamedArg("widths") BorderWidths widths, @NamedArg("insets") Insets insets) {
         this(stroke, stroke, stroke, stroke, style, style, style, style, radii, widths, insets);
     }
 
     /**
      * Create a new BorderStroke, specifying all construction parameters.
      *
-     * @param topStroke       The fill to use on the top. If null, defaults to BLACK.
-     * @param rightStroke     The fill to use on the right. If null, defaults to the same value as topStroke
-     * @param bottomStroke    The fill to use on the bottom. If null, defaults to the same value as bottomStroke
-     * @param leftStroke      The fill to use on the left. If null, defaults to the same value as rightStroke
-     * @param topStyle        The style to use on the top. If null, defaults to BorderStrokeStyle.NONE
-     * @param rightStyle      The style to use on the right. If null, defaults to the same value as topStyle
-     * @param bottomStyle     The style to use on the bottom. If null, defaults to the same value as topStyle
-     * @param leftStyle       The style to use on the left. If null, defaults to the same value as rightStyle
-     * @param radii           The radii. If null, we default to square corners by using CornerRadii.EMPTY
-     * @param widths          The thickness of each side. If null, we default to DEFAULT_WIDTHS.
-     * @param insets    The insets indicating where to draw the border relative to the region edges.
+     * @param topStroke       The fill to use on the top. If null, defaults to Color.BLACK.
+     * @param rightStroke     The fill to use on the right. If null, defaults to the same value as topStroke.
+     * @param bottomStroke    The fill to use on the bottom. If null, defaults to the same value as topStroke.
+     * @param leftStroke      The fill to use on the left. If null, defaults to the same value as rightStroke.
+     * @param topStyle        The style to use on the top. If null, defaults to BorderStrokeStyle.NONE.
+     * @param rightStyle      The style to use on the right. If null, defaults to the same value as topStyle.
+     * @param bottomStyle     The style to use on the bottom. If null, defaults to the same value as topStyle.
+     * @param leftStyle       The style to use on the left. If null, defaults to the same value as rightStyle.
+     * @param radii           The radii. If null, defaults to square corners by using CornerRadii.EMPTY.
+     * @param widths          The thickness of each side. If null, defaults to DEFAULT_WIDTHS.
+     * @param insets          The insets indicating where to draw the border relative to the region edges.
+     *                        If null, defaults to Insets.EMPTY.
      */
     public BorderStroke(
             @NamedArg("topStroke") Paint topStroke, @NamedArg("rightStroke") Paint rightStroke, @NamedArg("bottomStroke") Paint bottomStroke, @NamedArg("leftStroke") Paint leftStroke,
             @NamedArg("topStyle") BorderStrokeStyle topStyle, @NamedArg("rightStyle") BorderStrokeStyle rightStyle,
             @NamedArg("bottomStyle") BorderStrokeStyle bottomStyle, @NamedArg("leftStyle") BorderStrokeStyle leftStyle,
< prev index next >