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