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

Java DefaultEventTableModel类代码示例

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

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



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

示例1: getCellRect

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public Rectangle getCellRect(final int row, final int column, final boolean includeSpacing) {
	final DefaultEventTableModel<?> eventTableModel = getEventTableModel();

	// sometimes JTable asks for a cellrect that doesn't exist anymore, due
	// to an editor being installed before a bunch of rows were removed.
	// In this case, just return an empty rectangle, since it's going to
	// be discarded anyway
	if (row >= eventTableModel.getRowCount() || row < 0) {
		return new Rectangle();
	}

	// if it's the separator row, return the entire row as one big rectangle
	Object rowValue = eventTableModel.getElementAt(row);
	if (rowValue instanceof SeparatorList.Separator) {
		Rectangle firstColumn = super.getCellRect(row, 0, includeSpacing);
		Rectangle lastColumn = super.getCellRect(row, getColumnCount() - 1, includeSpacing);
		return firstColumn.union(lastColumn);

	// otherwise it's business as usual
	} else {
		return super.getCellRect(row, column, includeSpacing);
	}
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:26,代码来源:JSeparatorTable.java


示例2: mouseReleased

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
@Override
public void mouseReleased(final MouseEvent e) {
	if (columnMoved) {
		columnMoved = false;
		EnumTableFormatAdaptor<?, ?> tableFormat = getEnumTableFormatAdaptor();
		DefaultEventTableModel<?> model = getEventTableModel();
		if (tableFormat != null && model != null) {
			tableFormat.moveColumn(from, to);
			model.fireTableStructureChanged();
			if (from != to) {
				program.saveSettings("Columns (Moved)"); //Save Columns (Moved)
			}
		}
		autoResizeColumns();
	}
	if (columnResized) {
		columnResized = false;
		saveColumnsWidth();
	}
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:21,代码来源:JAutoColumnTable.java


示例3: MediaFilesPanel

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public MediaFilesPanel(EventList<MediaFile> mediaFiles) {
  this.mediaFileEventList = mediaFiles;
  setLayout(new FormLayout(new ColumnSpec[] { ColumnSpec.decode("default:grow"), }, new RowSpec[] { RowSpec.decode("default:grow"), }));

  mediaFileTableModel = new DefaultEventTableModel<>(GlazedListsSwing.swingThreadProxyList(mediaFileEventList), new MediaTableFormat());
  tableFiles = new ZebraJTable(mediaFileTableModel);
  tableFiles.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

  LinkListener linkListener = new LinkListener();
  tableFiles.addMouseListener(linkListener);
  tableFiles.addMouseMotionListener(linkListener);

  scrollPaneFiles = ZebraJTable.createStripedJScrollPane(tableFiles);
  add(scrollPaneFiles, "1, 1, fill, fill");

  scrollPaneFiles.setViewportView(tableFiles);

  // align the runtime to the right
  DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();
  rightRenderer.setHorizontalAlignment(SwingConstants.RIGHT);
  tableFiles.getColumnModel().getColumn(6).setCellRenderer(rightRenderer);
}
 
开发者ID:tinyMediaManager,项目名称:tinyMediaManager,代码行数:23,代码来源:MediaFilesPanel.java


示例4: MediaIdTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public MediaIdTable(EventList<MediaId> ids, ScraperType type) {
  this.idMap = null;
  this.editable = true;
  this.idList = ids;
  setModel(new DefaultEventTableModel<>(idList, new MediaIdTableFormat()));
  setTableHeader(null);
  putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  TableColumn column = getColumnModel().getColumn(0);

  Set<String> providerIds = new HashSet<>();
  for (MediaId id : ids) {
    providerIds.add(id.key);
  }
  for (MediaScraper scraper : MediaScraper.getMediaScrapers(type)) {
    providerIds.add(scraper.getId());
  }
  JComboBox<String> comboBox = new JComboBox<>(providerIds.toArray(new String[0]));

  column.setCellEditor(new DefaultCellEditor(comboBox));
}
 
开发者ID:tinyMediaManager,项目名称:tinyMediaManager,代码行数:22,代码来源:MediaIdTable.java


示例5: JSeparatorTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JSeparatorTable(final Program program, final DefaultEventTableModel<?> tableModel, SeparatorList<?> separatorList) {
	super(program, tableModel);
	setUI(new SpanTableUI());
	this.separatorList = separatorList;

	// use a toString() renderer for the separator
	this.separatorRenderer = getDefaultRenderer(Object.class);
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:9,代码来源:JSeparatorTable.java


示例6: getEventTableModel

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
private DefaultEventTableModel<?> getEventTableModel() {
	TableModel model = this.getModel();
	if (model instanceof DefaultEventTableModel) {
		return (DefaultEventTableModel) model;
	} else {
		return null;
	}
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:9,代码来源:JAutoColumnTable.java


示例7: installTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
/**
 * Table automation
 * 1. Saving table settings (TableColumns, TableResize, TableColumnsWidth)
 * 2. Restore table selection after update
 * 3. Restore expanded state for JSeparatorTable after update
 * 4. Lock/unlock table doing update
 * 
 * @param jTable
 * @param toolName unique tool name
 */
protected final void installTable(final JAutoColumnTable jTable, String toolName) {
	this.toolName = toolName;

	//Table Selection
	ListSelectionModel selectionModel = jTable.getSelectionModel();
	if (selectionModel instanceof  DefaultEventSelectionModel) {
		this.eventSelectionModel = (DefaultEventSelectionModel<?>) selectionModel;
	}
	TableModel tableModel = jTable.getModel();
	if (tableModel instanceof DefaultEventTableModel) {
		this.eventTableModel = (DefaultEventTableModel<?>) tableModel;
	}

	//Table lock
	this.jTable = jTable;

	//Load Settings
	if (eventTableModel != null && toolName != null) {
		TableFormat<?> tableFormat = eventTableModel.getTableFormat();
		if (tableFormat instanceof  EnumTableFormatAdaptor) {
			EnumTableFormatAdaptor<?, ?> formatAdaptor = (EnumTableFormatAdaptor<?, ?>) tableFormat;
			formatAdaptor.setColumns(Settings.get().getTableColumns().get(toolName));
			formatAdaptor.setResizeMode(Settings.get().getTableResize().get(toolName));
			jTable.setColumnsWidth(Settings.get().getTableColumnsWidth().get(toolName));
			eventTableModel.fireTableStructureChanged();
		}
	}
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:39,代码来源:JMainTab.java


示例8: AssetTreeTableCellEditor

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public AssetTreeTableCellEditor(TableCellEditor delegate, TreeList<TreeAsset> treeList, DefaultEventTableModel<TreeAsset> tableModel, int indent, int spacer) {
	super(delegate, treeList);
	if (indent == spacer) {
		throw new IllegalArgumentException("indent and spacer may not be equal - that invalidates indent");
	}
	this.tableModel = tableModel;
	this.indent = indent;
	this.spacer = spacer;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:10,代码来源:TreeTab.java


示例9: AssetTreeTableCellRenderer

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public AssetTreeTableCellRenderer(TableCellRenderer delegate, TreeList<TreeAsset> treeList, DefaultEventTableModel<TreeAsset> tableModel, int indent, int spacer) {
	super(delegate, treeList);
	if (indent == spacer) {
		throw new IllegalArgumentException("indent and spacer may not be equal - that invalidates indent");
	}
	this.tableModel = tableModel;
	this.indent = indent;
	this.spacer = spacer;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:10,代码来源:TreeTab.java


示例10: createTableModel

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public static <E> DefaultEventTableModel<E> createTableModel(EventList<E> source, TableFormat<E> tableFormat) {
	// XXX - Workaround for java bug: https://bugs.openjdk.java.net/browse/JDK-8068824
	//return new DefaultEventTableModel<E>(createSwingThreadProxyList(source), tableFormat);
	return new FixedEventTableModel<E>(createSwingThreadProxyList(source), tableFormat);
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:6,代码来源:EventModels.java


示例11: JAccountTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JAccountTable(final Program program, final DefaultEventTableModel<OwnerType> tableModel, SeparatorList<OwnerType> separatorList) {
	super(program, tableModel, separatorList);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JAccountTable.java


示例12: JTransactionTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JTransactionTable(Program program, final DefaultEventTableModel<MyTransaction> tableModel) {
	super(program, tableModel);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JTransactionTable.java


示例13: JContractsTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JContractsTable(final Program program, final DefaultEventTableModel<MyContractItem> tableModel, SeparatorList<?> separatorList) {
	super(program, tableModel, separatorList);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JContractsTable.java


示例14: JOverviewTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JOverviewTable(final Program program, final DefaultEventTableModel<Overview> tableModel) {
	super(program, tableModel);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JOverviewTable.java


示例15: JTreeTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JTreeTable(final Program program, final DefaultEventTableModel<TreeAsset> tableModel) {
	super(program, tableModel);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JTreeTable.java


示例16: JJournalTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JJournalTable(Program program, final DefaultEventTableModel<MyJournal> tableModel) {
	super(program, tableModel);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JJournalTable.java


示例17: JReprocessedTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JReprocessedTable(final Program program, final DefaultEventTableModel<ReprocessedInterface> tableModel, SeparatorList<?> separatorList) {
	super(program, tableModel, separatorList);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JReprocessedTable.java


示例18: JMarketOrdersTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JMarketOrdersTable(final Program program, final DefaultEventTableModel<MyMarketOrder> tableModel) {
	super(program, tableModel);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JMarketOrdersTable.java


示例19: JStockpileTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JStockpileTable(final Program program, final DefaultEventTableModel<StockpileItem> tableModel, SeparatorList<?> separatorList) {
	super(program, tableModel, separatorList);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JStockpileTable.java


示例20: JValueTable

import ca.odell.glazedlists.swing.DefaultEventTableModel; //导入依赖的package包/类
public JValueTable(final Program program, final DefaultEventTableModel<Value> tableModel) {
	super(program, tableModel);
	this.tableModel = tableModel;
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:5,代码来源:JValueTable.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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