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


Java EventList.size方法代码示例

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


在下文中一共展示了EventList.size方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updatePanel

import ca.odell.glazedlists.EventList; //导入方法依赖的package包/类
private void updatePanel() {
  EventList<Message> list = TmmUIMessageCollector.instance.getMessages();
  list.getReadWriteLock().readLock().lock();
  try {
    for (int i = 0; i < list.size(); i++) {
      Message message = list.get(i);
      if (!messageMap.containsKey(message)) {
        MessagePanel panel = new MessagePanel(message);
        messageMap.put(message, panel);
        messagesPanel.add(panel);
      }
    }
    messagesPanel.revalidate();
    messagesPanel.repaint();
  }
  finally {
    list.getReadWriteLock().readLock().unlock();
  }
}
 
开发者ID:tinyMediaManager,项目名称:tinyMediaManager,代码行数:20,代码来源:MessageHistoryDialog.java

示例2: updatePreview

import ca.odell.glazedlists.EventList; //导入方法依赖的package包/类
private void updatePreview(final BibEntry toShow, int repeats) {
    if (workingOnPreview) {
        if (repeats > 0) {
            return; // We've already waited once. Give up on this selection.
        }
        Timer t = new Timer(50, actionEvent -> updatePreview(toShow, 1));
        t.setRepeats(false);
        t.start();
        return;
    }
    EventList<BibEntry> list = table.getSelected();
    // Check if the entry to preview is still selected:
    if ((list.size() != 1) || (list.get(0) != toShow)) {
        return;
    }
    workingOnPreview = true;
    SwingUtilities.invokeLater(() -> {
        panel.showPreview(toShow);
        workingOnPreview = false;
    });
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:22,代码来源:MainTableSelectionListener.java

示例3: size

import ca.odell.glazedlists.EventList; //导入方法依赖的package包/类
public static <E> int size(EventList<E> eventList) {
	try {
		eventList.getReadWriteLock().readLock().lock();
		return eventList.size();
	} finally {
		eventList.getReadWriteLock().readLock().unlock();
	}
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:9,代码来源:EventListManager.java

示例4: findEntry

import ca.odell.glazedlists.EventList; //导入方法依赖的package包/类
public int findEntry(BibEntry entry) {
    EventList<BibEntry> tableRows = model.getTableRows();
    for (int row = 0; row < tableRows.size(); row++) {
        BibEntry bibEntry = tableRows.get(row);
        if (entry == bibEntry) { // NOPMD (equals doesn't recognise duplicates)
            return row;
        }
    }
    return -1;
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:11,代码来源:MainTable.java

示例5: addCoreDataObject

import ca.odell.glazedlists.EventList; //导入方法依赖的package包/类
private <T extends AbstractNamedObject<T>> void addCoreDataObject(final EventList<T> objectsList, final T object,
		final JTable table) {
	checkAndResetActiveCoreDataObject();

	log.debug("Adding a new item...");
	objectsList.add(object);
	activeCoreDataObject = object;
	int index = objectsList.size() - 1;

	if (index == -1) {
		index = table.getSelectedRow();
	}
	table.changeSelection(index, 0, false, false);
}
 
开发者ID:mgm-tp,项目名称:perfload-loadprofiles,代码行数:15,代码来源:SettingsDialog.java

示例6: addSafe

import ca.odell.glazedlists.EventList; //导入方法依赖的package包/类
private void addSafe(final EventList<E> eventList, List<E> list, int index) {
	if (index >= 0 && index < eventList.size()) {
		list.add(eventList.get(index));
	}
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:6,代码来源:FilterControl.java


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