1 /*
   2  * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package javax.swing;
  26 
  27 
  28 /**
  29  * A collection of constants generally used for positioning and orienting
  30  * components on the screen.
  31  *
  32  * @author Jeff Dinkins
  33  * @author Ralph Kar (orientation support)
  34  */
  35 public interface SwingConstants {
  36 
  37         /**
  38          * The central position in an area. Used for
  39          * both compass-direction constants (NORTH, etc.)
  40          * and box-orientation constants (TOP, etc.).
  41          */
  42         public static final int CENTER  = 0;
  43 
  44         //
  45         // Box-orientation constant used to specify locations in a box.
  46         //
  47         /**
  48          * Box-orientation constant used to specify the top of a box.
  49          */
  50         public static final int TOP     = 1;
  51         /**
  52          * Box-orientation constant used to specify the left side of a box.
  53          */
  54         public static final int LEFT    = 2;
  55         /**
  56          * Box-orientation constant used to specify the bottom of a box.
  57          */
  58         public static final int BOTTOM  = 3;
  59         /**
  60          * Box-orientation constant used to specify the right side of a box.
  61          */
  62         public static final int RIGHT   = 4;
  63 
  64         //
  65         // Compass-direction constants used to specify a position.
  66         //
  67         /**
  68          * Compass-direction North (up).
  69          */
  70         public static final int NORTH      = 1;
  71         /**
  72          * Compass-direction north-east (upper right).
  73          */
  74         public static final int NORTH_EAST = 2;
  75         /**
  76          * Compass-direction east (right).
  77          */
  78         public static final int EAST       = 3;
  79         /**
  80          * Compass-direction south-east (lower right).
  81          */
  82         public static final int SOUTH_EAST = 4;
  83         /**
  84          * Compass-direction south (down).
  85          */
  86         public static final int SOUTH      = 5;
  87         /**
  88          * Compass-direction south-west (lower left).
  89          */
  90         public static final int SOUTH_WEST = 6;
  91         /**
  92          * Compass-direction west (left).
  93          */
  94         public static final int WEST       = 7;
  95         /**
  96          * Compass-direction north west (upper left).
  97          */
  98         public static final int NORTH_WEST = 8;
  99 
 100         //
 101         // These constants specify a horizontal or
 102         // vertical orientation. For example, they are
 103         // used by scrollbars and sliders.
 104         //
 105         /** Horizontal orientation. Used for scrollbars and sliders. */
 106         public static final int HORIZONTAL = 0;
 107         /** Vertical orientation. Used for scrollbars and sliders. */
 108         public static final int VERTICAL   = 1;
 109 
 110         //
 111         // Constants for orientation support, since some languages are
 112         // left-to-right oriented and some are right-to-left oriented.
 113         // This orientation is currently used by buttons and labels.
 114         //
 115         /**
 116          * Identifies the leading edge of text for use with left-to-right
 117          * and right-to-left languages. Used by buttons and labels.
 118          */
 119         public static final int LEADING  = 10;
 120         /**
 121          * Identifies the trailing edge of text for use with left-to-right
 122          * and right-to-left languages. Used by buttons and labels.
 123          */
 124         public static final int TRAILING = 11;
 125         /**
 126          * Identifies the next direction in a sequence.
 127          *
 128          * @since 1.4
 129          */
 130         public static final int NEXT = 12;
 131 
 132         /**
 133          * Identifies the previous direction in a sequence.
 134          *
 135          * @since 1.4
 136          */
 137         public static final int PREVIOUS = 13;
 138 }