本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}