Java 类com.intellij.ui.dualView.DualView 实例源码

项目:intellij-ce-playground    文件:TableLinkMouseListener.java   
@Override
@Nullable
public Object getTagAt(@NotNull final MouseEvent e) {
  // TODO[yole]: don't update renderer on every event, like it's done in TreeLinkMouseListener
  Object tag;
  JTable table = (JTable)e.getSource();
  int row = table.rowAtPoint(e.getPoint());
  int column = table.columnAtPoint(e.getPoint());
  if (row == -1 || column == -1) return null;
  TableCellRenderer cellRenderer = table.getCellRenderer(row, column);
  if (cellRenderer instanceof DualView.TableCellRendererWrapper) {
    cellRenderer = ((DualView.TableCellRendererWrapper) cellRenderer).getRenderer();
  }
  if (cellRenderer instanceof TreeTableView.CellRendererWrapper) {
    cellRenderer = ((TreeTableView.CellRendererWrapper) cellRenderer).getBaseRenderer();
  }
  if (cellRenderer instanceof ColoredTableCellRenderer) {
    final ColoredTableCellRenderer renderer = (ColoredTableCellRenderer)cellRenderer;
    tag = forColoredRenderer(e, table, row, column, renderer);
  } else {
    tag = tryGetTag(e, table, row, column);
  }
  return tag;
}
项目:tools-idea    文件:TableLinkMouseListener.java   
@Nullable
protected Object getTagAt(final MouseEvent e) {
  // TODO[yole]: don't update renderer on every event, like it's done in TreeLinkMouseListener
  Object tag = null;
  JTable table = (JTable)e.getSource();
  int row = table.rowAtPoint(e.getPoint());
  int column = table.columnAtPoint(e.getPoint());
  if (row == -1 || column == -1) return null;
  TableCellRenderer cellRenderer = table.getCellRenderer(row, column);
  if (cellRenderer instanceof DualView.TableCellRendererWrapper) {
    cellRenderer = ((DualView.TableCellRendererWrapper) cellRenderer).getRenderer();
  }
  if (cellRenderer instanceof TreeTableView.CellRendererWrapper) {
    cellRenderer = ((TreeTableView.CellRendererWrapper) cellRenderer).getBaseRenderer();
  }
  if (cellRenderer instanceof ColoredTableCellRenderer) {
    final ColoredTableCellRenderer renderer = (ColoredTableCellRenderer)cellRenderer;
    tag = forColoredRenderer(e, table, row, column, renderer);
  } else {
    tag = tryGetTag(e, table, row, column);
  }
  return tag;
}
项目:consulo    文件:TableLinkMouseListener.java   
@Nullable
public Object getTagAt(final MouseEvent e) {
  // TODO[yole]: don't update renderer on every event, like it's done in TreeLinkMouseListener
  Object tag = null;
  JTable table = (JTable)e.getSource();
  int row = table.rowAtPoint(e.getPoint());
  int column = table.columnAtPoint(e.getPoint());
  if (row == -1 || column == -1) return null;
  TableCellRenderer cellRenderer = table.getCellRenderer(row, column);
  if (cellRenderer instanceof DualView.TableCellRendererWrapper) {
    cellRenderer = ((DualView.TableCellRendererWrapper) cellRenderer).getRenderer();
  }
  if (cellRenderer instanceof TreeTableView.CellRendererWrapper) {
    cellRenderer = ((TreeTableView.CellRendererWrapper) cellRenderer).getBaseRenderer();
  }
  if (cellRenderer instanceof ColoredTableCellRenderer) {
    final ColoredTableCellRenderer renderer = (ColoredTableCellRenderer)cellRenderer;
    tag = forColoredRenderer(e, table, row, column, renderer);
  } else {
    tag = tryGetTag(e, table, row, column);
  }
  return tag;
}
项目:consulo    文件:FileHistoryPanelImpl.java   
@Nonnull
private DualViewColumnInfo[] createColumnList(@Nonnull Project project,
                                              @Nonnull VcsHistoryProvider provider,
                                              @Nullable ColumnInfo[] additionalColumns) {
  ArrayList<DualViewColumnInfo> columns = new ArrayList<>();
  columns.add(new RevisionColumnInfo(myRevisionsInOrderComparator));
  if (!provider.isDateOmittable()) columns.add(new DateColumnInfo());
  columns.add(new AuthorColumnInfo());
  ArrayList<DualViewColumnInfo> additionalColumnInfo = new ArrayList<>();
  if (additionalColumns != null) {
    for (ColumnInfo additionalColumn : additionalColumns) {
      additionalColumnInfo.add(new FileHistoryColumnWrapper(additionalColumn) {
        @Override
        protected DualView getDualView() {
          return myDualView;
        }
      });
    }
  }
  columns.addAll(additionalColumnInfo);
  columns.add(new MessageColumnInfo(project));
  return columns.toArray(new DualViewColumnInfo[columns.size()]);
}
项目:consulo    文件:FileHistoryColumnWrapper.java   
protected abstract DualView getDualView();