MCPcopy Create free account
hub / github.com/FabricMC/Matcher / FieldInfoTab

Class FieldInfoTab

src/main/java/matcher/gui/tab/FieldInfoTab.java:25–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23import matcher.type.FieldInstance;
24
25public class FieldInfoTab extends Tab implements IGuiComponent {
26 public FieldInfoTab(Gui gui, ISelectionProvider selectionProvider, boolean unmatchedTmp) {
27 super("field info");
28
29 this.gui = gui;
30 this.selectionProvider = selectionProvider;
31 this.unmatchedTmp = unmatchedTmp;
32
33 for (int i = 0; i < NameType.AUX_COUNT; i++) {
34 auxNameLabels[i] = new Label();
35 }
36
37 init();
38 }
39
40 private void init() {
41 GridPane grid = new GridPane();
42 grid.setPadding(new Insets(GuiConstants.padding));
43 grid.setHgap(GuiConstants.padding);
44 grid.setVgap(GuiConstants.padding);
45 int row = 0;
46
47 row = addRow("Owner", ownerLabel, grid, row);
48 row = addRow("Name", nameLabel, grid, row);
49 row = addRow("Tmp name", tmpNameLabel, grid, row);
50 row = addRow("Mapped name", mappedNameLabel, grid, row);
51
52 for (int i = 0; i < NameType.AUX_COUNT; i++) {
53 row = addRow("AUX name "+(i+1), auxNameLabels[i], grid, row);
54 }
55
56 row = addRow("UID", uidLabel, grid, row);
57 row = addRow("Name obf.", nameObfLabel, grid, row);
58 row = addRow("Inputs", inputLabel, grid, row);
59 row = addRow("Type", typeLabel, grid, row);
60 row = addRow("Access", accessLabel, grid, row);
61 row = addRow("Signature", sigLabel, grid, row);
62 row = addRow("Parents", parentLabel, grid, row);
63 row = addRow("Children", childLabel, grid, row);
64 row = addRow("Read refs", readRefLabel, grid, row);
65 row = addRow("Write refs", writeRefLabel, grid, row);
66 row = addRow("Comment", mapCommentLabel, grid, row);
67
68 ScrollPane scroll = new ScrollPane(grid);
69 setContent(scroll);
70 }
71
72 private static int addRow(String name, Node content, GridPane grid, int row) {
73 Label label = new Label(name+":");
74 label.setMinWidth(Label.USE_PREF_SIZE);
75 grid.add(label, 0, row);
76 GridPane.setValignment(label, VPos.TOP);
77
78 grid.add(content, 1, row);
79
80 return row + 1;
81 }
82

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected