diff --git a/app/src/main/java/org/cutem/cutecalendar/presenter/Presenter.java b/app/src/main/java/org/cutem/cutecalendar/presenter/Presenter.java index cae56b5..69ea543 100644 --- a/app/src/main/java/org/cutem/cutecalendar/presenter/Presenter.java +++ b/app/src/main/java/org/cutem/cutecalendar/presenter/Presenter.java @@ -13,28 +13,28 @@ public abstract class Presenter { private TodoItemManager manager = TodoItemManager.getInstance(); - abstract Calendar getCalendarShowingDate(); + + protected abstract Calendar getCalendarShowingDate(); + + protected abstract void showTodoItemDetail(TodoItem item); + + protected abstract void showNewTodoItemStage(); - abstract void showTodoItemDetail(TodoItem item); - - abstract void showNewTodoItemStage(); - - - void addTodoItem(@NotNull TodoItem item) { + protected final void addTodoItem(@NotNull TodoItem item) { manager.add(item); paintCalendar(getCalendarShowingDate()); } - void removeTodoItem(@NotNull TodoItem item) { + protected final void removeTodoItem(@NotNull TodoItem item) { manager.remove(item); paintCalendar(getCalendarShowingDate()); } - abstract void paintCalendar(@NotNull Calendar date, @NotNull List days); + protected abstract void paintCalendar(@NotNull Calendar date, @NotNull List days); - void paintCalendar(@NotNull Calendar date) { + protected final void paintCalendar(@NotNull Calendar date) { Calendar c1 = CalendarUtil.getMonthBegin(date); Calendar c2 = CalendarUtil.getMonthEnd(date); Calendar today = Calendar.getInstance(); @@ -57,9 +57,9 @@ public abstract class Presenter { paintCalendar(date, days); } - abstract void listTodoItems(List items); + protected abstract void listTodoItems(List items); - void listTodoItemDuring(Calendar from, Calendar to) { + protected final void listTodoItemDuring(Calendar from, Calendar to) { listTodoItems(manager.queryTodoItemsDuring(from, to)); }