当前位置: 首页>>代码示例>>Java>>正文


Java TextFilterator类代码示例

本文整理汇总了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);
		}
	};
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:10,代码来源:JRouteSaveDialog.java

示例2: getFilterator

import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected TextFilterator<View> getFilterator() {
	return new Filterator();
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:ViewSave.java

示例3: getFilterator

import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected TextFilterator<MyLocation> getFilterator() {
	return new Filterator();
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JSystemDialog.java

示例4: getFilterator

import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected TextFilterator<String> getFilterator() {
	return new Filterator();
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JSaveAvoidDialog.java

示例5: getFilterator

import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
@Override
protected TextFilterator<SolarSystem> getFilterator() {
	return new Filterator();
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JSystemDialog.java

示例6: RegexFilterMatcher

import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
public RegexFilterMatcher(Pattern pattern, TextFilterator filtrator) {
	super();
	this.pattern = pattern;
	this.filtrator = filtrator;
}
 
开发者ID:mongkoy,项目名称:c-logger,代码行数:6,代码来源:RegexFilterMatcher.java

示例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;
}
 
开发者ID:laccore,项目名称:coretools,代码行数:52,代码来源:SchemeEntryWidget.java

示例8: setFilterator

import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
public void setFilterator(TextFilterator filterator) {
    this.filterator = filterator;
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:4,代码来源:FilterListSelectionDialog.java

示例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;
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:44,代码来源:ContactView.java

示例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);
}
 
开发者ID:mongkoy,项目名称:c-logger,代码行数:9,代码来源:QuickFilterMatcher.java

示例11: getFilterator

import ca.odell.glazedlists.TextFilterator; //导入依赖的package包/类
protected abstract TextFilterator<T> getFilterator(); 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:2,代码来源:JAutoCompleteDialog.java


注:本文中的ca.odell.glazedlists.TextFilterator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。