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); }
/** * Creates a Searchable. * * @param component component where the Searchable will be installed. */ public Searchable(JComponent component) { Searchable searchable = getSearchable(component); if (searchable != null) { SearchableUtils.uninstallSearchable(searchable); } _previousSearchText = null; _component = component; _selection = new HashSet<Integer>(); installListeners(); updateClientProperty(_component, this); }
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); }
/** * Creates a Searchable. * * @param component component where the Searchable will be installed. * @param searchableProvider the Searchable Provider. */ public Searchable(JComponent component, SearchableProvider searchableProvider) { Searchable searchable = getSearchable(component); if (searchable != null) { SearchableUtils.uninstallSearchable(searchable); } _searchableProvider = searchableProvider; _previousSearchText = null; _component = component; _selection = new HashSet<Integer>(); installListeners(); updateClientProperty(_component, this); }
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); }
final TreeSearchable treeSearchable = SearchableUtils.installSearchable(tree); SearchableUtils.installSearchable(list); SearchableUtils.installSearchable(comboBox); table.setColumnSelectionAllowed(false); table.setRowSelectionAllowed(true); TableSearchable tableSearchable = SearchableUtils.installSearchable(table); tableSearchable.setMainIndex(-1); // search for all columns SearchableUtils.installSearchable(textArea);
TableSearchable tableSearchable = SearchableUtils.installSearchable(featuresTable); tableSearchable.setMainIndex(-1);
SearchableUtils.installSearchable(this); getDocument().addUndoableEditListener(new UndoListener());
SearchableUtils.installSearchable(filterableList);
final TreeSearchable searchable = SearchableUtils.installSearchable(tree); AutoCompletion autoCompletion = new AutoCompletion(treeTextField, searchable); setSearchableParams(searchable);
SearchableUtils.installSearchable(filterableList);
SearchableUtils.installSearchable(datumComboBox); datumComboBox.setRenderer(new IdentifiedObjectCellRenderer()); final ComboBoxSearchable datumSearchable = new IdentifiedObjectSearchable(datumComboBox);
public static AutoCompletion installSearchable(final JComboBox combo) { boolean wasEditable = combo.isEditable(); combo.setEditable(false); ComboBoxSearchable searchable = SearchableUtils.installSearchable(combo); searchable.setCaseSensitive(false); searchable.setWildcardEnabled(true); searchable.setCountMatch(true); searchable.setShowPopupDuringSearching(true); searchable.setRefreshPopupDuringSearching(true); AutoCompletion autoCompletion = new AutoCompletion(combo, searchable) { @Override protected AutoCompletionDocument createDocument() { return super.createDocument(); } }; autoCompletion.setStrict(false); autoCompletion.setStrictCompletion(false); autoCompletion.installListeners(); combo.setEditable(wasEditable); return autoCompletion; }
SearchableUtils.installSearchable(datumComboBox); datumComboBox.setRenderer(new IdentifiedObjectCellRenderer()); final ComboBoxSearchable datumSearchable = new IdentifiedObjectSearchable(datumComboBox);
SearchableUtils.installSearchable(_list);
SearchableUtils.installSearchable(filterableList);
SearchableUtils.installSearchable(maskNameList);