@@ -544,7 +544,7 @@ public static void loadForceRenameDialog(UiService uiService, PlayerFX playerFX)
544
544
* @param onAddBan if not null shows a ban button which triggers this consumer
545
545
* @param communicationService
546
546
*/
547
- public static void buildUserTableView (PlatformService platformService , TableView <PlayerFX > tableView , ObservableList <PlayerFX > data , Consumer <PlayerFX > onAddBan , Consumer <PlayerFX > onForceRename , FafApiCommunicationService communicationService ) {
547
+ public static void buildUserTableView (PlatformService platformService , TableView <PlayerFX > tableView , ObservableList <PlayerFX > data , Consumer <PlayerFX > onAddBan , Consumer <PlayerFX > onForceRename , boolean showUidData , FafApiCommunicationService communicationService ) {
548
548
tableView .setItems (data );
549
549
HashMap <TableColumn <PlayerFX , ?>, Function <PlayerFX , ?>> extractors = new HashMap <>();
550
550
@@ -626,95 +626,97 @@ protected void updateItem(PlayerFX item, boolean empty) {
626
626
tableView .getColumns ().add (banOptionColumn );
627
627
}
628
628
629
- TableColumn <PlayerFX , String > hashColumn = new TableColumn <>("Hash" );
630
- hashColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
631
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getHash )
632
- .collect (Collectors .joining ("\n " )),
633
- o .getValue ().getUniqueIds ()));
634
- hashColumn .setMinWidth (200 );
635
- tableView .getColumns ().add (hashColumn );
636
- extractors .put (hashColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getHash ).collect (Collectors .toList ()));
637
-
638
- TableColumn <PlayerFX , String > uuidColumn = new TableColumn <>("UUID" );
639
- uuidColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
640
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getUuid )
641
- .collect (Collectors .joining ("\n " )),
642
- o .getValue ().getUniqueIds ()));
643
- uuidColumn .setMinWidth (200 );
644
- tableView .getColumns ().add (uuidColumn );
645
- extractors .put (uuidColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getUuid ).collect (Collectors .toList ()));
646
-
647
- TableColumn <PlayerFX , String > memorySerialColumn = new TableColumn <>("Memory S/N" );
648
- memorySerialColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
649
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getMemorySerialNumber )
650
- .collect (Collectors .joining ("\n " )),
651
- o .getValue ().getUniqueIds ()));
652
- memorySerialColumn .setMinWidth (200 );
653
- tableView .getColumns ().add (memorySerialColumn );
654
- extractors .put (memorySerialColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getMemorySerialNumber ).collect (Collectors .toList ()));
655
-
656
- TableColumn <PlayerFX , String > deviceIdColumn = new TableColumn <>("Device ID" );
657
- deviceIdColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
658
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getDeviceId )
659
- .collect (Collectors .joining ("\n " )),
660
- o .getValue ().getUniqueIds ()));
661
- deviceIdColumn .setMinWidth (200 );
662
- tableView .getColumns ().add (deviceIdColumn );
663
- extractors .put (deviceIdColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getDeviceId ).collect (Collectors .toList ()));
664
-
665
- TableColumn <PlayerFX , String > manufacturerColumn = new TableColumn <>("Manufacturer" );
666
- manufacturerColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
667
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getManufacturer )
668
- .collect (Collectors .joining ("\n " )),
669
- o .getValue ().getUniqueIds ()));
670
- manufacturerColumn .setMinWidth (200 );
671
- tableView .getColumns ().add (manufacturerColumn );
672
- extractors .put (manufacturerColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getManufacturer ).collect (Collectors .toList ()));
673
-
674
- TableColumn <PlayerFX , String > cpuNameColumn = new TableColumn <>("Cpu Name" );
675
- cpuNameColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
676
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getName )
677
- .collect (Collectors .joining ("\n " )),
678
- o .getValue ().getUniqueIds ()));
679
- cpuNameColumn .setMinWidth (200 );
680
- tableView .getColumns ().add (cpuNameColumn );
681
- extractors .put (cpuNameColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getName ).collect (Collectors .toList ()));
682
-
683
- TableColumn <PlayerFX , String > processorIdColumn = new TableColumn <>("Processor Id" );
684
- processorIdColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
685
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getProcessorId )
686
- .collect (Collectors .joining ("\n " )),
687
- o .getValue ().getUniqueIds ()));
688
- processorIdColumn .setMinWidth (200 );
689
- tableView .getColumns ().add (processorIdColumn );
690
- extractors .put (processorIdColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getProcessorId ).collect (Collectors .toList ()));
691
-
692
- TableColumn <PlayerFX , String > biosVersionColumn = new TableColumn <>("BIOS Version" );
693
- biosVersionColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
694
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getSMBIOSBIOSVersion )
695
- .collect (Collectors .joining ("\n " )),
696
- o .getValue ().getUniqueIds ()));
697
- biosVersionColumn .setMinWidth (200 );
698
- tableView .getColumns ().add (biosVersionColumn );
699
- extractors .put (biosVersionColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getSMBIOSBIOSVersion ).collect (Collectors .toList ()));
700
-
701
- TableColumn <PlayerFX , String > serialColumn = new TableColumn <>("S/N" );
702
- serialColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
703
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getSerialNumber )
704
- .collect (Collectors .joining ("\n " )),
705
- o .getValue ().getUniqueIds ()));
706
- serialColumn .setMinWidth (200 );
707
- tableView .getColumns ().add (serialColumn );
708
- extractors .put (serialColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getSerialNumber ).collect (Collectors .toList ()));
709
-
710
- TableColumn <PlayerFX , String > volumeSerialNumber = new TableColumn <>("Volume S/N" );
711
- volumeSerialNumber .setCellValueFactory (o -> Bindings .createStringBinding (() ->
712
- o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getVolumeSerialNumber )
713
- .collect (Collectors .joining ("\n " )),
714
- o .getValue ().getUniqueIds ()));
715
- volumeSerialNumber .setMinWidth (200 );
716
- tableView .getColumns ().add (volumeSerialNumber );
717
- extractors .put (volumeSerialNumber , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getVolumeSerialNumber ).collect (Collectors .toList ()));
629
+ if (showUidData ) {
630
+ TableColumn <PlayerFX , String > hashColumn = new TableColumn <>("Hash" );
631
+ hashColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
632
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getHash )
633
+ .collect (Collectors .joining ("\n " )),
634
+ o .getValue ().getUniqueIds ()));
635
+ hashColumn .setMinWidth (200 );
636
+ tableView .getColumns ().add (hashColumn );
637
+ extractors .put (hashColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getHash ).collect (Collectors .toList ()));
638
+
639
+ TableColumn <PlayerFX , String > uuidColumn = new TableColumn <>("UUID" );
640
+ uuidColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
641
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getUuid )
642
+ .collect (Collectors .joining ("\n " )),
643
+ o .getValue ().getUniqueIds ()));
644
+ uuidColumn .setMinWidth (200 );
645
+ tableView .getColumns ().add (uuidColumn );
646
+ extractors .put (uuidColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getUuid ).collect (Collectors .toList ()));
647
+
648
+ TableColumn <PlayerFX , String > memorySerialColumn = new TableColumn <>("Memory S/N" );
649
+ memorySerialColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
650
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getMemorySerialNumber )
651
+ .collect (Collectors .joining ("\n " )),
652
+ o .getValue ().getUniqueIds ()));
653
+ memorySerialColumn .setMinWidth (200 );
654
+ tableView .getColumns ().add (memorySerialColumn );
655
+ extractors .put (memorySerialColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getMemorySerialNumber ).collect (Collectors .toList ()));
656
+
657
+ TableColumn <PlayerFX , String > deviceIdColumn = new TableColumn <>("Device ID" );
658
+ deviceIdColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
659
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getDeviceId )
660
+ .collect (Collectors .joining ("\n " )),
661
+ o .getValue ().getUniqueIds ()));
662
+ deviceIdColumn .setMinWidth (200 );
663
+ tableView .getColumns ().add (deviceIdColumn );
664
+ extractors .put (deviceIdColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getDeviceId ).collect (Collectors .toList ()));
665
+
666
+ TableColumn <PlayerFX , String > manufacturerColumn = new TableColumn <>("Manufacturer" );
667
+ manufacturerColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
668
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getManufacturer )
669
+ .collect (Collectors .joining ("\n " )),
670
+ o .getValue ().getUniqueIds ()));
671
+ manufacturerColumn .setMinWidth (200 );
672
+ tableView .getColumns ().add (manufacturerColumn );
673
+ extractors .put (manufacturerColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getManufacturer ).collect (Collectors .toList ()));
674
+
675
+ TableColumn <PlayerFX , String > cpuNameColumn = new TableColumn <>("Cpu Name" );
676
+ cpuNameColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
677
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getName )
678
+ .collect (Collectors .joining ("\n " )),
679
+ o .getValue ().getUniqueIds ()));
680
+ cpuNameColumn .setMinWidth (200 );
681
+ tableView .getColumns ().add (cpuNameColumn );
682
+ extractors .put (cpuNameColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getName ).collect (Collectors .toList ()));
683
+
684
+ TableColumn <PlayerFX , String > processorIdColumn = new TableColumn <>("Processor Id" );
685
+ processorIdColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
686
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getProcessorId )
687
+ .collect (Collectors .joining ("\n " )),
688
+ o .getValue ().getUniqueIds ()));
689
+ processorIdColumn .setMinWidth (200 );
690
+ tableView .getColumns ().add (processorIdColumn );
691
+ extractors .put (processorIdColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getProcessorId ).collect (Collectors .toList ()));
692
+
693
+ TableColumn <PlayerFX , String > biosVersionColumn = new TableColumn <>("BIOS Version" );
694
+ biosVersionColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
695
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getSMBIOSBIOSVersion )
696
+ .collect (Collectors .joining ("\n " )),
697
+ o .getValue ().getUniqueIds ()));
698
+ biosVersionColumn .setMinWidth (200 );
699
+ tableView .getColumns ().add (biosVersionColumn );
700
+ extractors .put (biosVersionColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getSMBIOSBIOSVersion ).collect (Collectors .toList ()));
701
+
702
+ TableColumn <PlayerFX , String > serialColumn = new TableColumn <>("S/N" );
703
+ serialColumn .setCellValueFactory (o -> Bindings .createStringBinding (() ->
704
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getSerialNumber )
705
+ .collect (Collectors .joining ("\n " )),
706
+ o .getValue ().getUniqueIds ()));
707
+ serialColumn .setMinWidth (200 );
708
+ tableView .getColumns ().add (serialColumn );
709
+ extractors .put (serialColumn , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getSerialNumber ).collect (Collectors .toList ()));
710
+
711
+ TableColumn <PlayerFX , String > volumeSerialNumber = new TableColumn <>("Volume S/N" );
712
+ volumeSerialNumber .setCellValueFactory (o -> Bindings .createStringBinding (() ->
713
+ o .getValue ().getUniqueIds ().stream ().map (UniqueIdFx ::getVolumeSerialNumber )
714
+ .collect (Collectors .joining ("\n " )),
715
+ o .getValue ().getUniqueIds ()));
716
+ volumeSerialNumber .setMinWidth (200 );
717
+ tableView .getColumns ().add (volumeSerialNumber );
718
+ extractors .put (volumeSerialNumber , playerFX -> playerFX .getUniqueIds ().stream ().map (UniqueIdFx ::getVolumeSerialNumber ).collect (Collectors .toList ()));
719
+ }
718
720
719
721
ContextMenu contextMenu = applyCopyContextMenus (tableView , extractors );
720
722
MenuItem steamLookupMenuItem = new MenuItem ("Lookup SteamID" );
0 commit comments