本文整理匯總了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);
}