void onFirstMonthSelected() { Month month = Month.getByIndex(view.getSelectedFirstMonthIndex()+1); columnGroup.setFirstMonthOfYear(month); changeEvent.fire(new DataSetGroupDateChanged(columnGroup)); } }
void onFirstMonthSelected() { Month month = Month.getByIndex(view.getSelectedFirstMonthIndex()+1); columnGroup.setFirstMonthOfYear(month); changeEvent.fire(new DataSetGroupDateChanged(columnGroup)); } }
public void changeFirstMonth() { int selectedIdx = view.getSelectedFirstMonthIndex(); Month month = Month.getByIndex(selectedIdx + 1); setFirstMonthOfYear(month); fireChanges(); }
public void changeFirstMonth() { int selectedIdx = view.getSelectedFirstMonthIndex(); Month month = Month.getByIndex(selectedIdx + 1); setFirstMonthOfYear(month); fireChanges(); }
protected String formatDateFixed(DateIntervalType type, String date) { if (date == null) { return null; } int index = Integer.parseInt(date); if (DateIntervalType.DAY_OF_WEEK.equals(type)) { DayOfWeek dayOfWeek = DayOfWeek.getByIndex(index); return getFormatter().formatDayOfWeek(dayOfWeek); } if (DateIntervalType.MONTH.equals(type)) { Month month = Month.getByIndex(index); return getFormatter().formatMonth(month); } return date; }
protected String formatDateFixed(DateIntervalType type, String date) { if (date == null) { return null; } int index = Integer.parseInt(date); if (DateIntervalType.DAY_OF_WEEK.equals(type)) { DayOfWeek dayOfWeek = DayOfWeek.getByIndex(index); return getFormatter().formatDayOfWeek(dayOfWeek); } if (DateIntervalType.MONTH.equals(type)) { Month month = Month.getByIndex(index); return getFormatter().formatMonth(month); } return date; }
@Test public void monthIndex() { int expectedIndex = 1; for (Month month : Month.getAll()) { assertEquals(expectedIndex++, month.getIndex()); assertEquals(month, Month.getByIndex(month.getIndex())); } }
@Test public void monthIndex() { int expectedIndex = 1; for (Month month : Month.getAll()) { assertEquals(expectedIndex++, month.getIndex()); assertEquals(month, Month.getByIndex(month.getIndex())); } }