Exemplo n.º 1
0
 @UiHandler("devicesTabs")
 public void onDeviceTabClosed(CloseEvent<Widget> event) {
   for (Map.Entry<Long, ArchivePanel> entry : archivePanels.entrySet()) {
     if (entry.getValue().getContentPanel().equals(event.getItem())) {
       Device device = deviceStore.findModelWithKey(entry.getKey().toString());
       archiveHandler.onClear(device);
       archivePanels.remove(entry.getKey());
       break;
     }
   }
 }
Exemplo n.º 2
0
 @UiHandler("clearButton")
 public void onClearClicked(SelectEvent event) {
   for (Map.Entry<Long, ArchivePanel> entry : archivePanels.entrySet()) {
     Device device = deviceStore.findModelWithKey(entry.getKey().toString());
     archiveHandler.onClear(device);
     devicesTabs.remove(entry.getValue().getContentPanel());
   }
   archivePanels.clear();
 }