gp.setCellPadding( 0 );
gp.setCellSpacing( 0 );
// add Sun - Wed
final int ITEMS_IN_ROW = 4;
for ( int ii = 0; ii < ITEMS_IN_ROW; ++ii ) {
DayOfWeek day = DayOfWeek.get( ii );
CheckBox cb = new CheckBox( day.toString() );
cb.setStylePrimaryName( DOW_CHECKBOX );
gp.setWidget( 0, ii, cb );
dayToCheckBox.put( day, cb );
}
// Add Thur - Sat
for ( int ii = ITEMS_IN_ROW; ii < DayOfWeek.length(); ++ii ) {
DayOfWeek day = DayOfWeek.get( ii );
CheckBox cb = new CheckBox( day.toString() );
cb.setStylePrimaryName( DOW_CHECKBOX );
gp.setWidget( 1, ii - 4, cb );
dayToCheckBox.put( day, cb );
}
add( gp );