@Test public void testAddMultiple() { JPanel dummy1 = new JPanel(); JPanel dummy2 = new JPanel(); builder.add(dummy1, dummy2); assertEquals(panel.getComponentCount(), 1); JPanel c = (JPanel) panel.getComponents()[0]; assertEquals(c.getComponentCount(), 2); assertSame(c.getComponents()[0], dummy1); assertSame(c.getComponents()[1], dummy2); }
public void add(Component component) { container.add(component, constraints); reset(); ++constraints.gridx; }
ConstraintBuilder { public void add(Component component) { container.add(component, constraints); reset(); ++constraints.gridx; } }
ConstraintBuilder { public void add(Component component) { container.add(component, constraints); reset(); ++constraints.gridx; } ConstraintBuilder(Container container); }
ConstraintBuilder { public void add(Component component) { container.add(component, constraints); reset(); ++constraints.gridx; } ConstraintBuilder(Container container); final ConstraintBuilder reset(); final ConstraintBuilder makeDefault(); ConstraintBuilder at(int row, int column); ConstraintBuilder span(int nRows, int nColumns); ConstraintBuilder insets(int top, int left, int bottom, int right); ConstraintBuilder hpad(int padding); ConstraintBuilder vpad(int padding); ConstraintBuilder baseline_w(); ConstraintBuilder baseline_centered(); ConstraintBuilder baseline_e(); ConstraintBuilder nw(); ConstraintBuilder sw(); ConstraintBuilder w(); ConstraintBuilder hfill(); ConstraintBuilder vfill(); ConstraintBuilder hvfill(); ConstraintBuilder weight(float weightx, float weighty); void add(Component component); ConstraintBuilder nextRow(); ConstraintBuilder nextColumn(); void add(Component... components); static Component hbox(int width); static Component hbox(int minWidth, int preferredWidth, int maxWidth); }
ConstraintBuilder { public void add(Component component) { container.add(component, constraints); reset(); ++constraints.gridx; } ConstraintBuilder(Container container); final ConstraintBuilder reset(); final ConstraintBuilder makeDefault(); ConstraintBuilder at(int row, int column); ConstraintBuilder span(int nRows, int nColumns); ConstraintBuilder insets(int top, int left, int bottom, int right); ConstraintBuilder hpad(int padding); ConstraintBuilder vpad(int padding); ConstraintBuilder baseline_w(); ConstraintBuilder baseline_centered(); ConstraintBuilder baseline_e(); ConstraintBuilder nw(); ConstraintBuilder sw(); ConstraintBuilder w(); ConstraintBuilder hfill(); ConstraintBuilder vfill(); ConstraintBuilder hvfill(); ConstraintBuilder weight(float weightx, float weighty); void add(Component component); ConstraintBuilder nextRow(); ConstraintBuilder nextColumn(); void add(Component... components); static Component hbox(int width); static Component hbox(int minWidth, int preferredWidth, int maxWidth); static final int DEFAULT_HPAD; }