Package com.google.gwt.widgetideas.datepicker.client.SimpleCalendarView.CellGrid

Examples of com.google.gwt.widgetideas.datepicker.client.SimpleCalendarView.CellGrid.Cell


    firstDisplayed = getModel().getFirstDayOfCurrentFirstWeek();

    lastDisplayed.setTime(firstDisplayed.getTime());

    for (int i = 0; i < grid.cellList.size(); i++) {
      Cell cell = grid.cellList.get(i);
      cell.update(lastDisplayed);
      CalendarModel.shiftDays(lastDisplayed, 1);
    }
  }
View Full Code Here


      formatter.setStyleName(0, i, Styles.DAY_TITLE);
    }

    for (int row = 1; row <= CalendarModel.WEEKS_IN_MONTH; row++) {
      for (int column = 0; column < CalendarModel.DAYS_IN_WEEK; column++) {
        grid.new Cell(formatter.getElement(row, column), column);
      }
    }
    initWidget(grid);
    setStyleName(Styles.CALENDAR_VIEW);
    ColumnFormatter columnFormatter = grid.getColumnFormatter();
View Full Code Here

  }

  private Cell getCell(Date d) {
    int index = CalendarModel.diffDays(firstDisplayed, d);

    Cell cell = grid.getCell(index);
    if (cell.date.getDate() != d.getDate()) {
      throw new IllegalStateException(d + " cannot be associated with cell "
          + cell + " as it has date " + cell.date);
    }
    return cell;
View Full Code Here

    @Override
    public void onBrowserEvent(Event event) {

      switch (DOM.eventGetType(event)) {
        case Event.ONCLICK: {
          Cell cell = getCell(event);
          if (cell != null) {
            cell.onClick(event);
          }
          break;
        }
        case Event.ONMOUSEOUT: {
          Element e = DOM.eventGetFromElement(event);
          if (e != null) {
            Cell cell = cellMap.get(e);
            if (cell != null) {
              cell.removeStyleName(Styles.HIGHLIGHTED_CELL);
              Element target = DOM.eventGetToElement(event);
              if (target != null && cellMap.get(target) == null) {
                updateHighlightedDate(null);
              }
            }
          }
          break;
        }
        case Event.ONMOUSEOVER: {
          Element e = DOM.eventGetToElement(event);
          if (e != null) {
            Cell cell = cellMap.get(e);
            if (cell != null) {
              cell.addStyleName(Styles.HIGHLIGHTED_CELL);
              cell.onHover();
            }
          }
          break;
        }
      }
View Full Code Here

TOP

Related Classes of com.google.gwt.widgetideas.datepicker.client.SimpleCalendarView.CellGrid.Cell

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.