当前位置: 首页>>代码示例>>Java>>正文


Java JBTable.getModel方法代码示例

本文整理汇总了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();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ImportLayoutPanel.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:PackagePanel.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:VcsLogImpl.java

示例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>();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ColumnTreeBuilder.java

示例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());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:CodeStyleImportsPanel.java


注:本文中的com.intellij.ui.table.JBTable.getModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。