• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ListEventListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中ca.odell.glazedlists.event.ListEventListener的典型用法代码示例。如果您正苦于以下问题:Java ListEventListener类的具体用法?Java ListEventListener怎么用?Java ListEventListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ListEventListener类属于ca.odell.glazedlists.event包,在下文中一共展示了ListEventListener类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: VizListComponent

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
/**
 * A protected constructor inherited from TransformedList.
 * 
 * @param source
 *            The source list used by the TransformedList.
 */
protected VizListComponent(EventList<T> source) {
	super(source);

	// Create the logger
	logger = LoggerFactory.getLogger(getClass());

	// Store the source list locally too so that JAXB gets it
	jaxbSourceList = (BasicEventList<T>) source;
	// Set it all up
	idList = new BasicEventList<String>();
	idList.add("1");
	idList.add("ICE Object");
	idList.add("ICE Object");
	// Setup the listener map
	listenerMap = new HashMap<IVizUpdateableListener, ListEventListener<Object>>();
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:23,代码来源:VizListComponent.java


示例2: setAdditionalListeners

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
/**
 * Sets the additional listeners.
 */
private void setAdditionalListeners() {

    selectionModel
            .addListSelectionListener(new GlyphSelectionChangeHandler(tabPanel
                    .getInfoLabel(), sortedList, filterList,
                    selectionDependentActions));

    glyphList
            .addListEventListener(new ListEventListener<GlyphDefinition>() {
                @Override
                public void listChanged(ListEvent<GlyphDefinition> e) {
                    boolean enableActions = !listInSync;
                    for (Action a : syncDependentActions) {
                        a.setEnabled(enableActions);
                    }
                }
            });

}
 
开发者ID:richard-strauss-werke,项目名称:glyphpicker,代码行数:23,代码来源:MemorizedTabController.java


示例3: FilterControl

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
protected FilterControl(final JFrame jFrame, final String name, final EventList<E> eventList, final EventList<E> exportEventList, final FilterList<E> filterList, final Map<String, List<Filter>> filters, final Map<String, List<Filter>> defaultFilters) {
	this.name = name;
	this.eventList = eventList;
	this.exportEventList = exportEventList;
	this.filterList = filterList;
	eventList.addListEventListener(new ListEventListener<E>() {
		@Override @SuppressWarnings("deprecation")
		public void listChanged(ListEvent<E> listChanges) {
			try {
				eventList.getReadWriteLock().readLock().lock();
				List<E> delete = new ArrayList<E>();
				List<E> update = new ArrayList<E>();
				while(listChanges.next()) {
					switch (listChanges.getType()) {
						case ListEvent.DELETE:
							addSafe(delete, listChanges.getOldValue());
							break;
						case ListEvent.UPDATE:
							addSafe(eventList, update, listChanges.getIndex());
							break;
					}
				}
				cacheDelete(delete);
				cacheUpdate(update);
			} finally {
				eventList.getReadWriteLock().readLock().unlock();
			}
		}
	});
	this.filters = filters;
	this.defaultFilters = defaultFilters;
	ListenerClass listener = new ListenerClass();
	filterList.addListEventListener(listener);
	gui = new FilterGui<E>(jFrame, this);
	cache = new HashMap<E, String>();
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:37,代码来源:FilterControl.java


示例4: unregister

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
/**
 * @see IUpdateable#unregister(IUpdateableListener listener)
 */
@Override
public void unregister(IVizUpdateableListener listener) {
	// Pull the listener from the map
	ListEventListener<Object> glazedListener = listenerMap.get(listener);
	// Unregister it from the lists
	source.removeListEventListener(glazedListener);
	idList.removeListEventListener(glazedListener);
	// Remove the listener from the map
	listenerMap.remove(listener);
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:14,代码来源:VizListComponent.java


示例5: addListEventListener

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
/**
 * Registers the specified listener to receive change updates for this list.
 * <p>
 * ListComponent also registers the listener to the underlying source list.
 * Effectively, this method can be used to register glazed list listeners.
 * </p>
 */
@Override
public void addListEventListener(
		ListEventListener<? super T> listChangeListener) {
	super.addListEventListener(listChangeListener);

	// Add the listener to the TransformedList's source EventList.
	super.source.addListEventListener(listChangeListener);
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:16,代码来源:VizListComponent.java


示例6: removeListEventListener

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
/**
 * Removes the specified listener from receiving change updates for this
 * list.
 * <p>
 * ListComponent also removes the listener from the underlying source list.
 * Effectively, this method can be used to unregister glazed list listeners.
 * </p>
 */
@Override
public void removeListEventListener(
		ListEventListener<? super T> listChangeListener) {
	super.removeListEventListener(listChangeListener);

	// Remove the listener from the TransformedList's source EventList.
	super.source.removeListEventListener(listChangeListener);
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:17,代码来源:VizListComponent.java


示例7: createCountLabel

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
private JLabel createCountLabel()
{
    final JLabel label = new JLabel("");

    setTextForListSummaryLabel(label);

    shownList.addListEventListener(new ListEventListener<Object>()
    {
        public void listChanged(ListEvent<Object> evt)
        {
            if (!evt.isReordering())
            {
                setTextForListSummaryLabel(label);
            }
        }
    });

    theTable.getSelectionModel().addListSelectionListener(new ListSelectionListener()
    {
        public void valueChanged(ListSelectionEvent e)
        {
            if (!e.getValueIsAdjusting())
            {
                setTextForListSummaryLabel(label);
            }
        }

    });

    return label;
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:32,代码来源:GlazedListTableWidget.java


示例8: installListeners

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
public void installListeners(EventList<StoredSmtpMessage> filterList, final EventList<StoredSmtpMessage> baseList)
{
	filterList.addListEventListener(new ListEventListener<StoredSmtpMessage>() {
		public void listChanged(ListEvent<StoredSmtpMessage> listChanges)
		{
			baseList.getReadWriteLock().readLock().lock();
			try
			{
				if (!listChanges.isReordering() && lastCallCount != baseList.size())
					updateMessageCounts(baseList);
			} finally
			{
				baseList.getReadWriteLock().readLock().unlock();
			}
		}
	});

	baseList.addListEventListener(new ListEventListener<StoredSmtpMessage>() {
		public void listChanged(ListEvent<StoredSmtpMessage> evt)
		{
			boolean notEmpty = !baseList.isEmpty();

			clearQueueToolItem.setEnabled(notEmpty);
			exportAsMailItem.setEnabled(notEmpty);
			exportAsMailBoxItem.setEnabled(notEmpty);
		}
	});
}
 
开发者ID:edeoliveira,项目名称:Mailster,代码行数:29,代码来源:FilterTreeView.java


示例9: buildFilterList

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
public FilterList<StoredSmtpMessage> buildFilterList(final EventList<StoredSmtpMessage> eventList)
{
	eventList.addListEventListener(new ListEventListener<StoredSmtpMessage>() {
		public void listChanged(ListEvent<StoredSmtpMessage> listChanges)
		{
			if (listChanges.isReordering())
				return;
			
			tree.setRedraw(false);
			while (listChanges.next())
			{
				if (listChanges.getType() == ListEvent.INSERT || listChanges.getType() == ListEvent.UPDATE)
				{
					String host = eventList.get(listChanges.getIndex()).getMessageHost();
					addNodeIfNewHost(host);
				}
			}

			root.setExpanded(true);
			tree.setRedraw(true);
		}
	});

	eventList.getReadWriteLock().readLock().lock();
	try
	{
		editor = new HostMatcherEditor(tree);
		return new FilterList<StoredSmtpMessage>(eventList, editor);
	} finally
	{
		eventList.getReadWriteLock().readLock().unlock();
	}
}
 
开发者ID:edeoliveira,项目名称:Mailster,代码行数:34,代码来源:FilterTreeView.java


示例10: addSelectionListener

import ca.odell.glazedlists.event.ListEventListener; //导入依赖的package包/类
public void addSelectionListener(ListEventListener<BibEntry> listener) {
    getSelected().addListEventListener(listener);
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:4,代码来源:MainTable.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Animator类代码示例发布时间:2022-05-22
下一篇:
Java StubIORImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap