|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.swing.SearchableUtils
public class SearchableUtils
Utility class to make component searchable. It's very easy to use this class. In order to make a component, all you
need to do is to call
The component could be a JList, JTree or JTable. If you need to further customize some attributes of Searchable, you
can assign a variable that returns from installSearchable().
SearchableUtils.installSearchable(component);
Usually you don't need to uninstall the searchable from the component. But if for some reason, you need to disable
the searchable feature of the component, you can call uninstallSearchable().
Searchable searchable = SearchableUtils.installSearchable(component);
// further configure it
searchable.setCaseSensitive(true);
// ...
Searchable searchable = SearchableUtils.installSearchable(component);
// ...
// Now disable it
SearchableUtils.uninstallSearchable(searchable);
JTree tree = new JTree(...) {
public TreePath getNextMatch(String prefix, int startingRow, Position.Bias bias) {
return null;
}
};
JList list = new JList(...){
public int getNextMatch(String prefix, int startIndex, Position.Bias bias) {
return -1;
}
};
Constructor Summary | |
---|---|
SearchableUtils()
|
Method Summary | |
---|---|
static ComboBoxSearchable |
installSearchable(JComboBox combobox)
Installs the searchable function onto a JComboBox. |
static ListSearchable |
installSearchable(JList list)
Installs the searchable function onto a JList. |
static TableSearchable |
installSearchable(JTable table)
Installs the searchable function onto a JTable. |
static TextComponentSearchable |
installSearchable(JTextComponent textComponent)
Installs the searchable function onto a JTextComponent. |
static TreeSearchable |
installSearchable(JTree tree)
Installs the searchable function onto a JTree. |
static void |
uninstallSearchable(Searchable searchable)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchableUtils()
Method Detail |
---|
public static TreeSearchable installSearchable(JTree tree)
tree
- the JTree to install searchable
public static TableSearchable installSearchable(JTable table)
table
- the JTable to install searchable
public static ListSearchable installSearchable(JList list)
list
- the JList to install searchable
public static ComboBoxSearchable installSearchable(JComboBox combobox)
combobox
- the combo box to install searchable
public static TextComponentSearchable installSearchable(JTextComponent textComponent)
textComponent
- the text component to install searchable
public static void uninstallSearchable(Searchable searchable)
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |