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

cannot set FlowLayout Manager to the LEADING and TRAILING directions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.3.0
    • client-libs
    • generic
    • generic



      Name: clC74495 Date: 12/18/99


      The implementation of FlowLayout manager functions setAligment, given below) prevents
      the programmer from setting the Alignmnet attribute to LEADING or TRAILING. Those
      attributes are converted to LEFT and RIGHT regadless of the user local.
      This will prevent BIDI programs from flipping directions.
      This function is also called in the third constructor.
      ------------------------------------------------------
      /**
           * Sets the alignment for this layout.
           * Possible values are <code>FlowLayout.LEFT</code>,
           * <code>FlowLayout.RIGHT</code>, and <code>FlowLayout.CENTER</code>.
           * @param align the alignment value.
           * @see #getAlignment()
           * @since JDK1.1
           */
          public void setAlignment(int align) {
      this.newAlign = align;

              // this.align is used only for serialization compatibility,
              // so set it to a value compatible with the 1.1 version
              // of the class

              switch (align) {
      case LEADING:
                  this.align = LEFT;
      break;
      case TRAILING:
                  this.align = RIGHT;
      break;
              default:
                  this.align = align;
      break;
              }
          }
      ------------------------------------------------------
      (Review ID: 99041)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: