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

BorderLayout provides no way to get the constraint for each child

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.3.1
    • Fix Version/s: 5.0
    • Component/s: client-libs
    • Subcomponent:
    • Resolved In Build:
      tiger
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: clC74495 Date: 09/11/98


      We are building a SwingSet IDE. Among other things
      the visual editor must allow a user to edit the
      LayoutManager that is attached to a JPanel.
      The BorderLayout's API provides no way to find the
      constraint associated with each child ("North",
      "South", "East", etc.).

      GridBagLayout already has such a thing:
      (getConstaints).

      Without this ability the BorderLayout is clumsy and
      confusing when used in conjunction with an IDE
      supporting a visual editor, since if the user
      wants to edit a Component's contraint we
      can't display the current value.

      Adding a new methods called getConstraint(Component)
      which returned a String would solve this problem.
      (Review ID: 38184)
      ======================================================================

      Name: krC82822 Date: 07/31/2001


      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

      It's currently not possible to tell how a given component is constrained
      in a BorderLayout, or what component is at a specific constraint. There
      are cases where this information is crucial. For example, restoring the
      current location of a tool palette in a BorderLayout requires being able
      to tell that the user dragged the palette to another position, and then
      to save the new constraint. This information is locked up in the layout,
      and there doesn't seem to be a practical way to recover it.
      (Review ID: 127797)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                leifs Leif Samuelsson (Inactive)
                Reporter:
                clucasius Carlos Lucasius (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: