ConstraintBuilder { public ConstraintBuilder w() { constraints.anchor = GridBagConstraints.WEST; return this; } 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; }
@Test public void w() { GridBagConstraints c; c = builder.w().getConstraints(); assertEquals(c.anchor, GridBagConstraints.WEST); }