本文整理汇总了Java中ca.odell.glazedlists.TextFilterator类的典型用法代码示例。如果您正苦于以下问题:Java TextFilterator类的具体用法?Java TextFilterator怎么用?Java TextFilterator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TextFilterator类属于ca.odell.glazedlists包,在下文中一共展示了TextFilterator类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFilterator
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected TextFilterator<String> getFilterator() {
return new TextFilterator<String>() {
@Override
public void getFilterStrings(List<String> baseList, String element) {
baseList.add(element);
}
};
}
示例2: getFilterator
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected TextFilterator<View> getFilterator() {
return new Filterator();
}
示例3: getFilterator
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected TextFilterator<MyLocation> getFilterator() {
return new Filterator();
}
示例4: getFilterator
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected TextFilterator<String> getFilterator() {
return new Filterator();
}
示例5: getFilterator
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected TextFilterator<SolarSystem> getFilterator() {
return new Filterator();
}
示例6: RegexFilterMatcher
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
public RegexFilterMatcher(Pattern pattern, TextFilterator filtrator) {
super();
this.pattern = pattern;
this.filtrator = filtrator;
}
示例7: getEditableUI
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected Object getEditableUI() {
if (panel == null) {
if (!required) {
entries.add(NONE);
}
// get our list of entries
String type = property.getWidgetProperties().get("schemeType");
for (Scheme s : schemes.getSchemes()) {
if ((type == null) || type.equalsIgnoreCase(s.getType())) {
entries.addAll(s.getEntries());
}
}
// sort alphabetically
Collections.sort(entries, new Comparator<SchemeEntry>() {
public int compare(final SchemeEntry o1, final SchemeEntry o2) {
return o1.getName().compareTo(o2.getName());
}
});
// build our icon label
icon = new JLabel();
// build our combobox with auto complete support
combo = new JComboBox(entries.toArray());
TextFilterator<SchemeEntry> filterator = GlazedLists.textFilterator(new String[] { "name", "code" });
AutoCompleteSupport<SchemeEntry> autocomplete = AutoCompleteSupport.install(combo, GlazedLists
.eventList(entries), filterator, new EntryFormat());
autocomplete.setStrict(true);
SchemeEntry e = getEntry(property.getValue());
if (e == null && required) {
e = entries.get(0);
}
if (e == null) {
combo.setSelectedItem(NONE);
icon.setIcon(null);
} else {
combo.setSelectedItem(e);
icon.setIcon(e.getIcon());
}
combo.setRenderer(new EntryRenderer());
combo.addActionListener(this);
combo.setBorder(BorderFactory.createEmptyBorder());
panel = new JPanel(new BorderLayout());
panel.add(icon, BorderLayout.WEST);
panel.add(combo, BorderLayout.CENTER);
}
return panel;
}
示例8: setFilterator
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
public void setFilterator(TextFilterator filterator) {
this.filterator = filterator;
}
示例9: createContactTable
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
public ContactTable createContactTable()
{
ContactTable contactTable = new ContactTable(contactDataStore);
// Get the table instance from our factory
// Make a double click invoke the properties dialog and plugin the
// context menu
contactTable.setDoubleClickHandler(propertiesExecutor);
// Construct and install our filtering list. This filter will allow the user
// to simply type data into the txtFilter (JTextField). With the configuration
// setup below, the text entered by the user will be matched against the values
// in the lastName and address.address1 properties of the contacts in the table.
// The GlazedLists filtered lists is used to accomplish this.
EventList baseList = contactTable.getBaseEventList();
TextFilterator filterator = GlazedLists.textFilterator(new String[]{"lastName", "address.address1"});
FilterList filterList = new FilterList(baseList, new TextComponentMatcherEditor(filterField, filterator));
// Install the fully constructed (layered) list into the table
contactTable.setFinalEventList(filterList);
// Install the popup menu
CommandGroup popup = new CommandGroup();
popup.add((ActionCommand) getWindowCommandManager().getCommand("deleteCommand", ActionCommand.class));
popup.addSeparator();
popup.add((ActionCommand) getWindowCommandManager().getCommand("propertiesCommand", ActionCommand.class));
contactTable.setPopupCommandGroup(popup);
// Register to get notified when the filtered list changes
contactTable.setStatusBar(getStatusBar());
// Ensure our commands are only active when something is selected.
// These guard objects operate by inspecting a list selection model
// (held within a ValueModel) and then either enabling or disabling the
// guarded object (our executors) based on the configured criteria.
// This configuration greatly simplifies the interaction between commands
// that require a selection on which to operate.
ValueModel selectionHolder = new ListSelectionValueModelAdapter(contactTable.getSelectionModel());
new ListSingleSelectionGuard(selectionHolder, deleteExecutor);
new ListSingleSelectionGuard(selectionHolder, propertiesExecutor);
return contactTable;
}
示例10: QuickFilterMatcher
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
/**
* Creates a new QuickFilterMatcher
* @param filterValues the filter values
* @param filterator the filterator
*/
public QuickFilterMatcher(String[] filterValues, TextFilterator filterator) {
super(filterValues, filterator);
}
示例11: getFilterator
import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
protected abstract TextFilterator<T> getFilterator();