jdk/src/share/classes/javax/swing/border/StrokeBorder.java
author malenkov
Wed, 30 Apr 2014 19:28:05 +0400
changeset 24544 c0133e7c7162
parent 22574 7f8ce0c8c20a
permissions -rw-r--r--
8041917: unexcepted behavior of LineBorder while using Boolean variable true Reviewed-by: alexsch, serb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     1
/*
22574
7f8ce0c8c20a 8032627: Add @SuppressWarnings("serial") to appropriate javax.swing classes
darcy
parents: 9035
diff changeset
     2
 * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     4
 *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    10
 *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    15
 * accompanied this code).
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    16
 *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    20
 *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    23
 * questions.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    24
 */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    25
package javax.swing.border;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    26
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    27
import java.awt.BasicStroke;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    28
import java.awt.Component;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    29
import java.awt.Graphics;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    30
import java.awt.Graphics2D;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    31
import java.awt.Insets;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    32
import java.awt.Paint;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    33
import java.awt.RenderingHints;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    34
import java.awt.geom.Rectangle2D;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    35
import java.beans.ConstructorProperties;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    36
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    37
/**
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    38
 * A class which implements a border of an arbitrary stroke.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    39
 * <p>
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    40
 * <strong>Warning:</strong>
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    41
 * Serialized objects of this class will not be compatible with
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    42
 * future Swing releases. The current serialization support is
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    43
 * appropriate for short term storage or RMI
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    44
 * between applications running the same version of Swing.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    45
 * As of 1.4, support for long term storage of all JavaBeans&trade;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    46
 * has been added to the <code>java.beans</code> package.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    47
 * Please see {@link java.beans.XMLEncoder}.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    48
 *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    49
 * @author Sergey A. Malenkov
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    50
 *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    51
 * @since 1.7
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    52
 */
22574
7f8ce0c8c20a 8032627: Add @SuppressWarnings("serial") to appropriate javax.swing classes
darcy
parents: 9035
diff changeset
    53
@SuppressWarnings("serial") // Same-version serialization only
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    54
public class StrokeBorder extends AbstractBorder {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    55
    private final BasicStroke stroke;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    56
    private final Paint paint;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    57
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    58
    /**
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    59
     * Creates a border of the specified {@code stroke}.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    60
     * The component's foreground color will be used to render the border.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    61
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    62
     * @param stroke  the {@link BasicStroke} object used to stroke a shape
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    63
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    64
     * @throws NullPointerException if the specified {@code stroke} is {@code null}
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    65
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    66
    public StrokeBorder(BasicStroke stroke) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    67
        this(stroke, null);
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    68
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    69
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    70
    /**
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    71
     * Creates a border of the specified {@code stroke} and {@code paint}.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    72
     * If the specified {@code paint} is {@code null},
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    73
     * the component's foreground color will be used to render the border.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    74
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    75
     * @param stroke  the {@link BasicStroke} object used to stroke a shape
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    76
     * @param paint   the {@link Paint} object used to generate a color
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    77
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    78
     * @throws NullPointerException if the specified {@code stroke} is {@code null}
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    79
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    80
    @ConstructorProperties({ "stroke", "paint" })
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    81
    public StrokeBorder(BasicStroke stroke, Paint paint) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    82
        if (stroke == null) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    83
            throw new NullPointerException("border's stroke");
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    84
        }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    85
        this.stroke = stroke;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    86
        this.paint = paint;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    87
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    88
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    89
    /**
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    90
     * Paints the border for the specified component
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    91
     * with the specified position and size.
8141
cdf18fc88266 7001118: DOC: javax.swing.border.StrokeBorder.paintBorder() doesn't throw NPE in all specified cases
malenkov
parents: 8140
diff changeset
    92
     * If the border was not specified with a {@link Paint} object,
cdf18fc88266 7001118: DOC: javax.swing.border.StrokeBorder.paintBorder() doesn't throw NPE in all specified cases
malenkov
parents: 8140
diff changeset
    93
     * the component's foreground color will be used to render the border.
cdf18fc88266 7001118: DOC: javax.swing.border.StrokeBorder.paintBorder() doesn't throw NPE in all specified cases
malenkov
parents: 8140
diff changeset
    94
     * If the component's foreground color is not available,
cdf18fc88266 7001118: DOC: javax.swing.border.StrokeBorder.paintBorder() doesn't throw NPE in all specified cases
malenkov
parents: 8140
diff changeset
    95
     * the default color of the {@link Graphics} object will be used.
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    96
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    97
     * @param c       the component for which this border is being painted
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    98
     * @param g       the paint graphics
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    99
     * @param x       the x position of the painted border
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   100
     * @param y       the y position of the painted border
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   101
     * @param width   the width of the painted border
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   102
     * @param height  the height of the painted border
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   103
     *
8141
cdf18fc88266 7001118: DOC: javax.swing.border.StrokeBorder.paintBorder() doesn't throw NPE in all specified cases
malenkov
parents: 8140
diff changeset
   104
     * @throws NullPointerException if the specified {@code g} is {@code null}
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   105
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   106
    @Override
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   107
    public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   108
        float size = this.stroke.getLineWidth();
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   109
        if (size > 0.0f) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   110
            g = g.create();
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   111
            if (g instanceof Graphics2D) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   112
                Graphics2D g2d = (Graphics2D) g;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   113
                g2d.setStroke(this.stroke);
8141
cdf18fc88266 7001118: DOC: javax.swing.border.StrokeBorder.paintBorder() doesn't throw NPE in all specified cases
malenkov
parents: 8140
diff changeset
   114
                g2d.setPaint(this.paint != null ? this.paint : c == null ? null : c.getForeground());
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   115
                g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   116
                                     RenderingHints.VALUE_ANTIALIAS_ON);
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   117
                g2d.draw(new Rectangle2D.Float(x + size / 2, y + size / 2, width - size, height - size));
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   118
            }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   119
            g.dispose();
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   120
        }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   121
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   122
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   123
    /**
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   124
     * Reinitializes the {@code insets} parameter
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   125
     * with this border's current insets.
8140
f38be08fdcb4 7001484: DOC: Method javax.swing.border.StrokeBorder.getBorderInsets() should specify how it converts float
malenkov
parents: 7006
diff changeset
   126
     * Every inset is the smallest (closest to negative infinity) integer value
f38be08fdcb4 7001484: DOC: Method javax.swing.border.StrokeBorder.getBorderInsets() should specify how it converts float
malenkov
parents: 7006
diff changeset
   127
     * that is greater than or equal to the line width of the stroke
f38be08fdcb4 7001484: DOC: Method javax.swing.border.StrokeBorder.getBorderInsets() should specify how it converts float
malenkov
parents: 7006
diff changeset
   128
     * that is used to paint the border.
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   129
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   130
     * @param c       the component for which this border insets value applies
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   131
     * @param insets  the {@code Insets} object to be reinitialized
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   132
     * @return the reinitialized {@code insets} parameter
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   133
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   134
     * @throws NullPointerException if the specified {@code insets} is {@code null}
8140
f38be08fdcb4 7001484: DOC: Method javax.swing.border.StrokeBorder.getBorderInsets() should specify how it converts float
malenkov
parents: 7006
diff changeset
   135
     *
f38be08fdcb4 7001484: DOC: Method javax.swing.border.StrokeBorder.getBorderInsets() should specify how it converts float
malenkov
parents: 7006
diff changeset
   136
     * @see Math#ceil
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   137
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   138
    @Override
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   139
    public Insets getBorderInsets(Component c, Insets insets) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   140
        int size = (int) Math.ceil(this.stroke.getLineWidth());
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   141
        insets.set(size, size, size, size);
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   142
        return insets;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   143
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   144
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   145
    /**
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   146
     * Returns the {@link BasicStroke} object used to stroke a shape
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   147
     * during the border rendering.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   148
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   149
     * @return the {@link BasicStroke} object
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   150
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   151
    public BasicStroke getStroke() {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   152
        return this.stroke;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   153
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   154
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   155
    /**
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   156
     * Returns the {@link Paint} object used to generate a color
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   157
     * during the border rendering.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   158
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   159
     * @return the {@link Paint} object or {@code null}
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   160
     *         if the {@code paint} parameter is not set
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   161
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   162
    public Paint getPaint() {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   163
        return this.paint;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   164
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   165
}