@Override
    public void run() {
      if (this.main.getShell().isDisposed()) {
        return;
      }
      // タブを更新する
      CTabItem maintab = this.main.getTabFolder().getItem(0);
      maintab.setToolTipText(
          "装備:"
              + GlobalContext.getItemMap().size()
              + "/"
              + GlobalContext.maxSlotitem()
              + " 艦娘:"
              + GlobalContext.getShipMap().size()
              + "/"
              + GlobalContext.maxChara());

      boolean combinedFleetBadlyDamaed = false;
      if (GlobalContext.isCombined()) {
        combinedFleetBadlyDamaed =
            GlobalContext.getDock("1").isBadlyDamaged()
                || GlobalContext.getDock("2").isBadlyDamaged();
      }

      List<ShipDto> badlyDamaged = new ArrayList<>();

      FleetWindow[] fleetWindows = this.main.getFleetWindows();
      for (int i = 0; i < fleetWindows.length; i++) {
        fleetWindows[i].updateFleet(combinedFleetBadlyDamaed, badlyDamaged);
      }

      this.postFatal(badlyDamaged);
    }
 @Override
 public void run() {
   if (this.main.getShell().isDisposed()) {
     return;
   }
   Button itemList = this.main.getItemList();
   String setText =
       "所有装備(" + GlobalContext.getItemMap().size() + "/" + GlobalContext.maxSlotitem() + ")";
   if (!setText.equals(itemList.getText())) {
     itemList.setText(setText);
     itemList.getParent().layout();
   }
 }
예제 #3
0
 public void updateContents(ShipFilterDto filter, boolean panelVisible, boolean etcVisible) {
   this.changeEnabled = false;
   Set<String> items = new TreeSet<String>();
   for (ItemDto entry : GlobalContext.getItemMap().values()) {
     items.add(entry.getName());
   }
   this.nametext.remove(0, this.nametext.getItemCount() - 1);
   for (String name : items) {
     this.nametext.add(name);
   }
   this.recreateGroupButtons();
   this.recreateShipTypeButtonos();
   this.applyFilter(filter);
   this.setPanelVisible(panelVisible, etcVisible);
   this.changeEnabled = true;
 }