Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4421794

Clean up component orientation constants in BorderLayout

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • client-libs
    • beta
    • generic
    • solaris_2.5

      BorderLayout has the following 4 constants which indicate component orientation relative positioning:

      public static final String BEFORE_FIRST_LINE
      public static final String AFTER_LAST_LINE
      public static final String BEFORE_LINE_BEGINS
      public static final String AFTER_LINE_ENDS

      These constants were introduced to the API by IBM before Sun took over this project. Unfortunately, the constant's names are inconsistent with the terminology used elsewhere in AWT and Swing for this same idea. The names used everwhere else are:

        PAGE_START
        PAGE_END
        LINE_START
        LINE_END

      BorderLayout should add 4 new constants which are synonyms for the old ones and which use the correct terminology like this:

      public static final String PAGE_START = BEFORE_FIRST_LINE
      public static final String PAGE_END = AFTER_LAST_LINE
      public static final String LINE_START = BEFORE_LINE_BEGINS
      public static final String LINE_END = AFTER_LINE_ENDS

            bcbeck Brian Beck (Inactive)
            bcbeck Brian Beck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: