當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。