src/demo/share/jfc/SwingSet2/RubyTheme.java
author weijun
Tue, 29 Oct 2019 09:34:21 +0800
changeset 58830 fa0b9f9c597a
parent 49495 f46bfa7a2956
permissions -rw-r--r--
8228969: 2019-09-28 public suffix list update Reviewed-by: mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49495
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
     1
/*
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
     2
 *
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
     3
 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
     4
 *
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
     5
 * Redistribution and use in source and binary forms, with or without
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
     6
 * modification, are permitted provided that the following conditions
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
     7
 * are met:
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
     8
 *
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
     9
 *   - Redistributions of source code must retain the above copyright
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    10
 *     notice, this list of conditions and the following disclaimer.
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    11
 *
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    12
 *   - Redistributions in binary form must reproduce the above copyright
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    13
 *     notice, this list of conditions and the following disclaimer in the
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    14
 *     documentation and/or other materials provided with the distribution.
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    15
 *
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    16
 *   - Neither the name of Oracle nor the names of its
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    17
 *     contributors may be used to endorse or promote products derived
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    18
 *     from this software without specific prior written permission.
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    19
 *
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    20
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    21
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    22
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    23
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    24
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    25
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    26
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    27
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    28
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    29
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    30
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    31
 */
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    32
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    33
import javax.swing.plaf.*;
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    34
import javax.swing.plaf.metal.*;
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    35
import javax.swing.*;
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    36
import javax.swing.border.*;
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    37
import java.awt.*;
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    38
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    39
/**
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    40
 * This class describes a theme using red colors.
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    41
 *
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    42
 * @author Jeff Dinkins
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    43
 */
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    44
public class RubyTheme extends DefaultMetalTheme {
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    45
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    46
    public String getName() { return "Ruby"; }
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    47
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    48
    private final ColorUIResource primary1 = new ColorUIResource(80, 10, 22);
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    49
    private final ColorUIResource primary2 = new ColorUIResource(193, 10, 44);
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    50
    private final ColorUIResource primary3 = new ColorUIResource(244, 10, 66);
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    51
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    52
    protected ColorUIResource getPrimary1() { return primary1; }
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    53
    protected ColorUIResource getPrimary2() { return primary2; }
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    54
    protected ColorUIResource getPrimary3() { return primary3; }
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    55
f46bfa7a2956 8198990: Move SwingSet2 from closed to OpenJDK
prr
parents:
diff changeset
    56
}