public void loadOverlays(List<MantleXulOverlay> overlays) { for (MantleXulOverlay overlay : overlays) { overlayMap.put(overlay.getId(), overlay); if (overlay.getId().startsWith("startup")) { AsyncXulLoader.loadOverlayFromSource( overlay.getSource(), overlay.getResourceBundleUri(), container, this); } } }
public void removeOverlay(String id) { if (overlayMap != null && !overlayMap.isEmpty()) { if (overlayMap.containsKey(id)) { MantleXulOverlay overlay = overlayMap.get(id); AsyncXulLoader.removeOverlayFromSource( overlay.getOverlayXml(), overlay.getResourceBundleUri(), container, this); } else { // Should I log this or throw an exception here } } }