add modifier to some methods of Presenter

This commit is contained in:
hlq07 2018-05-11 17:15:31 +08:00
parent 9dd66c0dd5
commit 6cde72a562
1 changed files with 12 additions and 12 deletions

View File

@ -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<CalendarUnit> days);
protected abstract void paintCalendar(@NotNull Calendar date, @NotNull List<CalendarUnit> 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<TodoItem> items);
protected abstract void listTodoItems(List<TodoItem> items);
void listTodoItemDuring(Calendar from, Calendar to) {
protected final void listTodoItemDuring(Calendar from, Calendar to) {
listTodoItems(manager.queryTodoItemsDuring(from, to));
}