private DateCell getCell(Date d) { int index = CalendarUtil.getDaysBetween(firstDisplayed, d); if (index < 0 || grid.getNumCells() <= index) { return null; } DateCell cell = (DateCell) grid.getCell(index); if (cell.getValue().getDate() != d.getDate()) { throw new IllegalStateException(d + " cannot be associated with cell " + cell + " as it has date " + cell.getValue()); } return cell; } }
void update(Date current) { setEnabled(true); getValue().setTime(current.getTime()); String value = getModel().formatDayOfMonth(getValue()); setText(value); dateStyle = cellStyle; if (isFiller()) { getElement().setTabIndex(-1); dateStyle += " " + css().dayIsFiller(); } else { getElement().setTabIndex(0); String extraStyle = getDatePicker().getStyleOfDate(current); if (extraStyle != null) { dateStyle += " " + extraStyle; } } // We want to certify that all date styles have " " before and after // them for ease of adding to and replacing them. dateStyle += " "; updateStyle(); }
private DateCell getCell(Date d) { int index = CalendarUtil.getDaysBetween(firstDisplayed, d); if (index < 0 || grid.getNumCells() <= index) { return null; } DateCell cell = (DateCell) grid.getCell(index); if (cell.getValue().getDate() != d.getDate()) { throw new IllegalStateException(d + " cannot be associated with cell " + cell + " as it has date " + cell.getValue()); } return cell; } }
void update(Date current) { setEnabled(true); getValue().setTime(current.getTime()); String value = getModel().formatDayOfMonth(getValue()); setText(value); dateStyle = cellStyle; if (isFiller()) { getElement().setTabIndex(-1); dateStyle += " " + css().dayIsFiller(); } else { getElement().setTabIndex(0); String extraStyle = getDatePicker().getStyleOfDate(current); if (extraStyle != null) { dateStyle += " " + extraStyle; } } // We want to certify that all date styles have " " before and after // them for ease of adding to and replacing them. dateStyle += " "; updateStyle(); }
void update(Date current) { setEnabled(true); getValue().setTime(current.getTime()); String value = getModel().formatDayOfMonth(getValue()); setText(value); dateStyle = cellStyle; if (isFiller()) { getElement().setTabIndex(-1); dateStyle += " " + css().dayIsFiller(); } else { getElement().setTabIndex(0); String extraStyle = getDatePicker().getStyleOfDate(current); if (extraStyle != null) { dateStyle += " " + extraStyle; } } // We want to certify that all date styles have " " before and after // them for ease of adding to and replacing them. dateStyle += " "; updateStyle(); }
public boolean isFiller() { return !getModel().isInCurrentMonth(getValue()); }
public boolean isFiller() { return !getModel().isInCurrentMonth(getValue()); }
private DateCell getCell(Date d) { int index = CalendarUtil.getDaysBetween(firstDisplayed, d); if (index < 0 || grid.getNumCells() <= index) { return null; } DateCell cell = (DateCell) grid.getCell(index); if (cell.getValue().getDate() != d.getDate()) { throw new IllegalStateException(d + " cannot be associated with cell " + cell + " as it has date " + cell.getValue()); } return cell; } }
@Override public void onHighlighted(boolean highlighted) { setHighlightedDate(getValue()); updateStyle(); }
@Override public void onHighlighted(boolean highlighted) { setHighlightedDate(getValue()); updateStyle(); }
public boolean isFiller() { return !getModel().isInCurrentMonth(getValue()); }
@Override public void onHighlighted(boolean highlighted) { setHighlightedDate(getValue()); updateStyle(); }