Ejemplo n.º 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;
   }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }