Exemplo n.º 1
0
  private void rebuildUsagesTable() {
    usagesTable.clear();
    usagesTable.left();
    usagesTable.defaults().left();

    for (FileItem item : items) {

      FileHandle file = item.getFile();
      boolean canAnalyze = usageAnalyzer.canAnalyzeUsages(file);

      if (canAnalyze == false) {
        usagesTable.add(new VisLabel("Can't analyze usages for: '" + file.name() + "'"));
        usagesTable.row();
      } else {
        AssetsUsages usages = usageAnalyzer.analyzeUsages(file);
        usagesTable.add(new VisLabel(usages.toPrettyString()));

        if (usages.count() > 0) {
          VisTextButton viewUsages = new VisTextButton("View " + usages.file.name() + " Usages");
          usagesTable.add(viewUsages);

          viewUsages.addListener(
              new VisChangeListener((event, actor) -> openSpecificUsagesTab(usages)));
        }

        usagesTable.row();
      }
    }
  }
Exemplo n.º 2
0
 public UIItemsTreeBox() {
   super("Items Tree", 166);
   setMovable(false);
   facade = Overlap2DFacade.getInstance();
   treeTable = new VisTable();
   treeTable.left();
   createCollapsibleWidget(treeTable);
 }