Java 类com.intellij.util.ui.table.ComboBoxTableCellEditor 实例源码

项目:intellij-ce-playground    文件:GenerateAntBuildDialog.java   
private void initChunksPanel() {
  List<Chunk<Module>> chunks = getCycleChunks();
  if (chunks.isEmpty()) {
    return;
  }
  myChunksPanel.setLayout(new BorderLayout());
  myChunksPanel.setBorder(
    IdeBorderFactory.createTitledBorder(CompilerBundle.message("generate.ant.build.dialog.cyclic.modules.table.title"),
                                        true));
  JLabel textLabel = new JLabel(CompilerBundle.message("generate.ant.build.dialog.cyclic.modules.table.description"));
  textLabel.setUI(new MultiLineLabelUI());
  textLabel.setBorder(IdeBorderFactory.createEmptyBorder(4, 4, 6, 4));
  myChunksPanel.add(textLabel, BorderLayout.NORTH);

  myTableModel = new MyTableModel(chunks);
  myTable = new Table(myTableModel);
  final MyTableCellRenderer cellRenderer = new MyTableCellRenderer();
  final TableColumn nameColumn = myTable.getColumnModel().getColumn(MyTableModel.NAME_COLUMN);
  nameColumn.setCellEditor(ComboBoxTableCellEditor.INSTANCE);
  nameColumn.setCellRenderer(cellRenderer);
  final TableColumn labelColumn = myTable.getColumnModel().getColumn(MyTableModel.NUMBER_COLUMN);
  labelColumn.setCellRenderer(cellRenderer);

  final Dimension preferredSize = new Dimension(myTable.getPreferredSize());
  preferredSize.height = (myTableModel.getRowCount() + 2) * myTable.getRowHeight() + myTable.getTableHeader().getHeight();

  final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable);
  scrollPane.setPreferredSize(preferredSize);
  myChunksPanel.add(scrollPane, BorderLayout.CENTER);
}
项目:Azure-Toolkit-for-IntelliJ    文件:CachingPanel.java   
private void init() {
    Messages.configureMessagePaneUi(enblCacheNote, message("enblCachNtLbl"));
    cacheCheck.addItemListener(createCacheCheckListener());
    cacheScale.setPaintTicks(true);
    cacheScale.setMajorTickSpacing(10);
    cacheScale.addChangeListener(createCacheScaleListener());
    txtCache.addFocusListener(createTxtCacheListener());
    accLink.setAction(createAccLinkAction());
    comboStrgAcc.addItemListener(createcomboStrgAccListener());

    CacheTableModel myModel = new CacheTableModel(new ArrayList<WindowsAzureNamedCache>(mapCache.values()));
    tblCache.setModelAndUpdateColumns(myModel);
    tblCache.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    tblCache.setRowHeight(ComboBoxTableCellEditor.INSTANCE.getComponent().getPreferredSize().height);
}
项目:Azure-Toolkit-for-IntelliJ    文件:LocalStoragePanel.java   
public LocalStoragePanel(Module module, WindowsAzureProjectManager waProjManager, WindowsAzureRole waRole) {
    this.module = module;
    this.waProjManager = waProjManager;
    this.waRole = waRole;
    try {
        mapLclStg = waRole.getLocalStorage();
        LocalStorageTableModel myModel = new LocalStorageTableModel(new ArrayList<WindowsAzureLocalStorage>(mapLclStg.values()));
        tblResources.setModelAndUpdateColumns(myModel);
        tblResources.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        tblResources.setRowHeight(ComboBoxTableCellEditor.INSTANCE.getComponent().getPreferredSize().height);
    } catch (Exception e) {
        PluginUtil.displayErrorDialogAndLog(message("lclStgSetErrTtl"), message("lclStgSetErrMsg"), e);
    }
}
项目:intellij-ce-playground    文件:AddMultipleFilesOptionsDialog.java   
public TableCellEditor getEditor(Object item) {
  return ComboBoxTableCellEditor.INSTANCE;
}
项目:Azure-Toolkit-for-IntelliJ    文件:RoleEndpointsPanel.java   
private void init() {
    initializeModel();
    tblEndpoints.setRowHeight(ComboBoxTableCellEditor.INSTANCE.getComponent().getPreferredSize().height);
}
项目:Azure-Toolkit-for-IntelliJ    文件:RoleEndpointsPanel.java   
@Override
public TableCellEditor getEditor(final WindowsAzureEndpoint endpoint) {
    return ComboBoxTableCellEditor.INSTANCE;
}