コード例 #1
0
 protected void sendVisitsQueryByLessonSelect(GroupLesson lesson) {
   for (GroupLesson gLesson : jC.getLessons(selectedGroup, selectedSemester)) {
     if (gLesson.equals(lesson)) {
       selectedLesson = gLesson;
       break;
     }
   }
   jC.sendGroupVisitsQuery(selectedLesson);
 }
コード例 #2
0
 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);
   }
 }
コード例 #3
0
 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);
   }
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 protected void handleGroupClick() {
   groupDialog.setOpenStatus(true);
   if (groupButton.isRefreshState()) {
     jC.resendLastQuery();
     groupButton.disableRefreshState();
   } else {
     groupDialog.show(getFragmentManager(), EMPTY);
   }
 }
コード例 #6
0
 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());
     }
   }
 }
コード例 #7
0
 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);
 }
コード例 #8
0
 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;
   }
 }
コード例 #9
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   jC.setWorkingNow(false);
   super.onActivityResult(requestCode, resultCode, data);
 }