Example usage for com.intellij.openapi.ui ComboBoxWithWidePopup ComboBoxWithWidePopup

List of usage examples for com.intellij.openapi.ui ComboBoxWithWidePopup ComboBoxWithWidePopup

Introduction

In this page you can find the example usage for com.intellij.openapi.ui ComboBoxWithWidePopup ComboBoxWithWidePopup.

Prototype

public ComboBoxWithWidePopup() 

Source Link

Usage

From source file:com.intellij.debugger.ui.FramesPanel.java

License:Apache License

public FramesPanel(Project project, DebuggerStateManager stateManager) {
    super(project, stateManager);
    myStateManager = stateManager;//from  w  w w .jav a  2 s  .c om

    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() {
        @Override
        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);
}

From source file:com.intellij.refactoring.move.moveClassesOrPackages.DestinationFolderComboBox.java

License:Apache License

public DestinationFolderComboBox() {
    super(new ComboBoxWithWidePopup());
}