public SearchDialog(WindowCompartment windowCompartment) { super(windowCompartment, 252, 192); this.windowCompartment = windowCompartment; final ControlScrollableContent<IWidget> scroll = new SearchScrollContent(this); this.slotGrid = new Control(scroll, 1, 1, 108, 18); scroll.setScrollableContent(this.slotGrid); new ControlPlayerInventory(this, true); new ControlTextEdit(this, 16, 16, 100, 14).addEventHandler(EventTextEdit.class, event -> { textSearch = event.getValue(); updateSearch(); }); this.includeItems = true; this.includeBlocks = true; new SortAlphabeticalCheckbox(this); new IncludeItemsCheckbox(this); new IncludeBlocksCheckbox(this); this.updateSearch(); }
setupValidators(); tabBar = new Control(this, x, 28, getWidth() - 16 - x, 20); analystPanel = new AnalystPanel(this); if (!isDatabase) {
new ControlText(this, new Area(0, 4, w, 16), this.getValue().toString(), TextJustification.MIDDLE_CENTER); final ControlScrollableContent scrollable = new ControlScrollableContent(this, 4, 20, w - 8, h - 8 - 16, 12); final Control contents = new Control(scrollable, 0, 0, w - 8 - 12, h - 8 - 16); final int tw = w - 8 - 12; final int w2 = 65;
final int compartmentWidth = compartmentPageWidth + (doubleTabbed ? 48 : 24); final int compartmentHeight = compartmentPageHeight; final Control controlCompartment = new Control(this, x, y, compartmentWidth, compartmentHeight); final ControlTabBar<Integer> tab = new ControlTabBar<>(controlCompartment, 0, 0, 24, compartmentPageHeight, Alignment.LEFT, Arrays.asList(tabs1), (x1, y1, w, h, value) -> { return new CompartmentTabIcon(this, x1, y1, w, h, value);
new ControlText(this, new Area(0, 4, w, 16), I18N.localise(DatabaseConstants.BOTANY_GENOME_KEY + ".title"), TextJustification.MIDDLE_CENTER); ControlScrollableContent scrollable = new ControlScrollableContent(this, 4, 20, w - 8, h - 8 - 16, 12); Control contents = new Control(scrollable, 0, 0, w - 8 - 12, h - 8 - 16); int tw = w - 8 - 12; int w2 = 55;