Java 类com.intellij.util.ui.ComboBoxCellEditor 实例源码

项目:intellij-ce-playground    文件:DetectedRootsChooserDialog.java   
@Override
public TableCellEditor getEditor(VirtualFileCheckedTreeNode o) {
  final SuggestedChildRootInfo rootInfo = o.getRootInfo();
  if (rootInfo == null) return null;
  final ComboBoxCellEditor editor = new ComboBoxCellEditor() {
    @Override
    protected List<String> getComboBoxItems() {
      return Arrays.asList(rootInfo.getRootTypeNames());
    }
  };
  editor.setClickCountToStart(1);
  return editor;
}
项目:tools-idea    文件:DetectedRootsChooserDialog.java   
@Override
public TableCellEditor getEditor(VirtualFileCheckedTreeNode o) {
  final SuggestedChildRootInfo rootInfo = o.getRootInfo();
  if (rootInfo == null) return null;
  final ComboBoxCellEditor editor = new ComboBoxCellEditor() {
    @Override
    protected List<String> getComboBoxItems() {
      return Arrays.asList(rootInfo.getRootTypeNames());
    }
  };
  editor.setClickCountToStart(1);
  return editor;
}
项目:consulo    文件:ContentFolderPropertiesDialog.java   
@Nullable
@Override
public TableCellEditor getEditor(final Item o) {
  return new ComboBoxCellEditor() {
    @Override
    protected List<String> getComboBoxItems() {
      Object[] values = o.myProvider.getValues();
      List<String> items = new ArrayList<String>();
      for (Object value : values) {
        items.add(String.valueOf(value));
      }
      return items;
    }
  };
}
项目:consulo    文件:DetectedRootsChooserDialog.java   
@Override
public TableCellEditor getEditor(VirtualFileCheckedTreeNode o) {
  final SuggestedChildRootInfo rootInfo = o.getRootInfo();
  if (rootInfo == null) return null;
  final ComboBoxCellEditor editor = new ComboBoxCellEditor() {
    @Override
    protected List<String> getComboBoxItems() {
      return Arrays.asList(rootInfo.getRootTypeNames());
    }
  };
  editor.setClickCountToStart(1);
  return editor;
}