jdk/test/java/beans/XMLEncoder/java_awt_GradientPaint.java
author lana
Tue, 23 May 2017 21:11:42 +0000
changeset 45187 331a6542b5b8
parent 7006 05505fff1342
permissions -rw-r--r--
Added tag jdk-10+7 for changeset d554736d963e
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 GradientPaint 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.Color;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    32
import java.awt.GradientPaint;
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    33
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    34
public final class java_awt_GradientPaint extends AbstractTest<GradientPaint> {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    35
    public static void main(String[] args) {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    36
        new java_awt_GradientPaint().test(true);
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
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    39
    protected GradientPaint getObject() {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    40
        return new GradientPaint(0.1f, 0.2f, Color.BLACK, 0.3f, 0.4f, Color.WHITE, true);
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    41
    }
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
    protected GradientPaint getAnotherObject() {
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    44
        return null; /* TODO: could not update property
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    45
        return new GradientPaint(0.4f, 0.3f, Color.WHITE, 0.2f, 0.1f, Color.BLACK, false);*/
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    46
    }
05505fff1342 4358979: javax.swing.border should have a DashedBorder
malenkov
parents:
diff changeset
    47
}