jdk/src/share/classes/javax/swing/border/StrokeBorder.java
author ohair
Wed, 06 Apr 2011 22:06:11 -0700
changeset 9035 1255eb81cc2f
parent 8141 cdf18fc88266
child 22574 7f8ce0c8c20a
permissions -rw-r--r--
7033660: Update copyright year to 2011 on any files changed in 2011 Reviewed-by: dholmes
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
/*
9035
1255eb81cc2f 7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents: 8141
diff changeset
     2
 * Copyright (c) 2010, 2011, 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
 */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    53
public class StrokeBorder extends AbstractBorder {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    54
    private final BasicStroke stroke;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    55
    private final Paint paint;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    56
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
     * Creates a border of the specified {@code stroke}.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    59
     * 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
    60
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    61
     * @param stroke  the {@link BasicStroke} object used to stroke a shape
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    62
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    63
     * @throws NullPointerException if the specified {@code stroke} is {@code null}
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    64
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    65
    public StrokeBorder(BasicStroke stroke) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    66
        this(stroke, null);
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    67
    }
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
     * Creates a border of the specified {@code stroke} and {@code paint}.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    71
     * If the specified {@code paint} is {@code null},
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    72
     * 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
    73
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    74
     * @param stroke  the {@link BasicStroke} object used to stroke a shape
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    75
     * @param paint   the {@link Paint} object used to generate a color
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    76
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    77
     * @throws NullPointerException if the specified {@code stroke} is {@code null}
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    78
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    79
    @ConstructorProperties({ "stroke", "paint" })
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    80
    public StrokeBorder(BasicStroke stroke, Paint paint) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    81
        if (stroke == null) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    82
            throw new NullPointerException("border's stroke");
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    83
        }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    84
        this.stroke = stroke;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    85
        this.paint = paint;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    86
    }
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
     * Paints the border for the specified component
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    90
     * 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
    91
     * 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
    92
     * 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
    93
     * 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
    94
     * 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
    95
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    96
     * @param c       the component for which this border is being painted
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    97
     * @param g       the paint graphics
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    98
     * @param x       the x position of the painted border
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    99
     * @param y       the y position of the painted border
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   100
     * @param width   the width of the painted border
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   101
     * @param height  the height of the painted border
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   102
     *
8141
cdf18fc88266 7001118: DOC: javax.swing.border.StrokeBorder.paintBorder() doesn't throw NPE in all specified cases
malenkov
parents: 8140
diff changeset
   103
     * @throws NullPointerException if the specified {@code g} is {@code null}
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   104
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   105
    @Override
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   106
    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
   107
        float size = this.stroke.getLineWidth();
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   108
        if (size > 0.0f) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   109
            g = g.create();
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   110
            if (g instanceof Graphics2D) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   111
                Graphics2D g2d = (Graphics2D) g;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   112
                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
   113
                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
   114
                g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   115
                                     RenderingHints.VALUE_ANTIALIAS_ON);
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   116
                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
   117
            }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   118
            g.dispose();
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   119
        }
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
     * Reinitializes the {@code insets} parameter
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   124
     * 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
   125
     * 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
   126
     * 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
   127
     * that is used to paint the border.
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   128
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   129
     * @param c       the component for which this border insets value applies
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   130
     * @param insets  the {@code Insets} object to be reinitialized
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   131
     * @return the reinitialized {@code insets} parameter
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   132
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   133
     * @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
   134
     *
f38be08fdcb4 7001484: DOC: Method javax.swing.border.StrokeBorder.getBorderInsets() should specify how it converts float
malenkov
parents: 7006
diff changeset
   135
     * @see Math#ceil
7006
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   136
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   137
    @Override
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   138
    public Insets getBorderInsets(Component c, Insets insets) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   139
        int size = (int) Math.ceil(this.stroke.getLineWidth());
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   140
        insets.set(size, size, size, size);
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   141
        return insets;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   142
    }
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
     * Returns the {@link BasicStroke} object used to stroke a shape
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   146
     * during the border rendering.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   147
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   148
     * @return the {@link BasicStroke} object
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   149
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   150
    public BasicStroke getStroke() {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   151
        return this.stroke;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   152
    }
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
     * Returns the {@link Paint} object used to generate a color
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   156
     * during the border rendering.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   157
     *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   158
     * @return the {@link Paint} object or {@code null}
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   159
     *         if the {@code paint} parameter is not set
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   160
     */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   161
    public Paint getPaint() {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   162
        return this.paint;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   163
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
   164
}