KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > plaf > ColorUIResource


1 /*
2  * @(#)ColorUIResource.java 1.14 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.swing.plaf;
9
10 import java.awt.Color JavaDoc;
11 import javax.swing.plaf.UIResource JavaDoc;
12
13
14 /*
15  * A subclass of Color that implements UIResource. UI
16  * classes that create colors should use this class.
17  * <p>
18  * <strong>Warning:</strong>
19  * Serialized objects of this class will not be compatible with
20  * future Swing releases. The current serialization support is
21  * appropriate for short term storage or RMI between applications running
22  * the same version of Swing. As of 1.4, support for long term storage
23  * of all JavaBeans<sup><font size="-2">TM</font></sup>
24  * has been added to the <code>java.beans</code> package.
25  * Please see {@link java.beans.XMLEncoder}.
26  *
27  * @see javax.swing.plaf.UIResource
28  * @version 1.14 12/19/03
29  * @author Hans Muller
30  *
31  */

32 public class ColorUIResource extends Color JavaDoc implements UIResource JavaDoc
33 {
34     public ColorUIResource(int r, int g, int b) {
35     super(r, g, b);
36     }
37
38     public ColorUIResource(int rgb) {
39     super(rgb);
40     }
41
42     public ColorUIResource(float r, float g, float b) {
43     super(r, g, b);
44     }
45
46     public ColorUIResource(Color JavaDoc c) {
47     super(c.getRGB(), (c.getRGB() & 0xFF000000) != 0xFF000000);
48     }
49 }
50
Popular Tags