Java 类com.intellij.openapi.ui.StripeTable 实例源码

项目:intellij-ce-playground    文件:UiInspectorAction.java   
private InspectorTable(@NotNull final Component component) {
  setLayout(new BorderLayout());

  myModel = new InspectorTableModel(component);
  StripeTable table = new StripeTable(myModel);
  new TableSpeedSearch(table);

  TableColumnModel columnModel = table.getColumnModel();
  TableColumn propertyColumn = columnModel.getColumn(0);
  propertyColumn.setMinWidth(150);
  propertyColumn.setMaxWidth(150);
  propertyColumn.setResizable(false);

  TableColumn valueColumn = columnModel.getColumn(1);
  valueColumn.setMinWidth(200);
  valueColumn.setResizable(false);
  valueColumn.setCellRenderer(new ValueCellRenderer());

  table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);

  add(new JBScrollPane(table), BorderLayout.CENTER);
  myDimensionComponent = new DimensionsComponent(component);
  add(myDimensionComponent, BorderLayout.SOUTH);
}
项目:tools-idea    文件:UiInspectorAction.java   
private InspectorTable(@NotNull final Component component) {
  setLayout(new BorderLayout());

  myTitleLabel = new JLabel(component.getClass().getCanonicalName(), SwingConstants.CENTER);
  myModel = new InspectorTableModel(component);
  final StripeTable table = new StripeTable(myModel);

  TableColumnModel columnModel = table.getColumnModel();
  TableColumn propertyColumn = columnModel.getColumn(0);
  propertyColumn.setMinWidth(150);
  propertyColumn.setMaxWidth(150);
  propertyColumn.setResizable(false);

  TableColumn valueColumn = columnModel.getColumn(1);
  valueColumn.setMinWidth(200);
  valueColumn.setResizable(false);
  valueColumn.setCellRenderer(new ValueCellRenderer());

  table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);

  add(myTitleLabel, BorderLayout.NORTH);
  add(new JBScrollPane(table), BorderLayout.CENTER);
  myDimensionComponent = new DimensionsComponent(component);
  add(myDimensionComponent, BorderLayout.SOUTH);
}
项目:GradleConfirmation    文件:GradleConfirmationListDisableTaskNamesAction.java   
private void initColumnWidth(StripeTable table) {
    DefaultTableColumnModel columnModel = (DefaultTableColumnModel) table.getColumnModel();
    columnModel.getColumn(0).setPreferredWidth(300);
}