KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > plaf > synth > SynthConstants


1 /*
2  * @(#)SynthConstants.java 1.7 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 package javax.swing.plaf.synth;
8
9 import javax.swing.*;
10
11 /**
12  * Constants used by Synth. Not all Components support all states. A
13  * Component will at least be in one of the primary states. That is, the
14  * return value from <code>SynthContext.getComponentState()</code> will at
15  * least be one of <code>ENABLED</code>, <code>MOUSE_OVER</code>,
16  * <code>PRESSED</code> or <code>DISABLED</code>, and may also contain
17  * <code>FOCUSED</code>, <code>SELECTED</code> or <code>DEFAULT</code>.
18  *
19  * @version 1.7, 12/19/03
20  * @since 1.5
21  */

22 public interface SynthConstants {
23     /**
24      * Primary state indicating the component is enabled.
25      */

26     public static final int ENABLED = 1 << 0;
27     /**
28      * Primary state indicating the mouse is over the region.
29      */

30     public static final int MOUSE_OVER = 1 << 1;
31     /**
32      * Primary state indicating the region is in a pressed state. Pressed
33      * does not necessarily mean the user has pressed the mouse button.
34      */

35     public static final int PRESSED = 1 << 2;
36     /**
37      * Primary state indicating the region is not enabled.
38      */

39     public static final int DISABLED = 1 << 3;
40
41     /**
42      * Indicates the region has focus.
43      */

44     public static final int FOCUSED = 1 << 8;
45     /**
46      * Indicates the region is selected.
47      */

48     public static final int SELECTED = 1 << 9;
49     /**
50      * Indicates the region is the default. This is typically used for buttons
51      * to indicate this button is somehow special.
52      */

53     public static final int DEFAULT = 1 << 10;
54 }
55
Popular Tags