test/jdk/java/beans/XMLEncoder/javax_swing_border_StrokeBorder.java
author mli
Wed, 23 May 2018 14:21:14 +0800
changeset 50230 cae567ae015d
parent 47216 71c04702a3d5
permissions -rw-r--r--
8202771: Migrate Unicode character tests to JDK Repo Reviewed-by: naoto Contributed-by: dan.z.zhou@oracle.com
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
/*
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     2
 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
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.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     8
 *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
     9
 * 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
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    12
 * 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
    13
 * accompanied this code).
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    14
 *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    15
 * 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
    16
 * 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
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    18
 *
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    20
 * 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
    21
 * questions.
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    22
 */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    23
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
 * @test
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    26
 * @bug 4358979
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    27
 * @summary Tests StrokeBorder encoding
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    28
 * @author Sergey Malenkov
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    29
 */
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    30
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    31
import java.awt.BasicStroke;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    32
import java.awt.Color;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    33
import javax.swing.border.StrokeBorder;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    34
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    35
public final class javax_swing_border_StrokeBorder extends AbstractTest<StrokeBorder> {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    36
    public static void main(String[] args) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    37
        new javax_swing_border_StrokeBorder().test(true);
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    38
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    39
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    40
    protected StrokeBorder getObject() {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    41
        return new StrokeBorder(new BasicStroke(0), Color.WHITE);
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    42
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    43
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    44
    protected StrokeBorder getAnotherObject() {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    45
        return null; // TODO: could not update property
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    46
        //return new StrokeBorder(new BasicStroke(1));
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    47
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    48
}