Example #1
0
 /**
  * Accessor for config
  *
  * @return ArrayList of strings
  */
 public ArrayList<String> getConfig() {
   File f = new File(calendar_config);
   // if config file exists
   if (f.exists()) {
     return IO.getConfig(calendar_config);
   } else {
     return null;
   }
 }
Example #2
0
 /**
  * Saves configuration to the calendar_config file
  *
  * @param c a list of Strings
  */
 public void updateConfig(ArrayList<String> c) {
   config = c;
   IO.saveConfig(config, calendar_config);
 }
Example #3
0
 /**
  * Exports calendar to a specific file
  *
  * @param filename a name of a file
  */
 public void exportCalendar(String filename) {
   IO.saveAppointments(appointments, filename);
   modified = false;
 }
Example #4
0
 /**
  * Imports calendar from specified location
  *
  * @param filename the full path of filename
  */
 public ArrayList<Appointment> importCalendar(String filename) {
   appointments = (ArrayList<Appointment>) IO.getAppointments(filename);
   return appointments;
 }