private void initComponents() { manifestsTableAdjuster.adjustColumns(); manifestsTableAdjuster.setDynamicAdjustment(true); manifestsTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); manifestsTable.setAutoCreateRowSorter(true); JPanel container = new JPanel(); container.setLayout(new MigLayout("insets dialog, fill", "[grow 0][grow 100]")); container.add(new JLabel("Output Directory:")); container.add(destDirField, "span"); container.add(new JLabel("Package Listing Type:")); container.add(listingTypeCombo, "span"); container.add(gameKeyWarning, "span, skip 1, hidemode 3"); container.add(new JLabel("Modpacks to Include:"), "span, gaptop unrel"); container.add(SwingHelper.wrapScrollPane(manifestsTable), "grow, pushy, span, w 500:650, h 170"); container.add(editManifestButton, "gapbottom unrel, span, split 2"); container.add(new JLabel("<html>Previously-selected modpacks and those in the _upload directory are the available options."), "gapbottom unrel"); container.add(generateButton, "tag ok, span, split 2, sizegroup bttn"); container.add(cancelButton, "tag cancel, sizegroup bttn"); add(container, BorderLayout.CENTER); getRootPane().setDefaultButton(generateButton); getRootPane().registerKeyboardAction(e -> cancelButton.doClick(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); TableSearchable tableSearchable = SearchableUtils.installSearchable(manifestsTable); tableSearchable.setMainIndex(-1); }
public static void installSearchable(JTable table) { table.setPreferredScrollableViewportSize(new Dimension(200, 24)); table.setColumnSelectionAllowed(false); table.setRowSelectionAllowed(true); TableSearchable tSearchable = SearchableUtils.installSearchable(table); setSearchableParams(tSearchable); tSearchable.setMainIndex(-1); // search for all columns //installTitledPanel("Search: ", 'T', table); }
private void initComponents() { updateTableAdjuster.adjustColumns(); updateTableAdjuster.setDynamicAdjustment(true); unknownTableAdjuster.adjustColumns(); unknownTableAdjuster.setDynamicAdjustment(true); knownModsTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); knownModsTable.setAutoCreateRowSorter(true); unknownModsTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); unknownModsTable.setAutoCreateRowSorter(true); JPanel container = new JPanel(); container.setLayout(new MigLayout("insets dialog, fill")); container.add(new JLabel("With Potential Updates:"), "span"); container.add(SwingHelper.wrapScrollPane(knownModsTable), "grow, pushy, span, w 500:900, h 230"); container.add(new JLabel("Unknown Status:"), "span"); container.add(SwingHelper.wrapScrollPane(unknownModsTable), "grow, pushy, span, w 500:900, h 150, gapbottom unrel, wrap"); container.add(new JLabel("Version data is sourced from NotEnoughMods.com."), ""); container.add(closeButton, "tag cancel, sizegroup bttn"); add(container, BorderLayout.CENTER); getRootPane().registerKeyboardAction(e -> closeButton.doClick(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); TableSearchable tableSearchable; tableSearchable = SearchableUtils.installSearchable(knownModsTable); tableSearchable.setMainIndex(-1); tableSearchable = SearchableUtils.installSearchable(unknownModsTable); tableSearchable.setMainIndex(-1); }
private void initComponents() { TableColumnAdjuster adjuster = new TableColumnAdjuster(packTable); adjuster.adjustColumns(); adjuster.setDynamicAdjustment(true); packTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); packTable.setAutoCreateRowSorter(true); JPanel container = new JPanel(); container.setLayout(new MigLayout("fill, wrap 1")); container.add(createToolbar(), "dock north"); container.add(SwingHelper.wrapScrollPane(packTable), "grow, span, w null:800:null"); TableSearchable tableSearchable = SearchableUtils.installSearchable(packTable); tableSearchable.setMainIndex(-1); add(container, BorderLayout.CENTER); }
tableSearchable.setMainIndex(-1);
searchable.setMainIndex(0); // only search for name column
searchable.setMainIndex(0); // only search for name column
searchable.setMainIndex(0); // only search for name column
table.setRowSelectionAllowed(true); TableSearchable tableSearchable = SearchableUtils.installSearchable(table); tableSearchable.setMainIndex(-1); // search for all columns
searchable.setMainIndex(0); // only search for name column