Package org.pentaho.gwt.widgets.client.utils.TimeUtil

Examples of org.pentaho.gwt.widgets.client.utils.TimeUtil.DayOfWeek


  }

  private ListBox createDayOfWeekListBox() {
    ListBox l = new ListBox();
    for ( int ii = 0; ii < DayOfWeek.length(); ++ii ) {
      DayOfWeek day = DayOfWeek.get( ii );
      l.addItem( day.toString() );
    }
    return l;
  }
View Full Code Here


      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 );
View Full Code Here

     */
    public void setCheckedDaysAsString( String strDays, int valueOfSunday ) {
      String[] days = strDays.split( "," ); //$NON-NLS-1$
      for ( String day : days ) {
        int intDay = Integer.parseInt( day ) - valueOfSunday;
        DayOfWeek dayOfWeek = DayOfWeek.get( intDay );
        CheckBox cb = dayToCheckBox.get( dayOfWeek );
        cb.setChecked( true );
      }
    }
View Full Code Here

TOP

Related Classes of org.pentaho.gwt.widgets.client.utils.TimeUtil.DayOfWeek

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.