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