#152: Ensure at least one ColumnSize must be set

Ensures at least one ColumnSize must be set, both during construction and with setters. Had to remove constructor with the Widget varargs constructor as the signature would be identical to the ColumnSize varargs constructor. Widgets can still be added after construction using the add method.
You're right - I completely didn't pay attention to the setStyleName call.
I've removed it now and it should all be set correctly inside the setSize
call


On Fri, Jun 27, 2014 at 3:51 PM, Sven Jacobs <notifications@github.com>
wrote:

> In gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/ui/Column.java:
>
> >       * @see #addSize(ColumnSize...)
> >       */
> > -    public Column(final ColumnSize size) {
> > -        this();
> > -        setStyleName(size.getCssName());
> > -    }
> > -
> > -    /**
> > -     * Creates column with multiple sizes.
> > -     *
> > -     * @param sizes Column sizes
> > -     */
> > -    public Column(final ColumnSize... sizes) {
> > -        setSize(sizes);
> > +    public Column(final ColumnSize firstSize, final ColumnSize... otherSizes) {
> > +        setSize(firstSize, otherSizes);
> > +        setStyleName(firstSize.getCssName());
>
> Nope, not correct what I said (I should read my own, old code more
> carefully) ;)
>
> setSize() will remove all other sizes. So the result would be MD_4 and
> MD_5. But I still don't understand why setStyleName() is required here
> because the style name will be added to the column but the previous
> setSize() line.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/gwtbootstrap3/gwtbootstrap3/pull/188/files#r14296249>.
>