public static String getEventTypeFromImportType(String importType) { for (CalendarEventType et: CalendarEventType.values()) { if (et.getImportType().equals(importType)) { return et.getType(); } } return null; } }
public static Map<String, String> getLocalizedLegends() { Map<String, String> localizedLegends = new HashMap<>(); for (CalendarEventType et: CalendarEventType.values()) { localizedLegends.put(et.getType(), et.getLocalizedLegend()); } return localizedLegends; }
public static Map<String, String> getIcons() { Map<String, String> icons = new HashMap<>(); for (CalendarEventType et: CalendarEventType.values()) { icons.put(rb.getString(et.getLocalizedLegend()).trim(), et.getIcon()); } return icons; }
public static Map<String, String> getLocalizedLegends() { Map<String, String> localizedLegends = new HashMap<>(); for (CalendarEventType et: CalendarEventType.values()) { localizedLegends.put(rb.getString((et.getLocalizedLegend())).trim(), et.getLocalizedLegend()); } return localizedLegends; }
public static String getLocalizedLegendFromEventType(String eventType) { return getLocalizedLegends().get(eventType); }
public String getLocalizedEventType(String eventType) { return rb.getString(CalendarEventType.getLocalizedLegendFromEventType(eventType)); } } // CalendarUtil
public Map<String, String> getLocalizedEventTypesAndIcons() { Map<String, String> icons = CalendarEventType.getIcons(); Map<String, String> localizedEventTypesAndIcons = new TreeMap<>(); for (String eventType: icons.keySet()) { // Localized event types put first so that they can be sorted in the code below. localizedEventTypesAndIcons.put(getLocalizedEventType(eventType), icons.get(eventType)); } return localizedEventTypesAndIcons; }
public static String getLocalizedLegendFromEventType(String eventType) { return getLocalizedLegends().get(eventType); }
public String getLocalizedEventType(String eventType) { return rb.getString(CalendarEventType.getLocalizedLegendFromEventType(eventType)); } } // CalendarUtil
public Map<String, String> getLocalizedEventTypesAndIcons() { Map<String, String> icons = CalendarEventType.getIcons(); Map<String, String> localizedEventTypesAndIcons = new TreeMap<>(); for (String eventType: icons.keySet()) { // Localized event types put first so that they can be sorted in the code below. localizedEventTypesAndIcons.put(getLocalizedEventType(eventType), icons.get(eventType)); } return localizedEventTypesAndIcons; }
public static String getEventTypeFromImportType(String importType) { for (CalendarEventType et: CalendarEventType.values()) { if (et.getImportType().equals(importType)) { return et.getType(); } } return ACTIVITY.getType(); } }
public Map<String, String> getLocalizedEventTypes() { Map<String, String> eventLegends = CalendarEventType.getLocalizedLegends(); Set<Map.Entry<String, String>> set = eventLegends.entrySet(); Map<String, String> localizedEventTypes = new HashMap<>(); for (Map.Entry<String, String> me : set){ localizedEventTypes.put(me.getKey(), rb.getString(me.getValue())); } Map sortedLocalizedEventTypes = sortByValue(localizedEventTypes); return sortedLocalizedEventTypes; }
public Map<String, String> getLocalizedEventTypes() { Map<String, String> eventLegends = CalendarEventType.getLocalizedLegends(); Set<Map.Entry<String, String>> set = eventLegends.entrySet(); Map<String, String> localizedEventTypes = new HashMap<>(); for (Map.Entry<String, String> me : set){ localizedEventTypes.put(me.getKey(), rb.getString(me.getValue())); } Map sortedLocalizedEventTypes = sortByValue(localizedEventTypes); return sortedLocalizedEventTypes; }