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


Java AbstractTableModel.fireTableRowsUpdated方法代码示例

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


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

示例1: edit

import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void edit()
{
	EditMigrationEntryDialog dialog = new EditMigrationEntryDialog(myProject);
	int selected = myTable.getSelectedRow();
	if(selected < 0)
	{
		return;
	}
	MigrationMapEntry entry = myMigrationMap.getEntryAt(selected);
	dialog.setEntry(entry);
	if(!dialog.showAndGet())
	{
		return;
	}
	dialog.updateEntry(entry);
	AbstractTableModel model = (AbstractTableModel) myTable.getModel();
	model.fireTableRowsUpdated(selected, selected);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:19,代码来源:EditMigrationDialog.java

示例2: moveRowUp

import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void moveRowUp() {
  int selected = myImportLayoutTable.getSelectedRow();
  if (selected < 1) {
    return;
  }
  TableUtil.stopEditing(myImportLayoutTable);
  PackageEntry entry = myImportLayoutList.getEntryAt(selected);
  PackageEntry previousEntry = myImportLayoutList.getEntryAt(selected - 1);
  myImportLayoutList.setEntryAt(previousEntry, selected);
  myImportLayoutList.setEntryAt(entry, selected - 1);

  AbstractTableModel model = (AbstractTableModel)myImportLayoutTable.getModel();
  model.fireTableRowsUpdated(selected - 1, selected);
  myImportLayoutTable.setRowSelectionInterval(selected - 1, selected - 1);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ImportLayoutPanel.java

示例3: moveRowDown

import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void moveRowDown() {
  int selected = myImportLayoutTable.getSelectedRow();
  if (selected >= myImportLayoutList.getEntryCount() - 1) {
    return;
  }
  TableUtil.stopEditing(myImportLayoutTable);
  PackageEntry entry = myImportLayoutList.getEntryAt(selected);
  PackageEntry nextEntry = myImportLayoutList.getEntryAt(selected + 1);
  myImportLayoutList.setEntryAt(nextEntry, selected);
  myImportLayoutList.setEntryAt(entry, selected + 1);

  AbstractTableModel model = (AbstractTableModel)myImportLayoutTable.getModel();
  model.fireTableRowsUpdated(selected, selected + 1);
  myImportLayoutTable.setRowSelectionInterval(selected + 1, selected + 1);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ImportLayoutPanel.java

示例4: edit

import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void edit() {
  EditMigrationEntryDialog dialog = new EditMigrationEntryDialog(myProject);
  int selected = myTable.getSelectedRow();
  if (selected < 0)
    return;
  MigrationMapEntry entry = myMigrationMap.getEntryAt(selected);
  dialog.setEntry(entry);
  if (!dialog.showAndGet()) {
    return;
  }
  dialog.updateEntry(entry);
  AbstractTableModel model = (AbstractTableModel)myTable.getModel();
  model.fireTableRowsUpdated(selected, selected);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:EditMigrationDialog.java

示例5: moveUp

import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void moveUp() {
  int selected = myTable.getSelectedRow();
  if (selected < 1)
    return;
  MigrationMapEntry entry = myMigrationMap.getEntryAt(selected);
  MigrationMapEntry previousEntry = myMigrationMap.getEntryAt(selected - 1);
  myMigrationMap.setEntryAt(previousEntry, selected);
  myMigrationMap.setEntryAt(entry, selected - 1);
  AbstractTableModel model = (AbstractTableModel)myTable.getModel();
  model.fireTableRowsUpdated(selected - 1, selected);
  myTable.setRowSelectionInterval(selected - 1, selected - 1);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:EditMigrationDialog.java

示例6: moveDown

import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void moveDown() {
  int selected = myTable.getSelectedRow();
  if (selected >= myMigrationMap.getEntryCount() - 1)
    return;
  MigrationMapEntry entry = myMigrationMap.getEntryAt(selected);
  MigrationMapEntry nextEntry = myMigrationMap.getEntryAt(selected + 1);
  myMigrationMap.setEntryAt(nextEntry, selected);
  myMigrationMap.setEntryAt(entry, selected + 1);
  AbstractTableModel model = (AbstractTableModel)myTable.getModel();
  model.fireTableRowsUpdated(selected, selected + 1);
  myTable.setRowSelectionInterval(selected + 1, selected + 1);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:EditMigrationDialog.java

示例7: edit

import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void edit() {
  EditMigrationEntryDialog dialog = new EditMigrationEntryDialog(myProject);
  int selected = myTable.getSelectedRow();
  if (selected < 0)
    return;
  MigrationMapEntry entry = myMigrationMap.getEntryAt(selected);
  dialog.setEntry(entry);
  dialog.show();
  if (!dialog.isOK()){
    return;
  }
  dialog.updateEntry(entry);
  AbstractTableModel model = (AbstractTableModel)myTable.getModel();
  model.fireTableRowsUpdated(selected, selected);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:EditMigrationDialog.java

示例8: moveUp

import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void moveUp()
{
	int selected = myTable.getSelectedRow();
	if(selected < 1)
	{
		return;
	}
	MigrationMapEntry entry = myMigrationMap.getEntryAt(selected);
	MigrationMapEntry previousEntry = myMigrationMap.getEntryAt(selected - 1);
	myMigrationMap.setEntryAt(previousEntry, selected);
	myMigrationMap.setEntryAt(entry, selected - 1);
	AbstractTableModel model = (AbstractTableModel) myTable.getModel();
	model.fireTableRowsUpdated(selected - 1, selected);
	myTable.setRowSelectionInterval(selected - 1, selected - 1);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:16,代码来源:EditMigrationDialog.java

示例9: moveDown

import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void moveDown()
{
	int selected = myTable.getSelectedRow();
	if(selected >= myMigrationMap.getEntryCount() - 1)
	{
		return;
	}
	MigrationMapEntry entry = myMigrationMap.getEntryAt(selected);
	MigrationMapEntry nextEntry = myMigrationMap.getEntryAt(selected + 1);
	myMigrationMap.setEntryAt(nextEntry, selected);
	myMigrationMap.setEntryAt(entry, selected + 1);
	AbstractTableModel model = (AbstractTableModel) myTable.getModel();
	model.fireTableRowsUpdated(selected, selected + 1);
	myTable.setRowSelectionInterval(selected + 1, selected + 1);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:16,代码来源:EditMigrationDialog.java


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