private ArchivePanel getArchivePanel(Device device) { ArchivePanel panel = archivePanels.get(device.getId()); if (panel == null) { panel = new ArchivePanel(archiveHandler); archivePanels.put(device.getId(), panel); devicesTabs.add(panel.getContentPanel(), new TabItemConfig(device.getName(), true)); } return panel; }
@Override public void onUpdate(StoreUpdateEvent<Device> event) { super.onUpdate(event); if (event.getItems() != null) { for (Device device : event.getItems()) { ArchivePanel panel = archivePanels.get(device.getId()); if (panel != null) { TabItemConfig config = devicesTabs.getConfig(panel.getContentPanel()); config.setText(device.getName()); devicesTabs.update(panel.getContentPanel(), config); } } } }