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

项目:ApiDebugger    文件:FormDataTableCellEditor.java   
public FormDataTableCellEditor(Project project, JBDebuggerFormTable.ItemInfo itemInfo) {
    component = new JPanel(new BorderLayout());
    editor = new EditorTextField("", project, StdFileTypes.PLAIN_TEXT);
    component.add(editor, BorderLayout.CENTER);
    combobox = new ComboBoxWithWidePopup<>(ContainerUtil.ar("Text", "File"));
    combobox.setSelectedItem(StringUtil.isEmpty(itemInfo.type) ? "Text" : itemInfo.type);
    combobox.setFocusable(false);
    combobox.addItemListener(e -> {
        if (e.getStateChange() == ItemEvent.SELECTED) {
            itemInfo.type = e.getItem().toString();
        }
    });
    component.add(combobox, BorderLayout.EAST);
}
项目:tools-idea    文件:FramesPanel.java   
public FramesPanel(Project project, DebuggerStateManager stateManager) {
  super(project, stateManager);
  myStateManager = stateManager;

  setLayout(new BorderLayout());

  myThreadsCombo = new ComboBoxWithWidePopup();
  myThreadsCombo.setRenderer(new DebuggerComboBoxRenderer(myThreadsCombo.getRenderer()));
  myThreadsListener = new ThreadsListener();
  myThreadsCombo.addItemListener(myThreadsListener);

  myFramesList = new FramesList(project);
  myFramesListener = new FramesListener();
  myFramesList.addListSelectionListener(myFramesListener);

  myFramesList.addMouseListener(new MouseAdapter() {
    public void mousePressed(final MouseEvent e) {
      int index = myFramesList.locationToIndex(e.getPoint());
      if (index >= 0 && myFramesList.isSelectedIndex(index)) {
        processListValue(myFramesList.getModel().getElementAt(index));
      }
    }
  });

  registerThreadsPopupMenu(myFramesList);

  setBorder(null);

  final ActionToolbar toolbar = createToolbar();
  Wrapper threads = new Wrapper();
  CustomLineBorder border = new CustomLineBorder(CaptionPanel.CNT_ACTIVE_BORDER_COLOR, 0, 0, 1, 0);
  threads.setBorder(border);
  threads.add(toolbar.getComponent(), BorderLayout.EAST);
  threads.add(myThreadsCombo, BorderLayout.CENTER);
  add(threads, BorderLayout.NORTH);
  add(ScrollPaneFactory.createScrollPane(myFramesList), BorderLayout.CENTER);
}
项目:intellij-ce-playground    文件:DestinationFolderComboBox.java   
public DestinationFolderComboBox() {
  super(new ComboBoxWithWidePopup());
}
项目:tools-idea    文件:DestinationFolderComboBox.java   
public DestinationFolderComboBox() {
  super(new ComboBoxWithWidePopup());
}
项目:consulo-java    文件:DestinationFolderComboBox.java   
public DestinationFolderComboBox() {
  super(new ComboBoxWithWidePopup());
}