Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348970

Summary: SpringLayout/FormLayout. Attach should be intuitive, not just any acceptable
Product: z_Archived Reporter: Alexander Mitin <Alexander.Mitin>
Component: WindowBuilderAssignee: Alexander Mitin <Alexander.Mitin>
Status: CLOSED INVALID QA Contact:
Severity: enhancement    
Priority: P3 CC: clayberg, wim.jongman
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Mitin CLA 2011-06-09 17:31:40 EDT
See SpringLayout_GEF_Test.test_MOVE_andCycles_A()
It is now in state "be green for current implementation", but we should change it to:

        assertEditor(getTestSource(new String[]{
                "public class Test extends JPanel {",
                "  public Test() {",
                "    SpringLayout layout = new SpringLayout();",
                "    setLayout(layout);",
                "    ",
                "    Button buttonA = new Button();",
                "    add(buttonA);",
                "    ",
                "    Button buttonB = new Button();",
                "    layout.putConstraint(SpringLayout.WEST, buttonB, 75, SpringLayout.WEST, this);",
                "    add(buttonB);",
                "    ",
                "    Button buttonC = new Button();",
                "    layout.putConstraint(SpringLayout.NORTH, buttonA, 0, SpringLayout.NORTH, buttonC);",
                "    layout.putConstraint(SpringLayout.WEST, buttonA, 5, SpringLayout.EAST, buttonC);",
                "    layout.putConstraint(SpringLayout.WEST, buttonC, 5, SpringLayout.EAST, buttonB);",
                "    add(buttonC);",
                "  }",
                "}"}), m_editor);

Order of putConstraint() invocations may be different.
Comment 1 Wim Jongman CLA 2021-02-27 12:01:43 EST
Closing. Please reopen if this is still an issue.