1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
/* * @(#)SwingConstants.java 1.17 05/11/17 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javax.swing; /** * A collection of constants generally used for positioning and orienting * components on the screen. * * @version 1.17 11/17/05 * @author Jeff Dinkins * @author Ralph Kar (orientation support) */ public interface SwingConstants { /** * The central position in an area. Used for * both compass-direction constants (NORTH, etc.) * and box-orientation constants (TOP, etc.). */ public static final int CENTER = 0; // // Box-orientation constant used to specify locations in a box. // /** * Box-orientation constant used to specify the top of a box. */ public static final int TOP = 1; /** * Box-orientation constant used to specify the left side of a box. */ public static final int LEFT = 2; /** * Box-orientation constant used to specify the bottom of a box. */ public static final int BOTTOM = 3; /** * Box-orientation constant used to specify the right side of a box. */ public static final int RIGHT = 4; // // Compass-direction constants used to specify a position. // /** * Compass-direction North (up). */ public static final int NORTH = 1; /** * Compass-direction north-east (upper right). */ public static final int NORTH_EAST = 2; /** * Compass-direction east (right). */ public static final int EAST = 3; /** * Compass-direction south-east (lower right). */ public static final int SOUTH_EAST = 4; /** * Compass-direction south (down). */ public static final int SOUTH = 5; /** * Compass-direction south-west (lower left). */ public static final int SOUTH_WEST = 6; /** * Compass-direction west (left). */ public static final int WEST = 7; /** * Compass-direction north west (upper left). */ public static final int NORTH_WEST = 8; // // These constants specify a horizontal or // vertical orientation. For example, they are // used by scrollbars and sliders. // /** Horizontal orientation. Used for scrollbars and sliders. */ public static final int HORIZONTAL = 0; /** Vertical orientation. Used for scrollbars and sliders. */ public static final int VERTICAL = 1; // // Constants for orientation support, since some languages are // left-to-right oriented and some are right-to-left oriented. // This orientation is currently used by buttons and labels. // /** * Identifies the leading edge of text for use with left-to-right * and right-to-left languages. Used by buttons and labels. */ public static final int LEADING = 10; /** * Identifies the trailing edge of text for use with left-to-right * and right-to-left languages. Used by buttons and labels. */ public static final int TRAILING = 11; /** * Identifies the next direction in a sequence. * * @since 1.4 */ public static final int NEXT = 12; /** * Identifies the previous direction in a sequence. * * @since 1.4 */ public static final int PREVIOUS = 13; }