1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-24 12:16:28 +01:00

[Creator] Make tables searchable.

This commit is contained in:
sk89q 2015-07-26 20:35:11 -07:00
parent 8c9c50ed46
commit bcb05cb671
3 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,7 @@ targetCompatibility = 1.8
dependencies {
compile project(':launcher-builder')
compile 'org.eclipse.jetty:jetty-server:9.3.1.v20150714'
compile 'com.jidesoft:jide-oss:3.6.10'
}
processResources {

View File

@ -6,6 +6,8 @@
package com.skcraft.launcher.creator.dialog;
import com.jidesoft.swing.SearchableUtils;
import com.jidesoft.swing.TableSearchable;
import com.skcraft.launcher.creator.Creator;
import com.skcraft.launcher.creator.model.swing.ListingType;
import com.skcraft.launcher.creator.model.swing.ListingTypeComboBoxModel;
@ -72,6 +74,9 @@ public class GenerateListingDialog extends JDialog {
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);
}
}

View File

@ -6,6 +6,8 @@
package com.skcraft.launcher.creator.dialog;
import com.jidesoft.swing.SearchableUtils;
import com.jidesoft.swing.TableSearchable;
import com.skcraft.launcher.creator.Creator;
import com.skcraft.launcher.swing.DefaultTable;
import com.skcraft.launcher.swing.SwingHelper;
@ -82,6 +84,9 @@ public class PackManagerFrame extends JFrame {
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);
}