Search in sources :

Example 1 with VERTICAL

use of javax.swing.JList.VERTICAL in project sonarlint-intellij by SonarSource.

the class OrganizationStep method createUIComponents.

private void createUIComponents() {
    JBList list = new JBList();
    list.setLayoutOrientation(VERTICAL);
    list.setVisibleRowCount(8);
    list.setEnabled(true);
    list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    list.setCellRenderer(new ListRenderer());
    Convertor<Object, String> convertor = o -> {
        RemoteOrganization org = (RemoteOrganization) o;
        return org.getName() + " " + org.getKey();
    };
    new ListSpeedSearch(list, convertor);
    this.orgList = list;
}
Also used : JComponent(javax.swing.JComponent) ListSelectionModel(javax.swing.ListSelectionModel) JBList(com.intellij.ui.components.JBList) RemoteOrganization(org.sonarsource.sonarlint.core.client.api.connected.RemoteOrganization) CommitStepException(com.intellij.ide.wizard.CommitStepException) VERTICAL(javax.swing.JList.VERTICAL) Convertor(com.intellij.util.containers.Convertor) JList(javax.swing.JList) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) AbstractWizardStepEx(com.intellij.ide.wizard.AbstractWizardStepEx) ColoredListCellRenderer(com.intellij.ui.ColoredListCellRenderer) SimpleTextAttributes(com.intellij.ui.SimpleTextAttributes) NotNull(org.jetbrains.annotations.NotNull) JPanel(javax.swing.JPanel) ListSpeedSearch(com.intellij.ui.ListSpeedSearch) ListSpeedSearch(com.intellij.ui.ListSpeedSearch) RemoteOrganization(org.sonarsource.sonarlint.core.client.api.connected.RemoteOrganization) JBList(com.intellij.ui.components.JBList)

Aggregations

AbstractWizardStepEx (com.intellij.ide.wizard.AbstractWizardStepEx)1 CommitStepException (com.intellij.ide.wizard.CommitStepException)1 ColoredListCellRenderer (com.intellij.ui.ColoredListCellRenderer)1 ListSpeedSearch (com.intellij.ui.ListSpeedSearch)1 SimpleTextAttributes (com.intellij.ui.SimpleTextAttributes)1 JBList (com.intellij.ui.components.JBList)1 Convertor (com.intellij.util.containers.Convertor)1 List (java.util.List)1 JComponent (javax.swing.JComponent)1 JList (javax.swing.JList)1 VERTICAL (javax.swing.JList.VERTICAL)1 JPanel (javax.swing.JPanel)1 ListSelectionModel (javax.swing.ListSelectionModel)1 NotNull (org.jetbrains.annotations.NotNull)1 Nullable (org.jetbrains.annotations.Nullable)1 RemoteOrganization (org.sonarsource.sonarlint.core.client.api.connected.RemoteOrganization)1