本文整理汇总了Java中javax.swing.table.AbstractTableModel.fireTableRowsInserted方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractTableModel.fireTableRowsInserted方法的具体用法?Java AbstractTableModel.fireTableRowsInserted怎么用?Java AbstractTableModel.fireTableRowsInserted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.table.AbstractTableModel
的用法示例。
在下文中一共展示了AbstractTableModel.fireTableRowsInserted方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addBlankLine
import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void addBlankLine() {
int selected = myImportLayoutTable.getSelectedRow() + 1;
if (selected < 0) {
selected = myImportLayoutList.getEntryCount();
}
myImportLayoutList.insertEntryAt(PackageEntry.BLANK_LINE_ENTRY, selected);
AbstractTableModel model = (AbstractTableModel)myImportLayoutTable.getModel();
model.fireTableRowsInserted(selected, selected);
myImportLayoutTable.setRowSelectionInterval(selected, selected);
}
示例2: refreshTableModel
import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
public static void refreshTableModel(int selectedRow, JBTable table) {
AbstractTableModel model = (AbstractTableModel)table.getModel();
model.fireTableRowsInserted(selectedRow, selectedRow);
table.setRowSelectionInterval(selectedRow, selectedRow);
TableUtil.editCellAt(table, selectedRow, 0);
Component editorComp = table.getEditorComponent();
if (editorComp != null) {
editorComp.requestFocus();
}
}
示例3: addRow
import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void addRow() {
EditMigrationEntryDialog dialog = new EditMigrationEntryDialog(myProject);
MigrationMapEntry entry = new MigrationMapEntry();
dialog.setEntry(entry);
if (!dialog.showAndGet()) {
return;
}
dialog.updateEntry(entry);
myMigrationMap.addEntry(entry);
AbstractTableModel model = (AbstractTableModel)myTable.getModel();
model.fireTableRowsInserted(myMigrationMap.getEntryCount() - 1, myMigrationMap.getEntryCount() - 1);
myTable.setRowSelectionInterval(myMigrationMap.getEntryCount() - 1, myMigrationMap.getEntryCount() - 1);
}
示例4: addRow
import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void addRow() {
EditMigrationEntryDialog dialog = new EditMigrationEntryDialog(myProject);
MigrationMapEntry entry = new MigrationMapEntry();
dialog.setEntry(entry);
dialog.show();
if (!dialog.isOK()){
return;
}
dialog.updateEntry(entry);
myMigrationMap.addEntry(entry);
AbstractTableModel model = (AbstractTableModel)myTable.getModel();
model.fireTableRowsInserted(myMigrationMap.getEntryCount() - 1, myMigrationMap.getEntryCount() - 1);
myTable.setRowSelectionInterval(myMigrationMap.getEntryCount() - 1, myMigrationMap.getEntryCount() - 1);
}
示例5: addRow
import javax.swing.table.AbstractTableModel; //导入方法依赖的package包/类
private void addRow()
{
EditMigrationEntryDialog dialog = new EditMigrationEntryDialog(myProject);
MigrationMapEntry entry = new MigrationMapEntry();
dialog.setEntry(entry);
if(!dialog.showAndGet())
{
return;
}
dialog.updateEntry(entry);
myMigrationMap.addEntry(entry);
AbstractTableModel model = (AbstractTableModel) myTable.getModel();
model.fireTableRowsInserted(myMigrationMap.getEntryCount() - 1, myMigrationMap.getEntryCount() - 1);
myTable.setRowSelectionInterval(myMigrationMap.getEntryCount() - 1, myMigrationMap.getEntryCount() - 1);
}