KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > SwingConstants


1 /*
2  * @(#)SwingConstants.java 1.16 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;
8
9
10 /**
11  * A collection of constants generally used for positioning and orienting
12  * components on the screen.
13  *
14  * @version 1.16 12/19/03
15  * @author Jeff Dinkins
16  * @author Ralph Kar (orientation support)
17  */

18 public interface SwingConstants {
19
20         /**
21          * The central position in an area. Used for
22          * both compass-direction constants (NORTH, etc.)
23          * and box-orientation constants (TOP, etc.).
24          */

25         public static final int CENTER = 0;
26
27         //
28
// Box-orientation constant used to specify locations in a box.
29
//
30
/**
31          * Box-orientation constant used to specify the top of a box.
32          */

33         public static final int TOP = 1;
34         /**
35          * Box-orientation constant used to specify the left side of a box.
36          */

37         public static final int LEFT = 2;
38         /**
39          * Box-orientation constant used to specify the bottom of a box.
40          */

41         public static final int BOTTOM = 3;
42         /**
43          * Box-orientation constant used to specify the right side of a box.
44          */

45         public static final int RIGHT = 4;
46
47         //
48
// Compass-direction constants used to specify a position.
49
//
50
/**
51          * Compass-direction North (up).
52          */

53         public static final int NORTH = 1;
54         /**
55          * Compass-direction north-east (upper right).
56          */

57         public static final int NORTH_EAST = 2;
58         /**
59          * Compass-direction east (right).
60          */

61         public static final int EAST = 3;
62         /**
63          * Compass-direction south-east (lower right).
64          */

65         public static final int SOUTH_EAST = 4;
66         /**
67          * Compass-direction south (down).
68          */

69         public static final int SOUTH = 5;
70         /**
71          * Compass-direction south-west (lower left).
72          */

73         public static final int SOUTH_WEST = 6;
74         /**
75          * Compass-direction west (left).
76          */

77         public static final int WEST = 7;
78         /**
79          * Compass-direction north west (upper left).
80          */

81         public static final int NORTH_WEST = 8;
82
83         //
84
// These constants specify a horizontal or
85
// vertical orientation. For example, they are
86
// used by scrollbars and sliders.
87
//
88
/** Horizontal orientation. Used for scrollbars and sliders. */
89         public static final int HORIZONTAL = 0;
90         /** Vertical orientation. Used for scrollbars and sliders. */
91         public static final int VERTICAL = 1;
92
93         //
94
// Constants for orientation support, since some languages are
95
// left-to-right oriented and some are right-to-left oriented.
96
// This orientation is currently used by buttons and labels.
97
//
98
/**
99          * Identifies the leading edge of text for use with left-to-right
100          * and right-to-left languages. Used by buttons and labels.
101          */

102         public static final int LEADING = 10;
103         /**
104          * Identifies the trailing edge of text for use with left-to-right
105          * and right-to-left languages. Used by buttons and labels.
106          */

107         public static final int TRAILING = 11;
108         /**
109      * Identifies the next direction in a sequence.
110          *
111          * @since 1.4
112      */

113         public static final int NEXT = 12;
114
115         /**
116      * Identifies the previous direction in a sequence.
117          *
118          * @since 1.4
119      */

120         public static final int PREVIOUS = 13;
121 }
122
Popular Tags