Java 类com.intellij.ui.treeStructure.treetable.TreeTableModel 实例源码

项目:intellij-ce-playground    文件:DualView.java   
private ColumnInfo[] createTreeColumns(DualViewColumnInfo[] columns) {
  Collection<ColumnInfo> result = new ArrayList<ColumnInfo>();

  final ColumnInfo firstColumn = columns[0];
  ColumnInfo firstTreeColumn = new ColumnInfo(firstColumn.getName()) {
    public Object valueOf(Object object) {
      return firstColumn.valueOf(object);
    }

    public Class getColumnClass() {
      return TreeTableModel.class;
    }

    public boolean isCellEditable(Object o) {
      return true;
    }
  };
  result.add(firstTreeColumn);
  for (int i = 1; i < columns.length; i++) {
    DualViewColumnInfo column = columns[i];
    if (column.shouldBeShownIsTheTree()) result.add(column);
  }

  return result.toArray(new ColumnInfo[result.size()]);
}
项目:tools-idea    文件:DualView.java   
private ColumnInfo[] createTreeColumns(DualViewColumnInfo[] columns) {
  Collection<ColumnInfo> result = new ArrayList<ColumnInfo>();

  final ColumnInfo firstColumn = columns[0];
  ColumnInfo firstTreeColumn = new ColumnInfo(firstColumn.getName()) {
    public Object valueOf(Object object) {
      return firstColumn.valueOf(object);
    }

    public Class getColumnClass() {
      return TreeTableModel.class;
    }

    public boolean isCellEditable(Object o) {
      return true;
    }
  };
  result.add(firstTreeColumn);
  for (int i = 1; i < columns.length; i++) {
    DualViewColumnInfo column = columns[i];
    if (column.shouldBeShownIsTheTree()) result.add(column);
  }

  return result.toArray(new ColumnInfo[result.size()]);
}
项目:consulo    文件:DualView.java   
private ColumnInfo[] createTreeColumns(DualViewColumnInfo[] columns) {
  Collection<ColumnInfo> result = new ArrayList<ColumnInfo>();

  final ColumnInfo firstColumn = columns[0];
  ColumnInfo firstTreeColumn = new ColumnInfo(firstColumn.getName()) {
    public Object valueOf(Object object) {
      return firstColumn.valueOf(object);
    }

    public Class getColumnClass() {
      return TreeTableModel.class;
    }

    public boolean isCellEditable(Object o) {
      return true;
    }
  };
  result.add(firstTreeColumn);
  for (int i = 1; i < columns.length; i++) {
    DualViewColumnInfo column = columns[i];
    if (column.shouldBeShownIsTheTree()) result.add(column);
  }

  return result.toArray(new ColumnInfo[result.size()]);
}
项目:intellij-ce-playground    文件:ActionsTree.java   
public Class getColumnClass(int column) {
  if (column == 0) {
    return TreeTableModel.class;
  }
  else {
    return Object.class;
  }
}
项目:intellij-ce-playground    文件:InspectionsConfigTreeTable.java   
@Override
public Class getColumnClass(final int column) {
  switch (column) {
    case TREE_COLUMN:
      return TreeTableModel.class;
    case SEVERITIES_COLUMN:
      return Icon.class;
    case IS_ENABLED_COLUMN:
      return Boolean.class;
  }
  throw new IllegalArgumentException();
}
项目:intellij-ce-playground    文件:AbstractFileTreeTable.java   
@Override
public TreeTableCellRenderer createTableRenderer(TreeTableModel treeTableModel) {
  TreeTableCellRenderer tableRenderer = super.createTableRenderer(treeTableModel);
  UIUtil.setLineStyleAngled(tableRenderer);
  tableRenderer.setRootVisible(false);
  tableRenderer.setShowsRootHandles(true);

  return tableRenderer;
}
项目:intellij-ce-playground    文件:AbstractFileTreeTable.java   
@Override
public Class getColumnClass(final int column) {
  switch (column) {
    case 0:
      return TreeTableModel.class;
    case 1:
      return myValueClass;
    default:
      throw new RuntimeException("invalid column " + column);
  }
}
项目:vso-intellij    文件:CustomTreeTable.java   
public TreeTableCellRenderer createTableRenderer(final TreeTableModel treeTableModel) {
    return new TreeTableCellRenderer(this, getTree()) {
        public Component getTableCellRendererComponent(final JTable table,
                                                       final Object value,
                                                       final boolean isSelected,
                                                       final boolean hasFocus,
                                                       final int row,
                                                       final int column) {
            return super.getTableCellRendererComponent(table, value, showSelection && isSelected, showCellFocus && hasFocus, row, column);
        }
    };
}
项目:vso-intellij    文件:CustomTreeTable.java   
private static <T> TreeTableModel createModel(final Collection<? extends TreeTableColumn<T>> columns,
                                              final ContentProvider<T> contentProvider) {
    final Collection<ColumnInfo> columnsInfos = new ArrayList<ColumnInfo>(columns.size());
    boolean first = true;
    for (final TreeTableColumn<T> column : columns) {
        if (first) {
            columnsInfos.add(new TreeColumnInfo(column.getCaption()));
        } else {
            columnsInfos.add(new ColumnInfo(column.getCaption()) {
                public Object valueOf(final Object o) {
                    return o;
                }

                public Class getColumnClass() {
                    return TableColumnMarker.class;
                }
            });
        }
        first = false;
    }

    final DefaultMutableTreeNode root;
    final Collection<? extends T> rootObjects = contentProvider.getRoots();
    if (!rootObjects.isEmpty()) {
        if (rootObjects.size() == 1) {
            root = new DefaultMutableTreeNode(rootObjects.iterator().next());
            addChildren(root, contentProvider);
        } else {
            root = new DefaultMutableTreeNode(HIDDEN_ROOT);
            for (final T rootObject : rootObjects) {
                final DefaultMutableTreeNode subRoot = new DefaultMutableTreeNode(rootObject);
                addChildren(subRoot, contentProvider);
                root.add(subRoot);
            }
        }
    } else {
        root = null;
    }
    return new ListTreeTableModelOnColumns(root, columnsInfos.toArray(new ColumnInfo[columnsInfos.size()]));
}
项目:tools-idea    文件:ActionsTree.java   
public Class getColumnClass(int column) {
  if (column == 0) {
    return TreeTableModel.class;
  }
  else {
    return Object.class;
  }
}
项目:tools-idea    文件:AbstractFileTreeTable.java   
@Override
public TreeTableCellRenderer createTableRenderer(TreeTableModel treeTableModel) {
  TreeTableCellRenderer tableRenderer = super.createTableRenderer(treeTableModel);
  UIUtil.setLineStyleAngled(tableRenderer);
  tableRenderer.setRootVisible(false);
  tableRenderer.setShowsRootHandles(true);

  return tableRenderer;
}
项目:tools-idea    文件:AbstractFileTreeTable.java   
@Override
public Class getColumnClass(final int column) {
  switch (column) {
    case 0:
      return TreeTableModel.class;
    case 1:
      return myValueClass;
    default:
      throw new RuntimeException("invalid column " + column);
  }
}
项目:consulo    文件:ActionsTree.java   
public Class getColumnClass(int column) {
  if (column == 0) {
    return TreeTableModel.class;
  }
  else {
    return Object.class;
  }
}
项目:consulo    文件:NotificationsConfigurablePanel.java   
@Override
public Class getColumnClass(int column) {
  if (NotificationsTreeTable.DISPLAY_TYPE_COLUMN == column) {
    return NotificationDisplayType.class;
  }
  if (NotificationsTreeTable.LOG_COLUMN == column) {
    return Boolean.class;
  }
  if (NotificationsTreeTable.READ_ALOUD_COLUMN == column) {
    return Boolean.class;
  }

  return TreeTableModel.class;
}
项目:consulo    文件:InspectionsConfigTreeTable.java   
@Override
public Class getColumnClass(final int column) {
  switch (column) {
    case TREE_COLUMN:
      return TreeTableModel.class;
    case SEVERITIES_COLUMN:
      return Icon.class;
    case IS_ENABLED_COLUMN:
      return Boolean.class;
  }
  throw new IllegalArgumentException();
}
项目:consulo    文件:AbstractFileTreeTable.java   
@Override
public TreeTableCellRenderer createTableRenderer(TreeTableModel treeTableModel) {
  TreeTableCellRenderer tableRenderer = super.createTableRenderer(treeTableModel);
  UIUtil.setLineStyleAngled(tableRenderer);
  tableRenderer.setRootVisible(false);
  tableRenderer.setShowsRootHandles(true);

  return tableRenderer;
}
项目:consulo    文件:AbstractFileTreeTable.java   
@Override
public Class getColumnClass(final int column) {
  switch (column) {
    case 0:
      return TreeTableModel.class;
    case 1:
      return myValueClass;
    default:
      throw new RuntimeException("invalid column " + column);
  }
}
项目:intellij-ce-playground    文件:OptionTableWithPreviewPanel.java   
@Override
public Class getColumnClass() {
  return TreeTableModel.class;
}
项目:intellij-ce-playground    文件:VmStatsTreeTableModel.java   
@Override
public Class getColumnClass(int column) {
  return column == 0 ? TreeTableModel.class : String.class;
}
项目:intellij-ce-playground    文件:AddMultipleFilesOptionsDialog.java   
public Class getColumnClass() {
  return TreeTableModel.class;
}
项目:intellij-ce-playground    文件:DynamicToolWindowWrapper.java   
@Override
public Class getColumnClass() {
  return TreeTableModel.class;
}
项目:intellij-ce-playground    文件:DynamicToolWindowWrapper.java   
public MyTreeTable(TreeTableModel treeTableModel) {
  super(treeTableModel);
}
项目:vso-intellij    文件:WorkItemsTableModel.java   
@Override
public Class<?> getColumnClass() {
  // Such column class indicates that this column will be used as tree - indentations, icons, etc. will be displayed in this column
  return TreeTableModel.class;
}
项目:tools-idea    文件:OptionTableWithPreviewPanel.java   
@Override
public Class getColumnClass() {
  return TreeTableModel.class;
}
项目:tools-idea    文件:AddMultipleFilesOptionsDialog.java   
public Class getColumnClass() {
  return TreeTableModel.class;
}
项目:tools-idea    文件:DynamicToolWindowWrapper.java   
public Class getColumnClass() {
  return TreeTableModel.class;
}
项目:tools-idea    文件:DynamicToolWindowWrapper.java   
public MyTreeTable(TreeTableModel treeTableModel) {
  super(treeTableModel);
}
项目:nosql4idea    文件:JsonTreeTableView.java   
@Override
public Class getColumnClass() {
    return TreeTableModel.class;
}
项目:consulo    文件:OptionTableWithPreviewPanel.java   
@Override
public Class getColumnClass() {
  return TreeTableModel.class;
}