protected void sendVisitsQueryByLessonSelect(GroupLesson lesson) { for (GroupLesson gLesson : jC.getLessons(selectedGroup, selectedSemester)) { if (gLesson.equals(lesson)) { selectedLesson = gLesson; break; } } jC.sendGroupVisitsQuery(selectedLesson); }
protected void restoreLessonStudents() { if (jC.getVisits() != null) lessonsSelector.setLessonTitle(selectedLesson); if (!selectedGroup.isEmpty() && selectedLesson != null) { lessonsSelector.restoreState(jC.getLessons(selectedGroup, selectedSemester)); studentList.restoreState(jC.getStudents(selectedGroup)); } else { groupSelectorSeparateLine.setVisibility(View.INVISIBLE); } }
protected void handleVisitsQuery() { LightVisits lightVisits = jC.getVisits(); dateSlider.setData(lightVisits.getExercisesInfo()); tableWithMarks.createTable(lightVisits, jC.getStudents(selectedGroup)); studentList.setStudents(jC.getStudents(selectedGroup)); if (groupSelectorSeparateLine.getVisibility() == View.INVISIBLE) { groupSelectorSeparateLine.setVisibility(View.VISIBLE); } }
protected void sendVisitsQueryByGroupSelect(GroupLesson[] groupLessons) { lessonsSelector.setLessons(groupLessons); for (GroupLesson lesson : groupLessons) { if (lesson.equals(selectedLesson)) { jC.sendGroupVisitsQuery(lesson); return; } } if (groupLessons.length != 0) { selectedLesson = groupLessons[0]; jC.sendGroupVisitsQuery(selectedLesson); } lessonsSelector.setLessonTitle(selectedLesson); }
protected void handleGroupClick() { groupDialog.setOpenStatus(true); if (groupButton.isRefreshState()) { jC.resendLastQuery(); groupButton.disableRefreshState(); } else { groupDialog.show(getFragmentManager(), EMPTY); } }
protected void restoreTable(LightVisits lightVisits) { if (lightVisits != null && selectedLesson != null) { try { tableWithMarks.restoreState(lightVisits, jC.getStudents(selectedGroup)); dateSlider.restoreState(lightVisits.getExercisesInfo()); } catch (NullPointerException ex) { Logger.printError(ex, getClass()); } } }
public void setJournalCommunicator( Class<? extends JournalCommunicator> communicator, JournalActivity journalActivity) { if (jC == null) { try { jC = communicator.getConstructor(JournalActivity.class).newInstance(journalActivity); } catch (Exception e) { Logger.printError(e, getClass()); } } jC.setCallerLink(journalActivity); }
protected void handlingResult(int resultCode) { switch (resultCode) { case JournalCommunicator.GROUPS_LIST_QUERY: { groupDialog.setGroups(jC.getSortedGroups()); handleGroupClick(); } break; case JournalCommunicator.LIGHT_VISITS_QUERY: { handleVisitsQuery(); } break; } }
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { jC.setWorkingNow(false); super.onActivityResult(requestCode, resultCode, data); }