本文整理汇总了Java中ca.odell.glazedlists.FilterList类的典型用法代码示例。如果您正苦于以下问题:Java FilterList类的具体用法?Java FilterList怎么用?Java FilterList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FilterList类属于ca.odell.glazedlists包,在下文中一共展示了FilterList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: MainTableDataModel
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public MainTableDataModel(BibDatabaseContext context) {
List<BibEntry> entries = context.getDatabase().getEntries();
EventList<BibEntry> initialEventList = new BasicEventList<>();
initialEventList.addAll(entries);
listSynchronizer = new ListSynchronizer(initialEventList);
// This SortedList has a Comparator controlled by the TableComparatorChooser
// we are going to install, which responds to user sorting selections:
sortedForUserDefinedTableColumnSorting = new SortedList<>(initialEventList, null);
// This SortedList applies afterwards, and floats marked entries:
sortedForMarkingSearchGrouping = new SortedList<>(sortedForUserDefinedTableColumnSorting, null);
FilterList<BibEntry> groupFilterList = new FilterList<>(sortedForMarkingSearchGrouping, EverythingMatcher.INSTANCE);
filterGroupToggle = new StartStopListFilterAction(groupFilterList, GroupMatcher.INSTANCE,
EverythingMatcher.INSTANCE);
FilterList<BibEntry> searchFilterList = new FilterList<>(groupFilterList, EverythingMatcher.INSTANCE);
filterSearchToggle = new StartStopListFilterAction(searchFilterList, SearchMatcher.INSTANCE,
EverythingMatcher.INSTANCE);
finalList = searchFilterList;
}
开发者ID:JabRef,项目名称:jabref,代码行数:24,代码来源:MainTableDataModel.java
示例2: FilterControl
import ca.odell.glazedlists.FilterList; //导入依赖的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
示例3: StartStopListFilterAction
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
private StartStopListFilterAction(FilterList<BibEntry> list, Matcher<BibEntry> active, Matcher<BibEntry> inactive) {
this.list = list;
this.active = active;
this.inactive = inactive;
list.setMatcher(inactive);
}
开发者ID:JabRef,项目名称:jabref,代码行数:8,代码来源:MainTableDataModel.java
示例4: GlyphSelectionChangeHandler
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
/**
* Instantiates a new GlyphSelectionChangeHandler.
* @param infoLabel The panel containing the glyph info in grid view
* @param sortedList The sorted glyph list
* @param filterList The filtered glyph list
* @param actions The actions affected by selection changes
*/
public GlyphSelectionChangeHandler(JLabel infoLabel,
SortedList<GlyphDefinition> sortedList,
FilterList<GlyphDefinition> filterList, Set<Action> actions) {
this.infoLabel = infoLabel;
this.sortedList = sortedList;
this.filterList = filterList;
this.actions = actions;
}
开发者ID:richard-strauss-werke,项目名称:glyphpicker,代码行数:16,代码来源:GlyphSelectionChangeHandler.java
示例5: RemoveAction
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
/**
* Instantiates a new RemoveAction.
*
* @param panel The container tab panel
* @param listener the property change listener to be added to this action
* @param glyphList the glyph list model
* @param filterList the filter list model
* @param list the list component
*/
public RemoveAction(TabPanel panel, PropertyChangeListener listener,
EventList<GlyphDefinition> glyphList,
FilterList<GlyphDefinition> filterList, GlyphGrid list) {
super(CLASS_NAME, "/images/oxygen/Remove16.png", "ctrl D");
this.addPropertyChangeListener(listener);
this.glyphList = glyphList;
this.filterList = filterList;
this.list = list;
bindAcceleratorToComponent(this, panel);
}
开发者ID:richard-strauss-werke,项目名称:glyphpicker,代码行数:20,代码来源:RemoveAction.java
示例6: buildFilterList
import ca.odell.glazedlists.FilterList; //导入依赖的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
示例7: BodyLayerStack
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public BodyLayerStack(List<T> values,
IColumnPropertyAccessor<T> columnPropertyAccessor,
ColumnGroupModel... columnGroupModel) {
// wrapping of the list to show into GlazedLists
// see http://publicobject.com/glazedlists/ for further information
EventList<T> eventList = GlazedLists.eventList(values);
TransformedList<T, T> rowObjectsGlazedList = GlazedLists.threadSafeList(eventList);
// use the SortedList constructor with 'null' for the Comparator
// because the Comparator will be set by configuration
this.sortedList = new SortedList<T>(rowObjectsGlazedList, null);
// wrap the SortedList with the FilterList
this.filterList = new FilterList<T>(getSortedList());
this.bodyDataProvider =
new ListDataProvider<T>(this.filterList, columnPropertyAccessor);
DataLayer bodyDataLayer = new DataLayer(this.bodyDataProvider);
// layer for event handling of GlazedLists and PropertyChanges
GlazedListsEventLayer<T> glazedListsEventLayer =
new GlazedListsEventLayer<T>(bodyDataLayer, this.filterList);
this.columnReorderLayer = new ColumnReorderLayer(glazedListsEventLayer);
this.columnGroupReorderLayer =
new ColumnGroupReorderLayer(this.columnReorderLayer, columnGroupModel[columnGroupModel.length - 1]);
this.columnHideShowLayer = new ColumnHideShowLayer(this.columnGroupReorderLayer);
this.columnGroupExpandCollapseLayer =
new ColumnGroupExpandCollapseLayer(this.columnHideShowLayer, columnGroupModel);
this.selectionLayer = new SelectionLayer(this.columnGroupExpandCollapseLayer);
this.viewportLayer = new ViewportLayer(this.selectionLayer);
final FreezeLayer freezeLayer = new FreezeLayer(this.selectionLayer);
final CompositeFreezeLayer compositeFreezeLayer =
new CompositeFreezeLayer(freezeLayer, this.viewportLayer, this.selectionLayer);
setUnderlyingLayer(compositeFreezeLayer);
}
开发者ID:xored,项目名称:q7.quality.mockups,代码行数:38,代码来源:SortableFilterableColumnGroupExample.java
示例8: getFilterList
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public FilterList<E> getFilterList() {
return filterList;
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:4,代码来源:FilterControl.java
示例9: TransactionsFilterControl
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public TransactionsFilterControl(EnumTableFormatAdaptor<TransactionTableFormat, MyTransaction> tableFormat, JFrame jFrame, EventList<MyTransaction> eventList, EventList<MyTransaction> exportEventList, FilterList<MyTransaction> filterList, Map<String, List<Filter>> filters, Map<String, List<Filter>> defaultFilters) {
super(jFrame, NAME, eventList, exportEventList, filterList, filters, defaultFilters);
this.tableFormat = tableFormat;
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:TransactionTab.java
示例10: ContractsFilterControl
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public ContractsFilterControl(EnumTableFormatAdaptor<ContractsTableFormat, MyContractItem> tableFormat, JFrame jFrame, EventList<MyContractItem> eventList, EventList<MyContractItem> exportEventList, FilterList<MyContractItem> filterList, Map<String, List<Filter>> filters) {
super(jFrame, NAME, eventList, exportEventList, filterList, filters);
this.tableFormat = tableFormat;
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:ContractsTab.java
示例11: AssetFilterControl
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public AssetFilterControl(JFrame jFrame, EventList<TreeAsset> eventList, EventList<TreeAsset> exportEventList, FilterList<TreeAsset> filterList, Map<String, List<Filter>> filters) {
super(jFrame, NAME, eventList, exportEventList, filterList, filters);
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:4,代码来源:TreeTab.java
示例12: ReprocessedFilterControl
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public ReprocessedFilterControl(EnumTableFormatAdaptor<ReprocessedTableFormat, ReprocessedInterface> tableFormat, JFrame jFrame, EventList<ReprocessedInterface> eventList, EventList<ReprocessedInterface> exportEventList, FilterList<ReprocessedInterface> filterList, Map<String, List<Filter>> filters) {
super(jFrame, NAME, eventList, exportEventList, filterList, filters);
this.tableFormat = tableFormat;
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:ReprocessedTab.java
示例13: MarketOrdersTab
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public MarketOrdersTab(final Program program) {
super(program, TabsOrders.get().market(), Images.TOOL_MARKET_ORDERS.getIcon(), true);
ListenerClass listener = new ListenerClass();
//Table Format
tableFormat = new EnumTableFormatAdaptor<MarketTableFormat, MyMarketOrder>(MarketTableFormat.class);
//Backend
eventList = program.getProfileData().getMarketOrdersEventList();
//Sorting (per column)
eventList.getReadWriteLock().readLock().lock();
SortedList<MyMarketOrder> sortedList = new SortedList<MyMarketOrder>(eventList);
eventList.getReadWriteLock().readLock().unlock();
//Filter
eventList.getReadWriteLock().readLock().lock();
filterList = new FilterList<MyMarketOrder>(sortedList);
eventList.getReadWriteLock().readLock().unlock();
filterList.addListEventListener(listener);
//Table Model
tableModel = EventModels.createTableModel(filterList, tableFormat);
//Table
jTable = new JMarketOrdersTable(program, tableModel);
jTable.setCellSelectionEnabled(true);
PaddingTableCellRenderer.install(jTable, 1);
//Sorting
TableComparatorChooser.install(jTable, sortedList, TableComparatorChooser.MULTIPLE_COLUMN_MOUSE, tableFormat);
//Selection Model
selectionModel = EventModels.createSelectionModel(filterList);
selectionModel.setSelectionMode(ListSelection.MULTIPLE_INTERVAL_SELECTION_DEFENSIVE);
jTable.setSelectionModel(selectionModel);
//Listeners
installTable(jTable, NAME);
//Scroll Panels
JScrollPane jTableScroll = new JScrollPane(jTable);
//Table Filter
Map<String, List<Filter>> defaultFilters = new HashMap<String, List<Filter>>();
List<Filter> filter;
filter = new ArrayList<Filter>();
filter.add(new Filter(LogicType.AND, MarketTableFormat.ORDER_TYPE, CompareType.EQUALS, TabsOrders.get().buy()));
filter.add(new Filter(LogicType.AND, MarketTableFormat.STATUS, CompareType.EQUALS, TabsOrders.get().statusActive()));
defaultFilters.put(TabsOrders.get().activeBuyOrders(), filter);
filter = new ArrayList<Filter>();
filter.add(new Filter(LogicType.AND, MarketTableFormat.ORDER_TYPE, CompareType.EQUALS, TabsOrders.get().sell()));
filter.add(new Filter(LogicType.AND, MarketTableFormat.STATUS, CompareType.EQUALS, TabsOrders.get().statusActive()));
defaultFilters.put(TabsOrders.get().activeSellOrders(), filter);
filterControl = new MarketOrdersFilterControl(
tableFormat,
program.getMainWindow().getFrame(),
eventList,
sortedList,
filterList,
Settings.get().getTableFilters(NAME),
defaultFilters
);
//Menu
installMenu(program, new OrdersTableMenu(), jTable, MyMarketOrder.class);
jSellOrdersTotal = StatusPanel.createLabel(TabsOrders.get().totalSellOrders(), Images.ORDERS_SELL.getIcon());
this.addStatusbarLabel(jSellOrdersTotal);
jBuyOrdersTotal = StatusPanel.createLabel(TabsOrders.get().totalBuyOrders(), Images.ORDERS_BUY.getIcon());
this.addStatusbarLabel(jBuyOrdersTotal);
jEscrowTotal = StatusPanel.createLabel(TabsOrders.get().totalEscrow(), Images.ORDERS_ESCROW.getIcon());
this.addStatusbarLabel(jEscrowTotal);
jToCoverTotal = StatusPanel.createLabel(TabsOrders.get().totalToCover(), Images.ORDERS_TO_COVER.getIcon());
this.addStatusbarLabel(jToCoverTotal);
layout.setHorizontalGroup(
layout.createParallelGroup()
.addComponent(filterControl.getPanel())
.addComponent(jTableScroll, 0, 0, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createSequentialGroup()
.addComponent(filterControl.getPanel())
.addComponent(jTableScroll, 0, 0, Short.MAX_VALUE)
);
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:81,代码来源:MarketOrdersTab.java
示例14: MarketOrdersFilterControl
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public MarketOrdersFilterControl(EnumTableFormatAdaptor<MarketTableFormat, MyMarketOrder> tableFormat, JFrame jFrame, EventList<MyMarketOrder> eventList, EventList<MyMarketOrder> exportEventList, FilterList<MyMarketOrder> filterList, Map<String, List<Filter>> filters, Map<String, List<Filter>> defaultFilters) {
super(jFrame, NAME, eventList, exportEventList, filterList, filters, defaultFilters);
this.tableFormat = tableFormat;
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:MarketOrdersTab.java
示例15: setLocationType
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
private void setLocationType(LocationType locationType) {
this.locationType = locationType;
if (locationType == LocationType.STATION) {
jLocationType.setIcon(Images.LOC_STATION.getIcon());
jLocationType.setToolTipText(TabsStockpile.get().station());
jPanel.setBorder(BorderFactory.createTitledBorder(TabsStockpile.get().station()));
try {
stations.getReadWriteLock().readLock().lock();
filterList = new FilterList<MyLocation>(stations);
} finally {
stations.getReadWriteLock().readLock().unlock();
}
jStation.setSelected(true);
} else if (locationType == LocationType.SYSTEM) {
jLocationType.setIcon(Images.LOC_SYSTEM.getIcon());
jLocationType.setToolTipText(TabsStockpile.get().system());
jPanel.setBorder(BorderFactory.createTitledBorder(TabsStockpile.get().system()));
try {
systems.getReadWriteLock().readLock().lock();
filterList = new FilterList<MyLocation>(systems);
} finally {
systems.getReadWriteLock().readLock().unlock();
}
jSystem.setSelected(true);
} else if (locationType == LocationType.REGION) {
jLocationType.setIcon(Images.LOC_REGION.getIcon());
jLocationType.setToolTipText(TabsStockpile.get().region());
jPanel.setBorder(BorderFactory.createTitledBorder(TabsStockpile.get().region()));
try {
regions.getReadWriteLock().readLock().lock();
filterList = new FilterList<MyLocation>(regions);
} finally {
regions.getReadWriteLock().readLock().unlock();
}
jRegion.setSelected(true);
} else {
jLocationType.setIcon(Images.LOC_LOCATIONS.getIcon());
jLocationType.setToolTipText(TabsStockpile.get().universe());
jPanel.setBorder(BorderFactory.createTitledBorder(TabsStockpile.get().universe()));
EventList<MyLocation> eventList = new EventListManager<MyLocation>().create();
try {
eventList.getReadWriteLock().readLock().lock();
filterList = new FilterList<MyLocation>(eventList);
} finally {
eventList.getReadWriteLock().readLock().unlock();
}
jUniverse.setSelected(true);
}
if (autoComplete != null) { //Remove old
jLocation.removeItemListener(listener);
autoComplete.uninstall();
autoComplete = null;
}
if (locationType != LocationType.UNIVERSE) {
jLocation.setEnabled(true);
autoComplete = AutoCompleteSupport.install(jLocation, EventModels.createSwingThreadProxyList(filterList), new LocationsFilterator());
autoComplete.setStrict(true);
autoComplete.setCorrectsCase(true);
jLocation.addItemListener(listener); //Must be added after AutoCompleteSupport
} else {
jLocation.setEnabled(false);
jLocation.getModel().setSelectedItem(TabsStockpile.get().universe());
}
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:65,代码来源:StockpileDialog.java
示例16: StockpileFilterControl
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public StockpileFilterControl(EnumTableFormatAdaptor<StockpileTableFormat, StockpileItem> tableFormat, JFrame jFrame, EventList<StockpileItem> eventList, EventList<StockpileItem> exportEventList, FilterList<StockpileItem> filterList, Map<String, List<Filter>> filters) {
super(jFrame, NAME, eventList, exportEventList, filterList, filters);
this.tableFormat = tableFormat;
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:StockpileTab.java
示例17: ValueTableTab
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public ValueTableTab(final Program program) {
super(program, TabsValues.get().title(), Images.TOOL_VALUE_TABLE.getIcon(), true);
//Table Format
tableFormat = new EnumTableFormatAdaptor<ValueTableFormat, Value>(ValueTableFormat.class);
//Backend
eventList = new EventListManager<Value>().create();
//Sorting (per column)
eventList.getReadWriteLock().readLock().lock();
SortedList<Value> columnSortedList = new SortedList<Value>(eventList);
eventList.getReadWriteLock().readLock().unlock();
//Sorting Total
eventList.getReadWriteLock().readLock().lock();
SortedList<Value> totalSortedList = new SortedList<Value>(columnSortedList, new TotalComparator());
eventList.getReadWriteLock().readLock().unlock();
//Filter
eventList.getReadWriteLock().readLock().lock();
filterList = new FilterList<Value>(totalSortedList);
eventList.getReadWriteLock().readLock().unlock();
//Table Model
tableModel = EventModels.createTableModel(filterList, tableFormat);
//Table
jTable = new JValueTable(program, tableModel);
jTable.setCellSelectionEnabled(true);
jTable.setRowSelectionAllowed(true);
jTable.setColumnSelectionAllowed(true);
PaddingTableCellRenderer.install(jTable, 3);
//Sorting
TableComparatorChooser.install(jTable, columnSortedList, TableComparatorChooser.MULTIPLE_COLUMN_MOUSE, tableFormat);
//Selection Model
selectionModel = EventModels.createSelectionModel(filterList);
selectionModel.setSelectionMode(ListSelection.MULTIPLE_INTERVAL_SELECTION_DEFENSIVE);
jTable.setSelectionModel(selectionModel);
//Listeners
installTable(jTable, NAME);
//Scroll
JScrollPane jTableScroll = new JScrollPane(jTable);
//Table Filter
filterControl = new ValueFilterControl(
tableFormat,
program.getMainWindow().getFrame(),
eventList,
totalSortedList,
filterList,
Settings.get().getTableFilters(NAME)
);
//Menu
installMenu(program, new ValueTableMenu(), jTable, Value.class);
layout.setHorizontalGroup(
layout.createParallelGroup()
.addComponent(filterControl.getPanel())
.addComponent(jTableScroll, 0, 0, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createSequentialGroup()
.addComponent(filterControl.getPanel())
.addComponent(jTableScroll, 0, 0, Short.MAX_VALUE)
);
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:61,代码来源:ValueTableTab.java
示例18: ValueFilterControl
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public ValueFilterControl(EnumTableFormatAdaptor<ValueTableFormat, Value> tableFormat, JFrame jFrame, EventList<Value> eventList, EventList<Value> exportEventList, FilterList<Value> filterList, Map<String, List<Filter>> filters) {
super(jFrame, NAME, eventList, exportEventList, filterList, filters);
this.tableFormat = tableFormat;
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:ValueTableTab.java
示例19: AssetsTab
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public AssetsTab(final Program program) {
super(program, TabsAssets.get().assets(), Images.TOOL_ASSETS.getIcon(), false);
layout.setAutoCreateGaps(true);
ListenerClass listener = new ListenerClass();
//Table Format
tableFormat = new EnumTableFormatAdaptor<AssetTableFormat, MyAsset>(AssetTableFormat.class);
//Backend
eventList = program.getProfileData().getAssetsEventList();
//Sorting (per column)
eventList.getReadWriteLock().readLock().lock();
SortedList<MyAsset> sortedList = new SortedList<MyAsset>(eventList);
eventList.getReadWriteLock().readLock().unlock();
//Filter
eventList.getReadWriteLock().readLock().lock();
filterList = new FilterList<MyAsset>(sortedList);
eventList.getReadWriteLock().readLock().unlock();
filterList.addListEventListener(listener);
//Table Model
tableModel = EventModels.createTableModel(filterList, tableFormat);
//Table
jTable = new JAssetTable(program, tableModel);
jTable.setCellSelectionEnabled(true);
jTable.setRowSelectionAllowed(true);
jTable.setColumnSelectionAllowed(true);
//Sorting
TableComparatorChooser.install(jTable, sortedList, TableComparatorChooser.MULTIPLE_COLUMN_MOUSE, tableFormat);
//Selection Model
selectionModel = EventModels.createSelectionModel(filterList);
selectionModel.setSelectionMode(ListSelection.MULTIPLE_INTERVAL_SELECTION_DEFENSIVE);
jTable.setSelectionModel(selectionModel);
//Listeners
installTable(jTable, NAME);
//Scroll
JScrollPane jTableScroll = new JScrollPane(jTable);
//Table Filter
filterControl = new AssetFilterControl(
program.getMainWindow().getFrame(),
eventList,
sortedList,
filterList,
Settings.get().getTableFilters(NAME)
);
//Menu
installMenu(program, new AssetTableMenu(), jTable, MyAsset.class);
jVolume = StatusPanel.createLabel(TabsAssets.get().totalVolume(), Images.ASSETS_VOLUME.getIcon());
this.addStatusbarLabel(jVolume);
jCount = StatusPanel.createLabel(TabsAssets.get().totalCount(), Images.EDIT_ADD.getIcon()); //Add
this.addStatusbarLabel(jCount);
jAverage = StatusPanel.createLabel(TabsAssets.get().average(), Images.ASSETS_AVERAGE.getIcon());
this.addStatusbarLabel(jAverage);
jReprocessed = StatusPanel.createLabel(TabsAssets.get().totalReprocessed(), Images.SETTINGS_REPROCESSING.getIcon());
this.addStatusbarLabel(jReprocessed);
jValue = StatusPanel.createLabel(TabsAssets.get().totalValue(), Images.TOOL_VALUES.getIcon());
this.addStatusbarLabel(jValue);
layout.setHorizontalGroup(
layout.createParallelGroup()
.addComponent(filterControl.getPanel())
.addComponent(jTableScroll, 0, 0, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createSequentialGroup()
.addComponent(filterControl.getPanel())
.addComponent(jTableScroll, 0, 0, Short.MAX_VALUE)
);
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:78,代码来源:AssetsTab.java
示例20: AssetFilterControl
import ca.odell.glazedlists.FilterList; //导入依赖的package包/类
public AssetFilterControl(JFrame jFrame, EventList<MyAsset> eventList, EventList<MyAsset> exportEventList, FilterList<MyAsset> filterList, Map<String, List<Filter>> filters) {
super(jFrame, NAME, eventList, exportEventList, filterList, filters);
}
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:4,代码来源:AssetsTab.java
注:本文中的ca.odell.glazedlists.FilterList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论