本文整理汇总了Java中com.intellij.ui.table.JBTable.getModel方法的典型用法代码示例。如果您正苦于以下问题:Java JBTable.getModel方法的具体用法?Java JBTable.getModel怎么用?Java JBTable.getModel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.table.JBTable
的用法示例。
在下文中一共展示了JBTable.getModel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: refreshTableModel
import com.intellij.ui.table.JBTable; //导入方法依赖的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();
}
}
示例2: removeEntryFromPackages
import com.intellij.ui.table.JBTable; //导入方法依赖的package包/类
private static void removeEntryFromPackages(JBTable table, PackageEntryTable list) {
int selected = table.getSelectedRow();
if (selected < 0) return;
TableUtil.stopEditing(table);
list.removeEntryAt(selected);
AbstractTableModel model = (AbstractTableModel)table.getModel();
model.fireTableRowsDeleted(selected, selected);
if (selected >= list.getEntryCount()) {
selected--;
}
if (selected >= 0) {
table.setRowSelectionInterval(selected, selected);
}
}
示例3: getSelectedDetails
import com.intellij.ui.table.JBTable; //导入方法依赖的package包/类
@NotNull
@Override
public List<VcsFullCommitDetails> getSelectedDetails() {
List<VcsFullCommitDetails> details = ContainerUtil.newArrayList();
JBTable table = myUi.getTable();
for (int row : table.getSelectedRows()) {
GraphTableModel model = (GraphTableModel)table.getModel();
VcsFullCommitDetails commitDetails = model.getFullCommitDetails(row);
if (commitDetails == null) {
return ContainerUtil.emptyList();
}
details.add(commitDetails);
}
return details;
}
示例4: ColumnTreeBuilder
import com.intellij.ui.table.JBTable; //导入方法依赖的package包/类
public ColumnTreeBuilder(@NotNull JTree tree) {
myTree = tree;
myTableModel = new DefaultTableModel();
myTable = new JBTable(myTableModel);
myCellRenderer = new ColumnTreeCellRenderer(myTree, myTable.getColumnModel());
myRowSorter = new TableRowSorter<TableModel>(myTable.getModel());
myColumBuilders = new LinkedList<ColumnBuilder>();
}
示例5: refreshTable
import com.intellij.ui.table.JBTable; //导入方法依赖的package包/类
private void refreshTable(final JBTable table, final PackageEntryTable packageTable) {
AbstractTableModel model = (AbstractTableModel)table.getModel();
table.createDefaultColumnsFromModel();
model.fireTableDataChanged();
ImportLayoutPanel.resizeColumns(packageTable, table, myImportLayoutPanel.areStaticImportsEnabled());
}