com.intellij.ui.EnumComboBoxModel Java Examples

The following examples show how to use com.intellij.ui.EnumComboBoxModel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CleanUnshelvedFilterDialog.java    From consulo with Apache License 2.0 6 votes vote down vote up
public CleanUnshelvedFilterDialog(@Nullable Project project) {
  super(project);
  setTitle("Clean Unshelved Changelists");
  mySystemUnshelvedButton = new JRadioButton("created automatically", true);
  myUnshelvedWithFilterButton = new JRadioButton("older than one", false);
  myAllUnshelvedButton = new JRadioButton("all", false);
  myTimePeriodComboBox = new ComboBox(new EnumComboBoxModel<>(TimePeriod.class));
  myTimePeriodComboBox.setEnabled(myUnshelvedWithFilterButton.isSelected());
  myUnshelvedWithFilterButton.addItemListener(new ItemListener() {
    @Override
    public void itemStateChanged(ItemEvent e) {
      myTimePeriodComboBox.setEnabled(myUnshelvedWithFilterButton.isSelected());
    }
  });
  setOKButtonText("Delete");
  init();
  setResizable(false);
}
 
Example #2
Source File: SettingsDialog.java    From PackageTemplates with Apache License 2.0 5 votes vote down vote up
private void createLanguageViews() {
    jlLanguage = new JLabel(Localizer.get("settings.Language"));

    comboLanguages = new ComboBox(new EnumComboBoxModel<>(Language.class));
    if (SaveUtil.reader().getLanguage() != null) {
        comboLanguages.setSelectedItem(SaveUtil.reader().getLanguage());
    }
}
 
Example #3
Source File: OpenCypherGremlinDataSourceDialog.java    From jetbrains-plugin-graph-database-support with Apache License 2.0 5 votes vote down vote up
public OpenCypherGremlinDataSourceDialog(Project project, DataSourcesView dataSourcesView) {
    super(project, dataSourcesView);
    loadingPanel.setVisible(false);
    flavorField.setModel(new EnumComboBoxModel<>(GremlinFlavor.class));
    serializerField.setModel(new EnumComboBoxModel<>(Serializers.class));
    serializerField.setSelectedItem(GRAPHSON_V3D0);
    dataSourcesComponent = dataSourcesView.getComponent();
    testConnectionButton.addActionListener(e -> this.validationPopup());
    optimizeTranslatedQueriesCheckBox.addActionListener(e -> {
        LandingPageAction.open();
        optimizeTranslatedQueriesCheckBox.setSelected(false);
    });
    initValidation();
}
 
Example #4
Source File: ForceArrangementPanel.java    From consulo with Apache License 2.0 4 votes vote down vote up
public ForceArrangementPanel() {
  myForceRearrangeComboBox = new JComboBox();
  myForceRearrangeComboBox.setModel(new EnumComboBoxModel<SelectedMode>(SelectedMode.class));
  myForceRearrangeComboBox.setMaximumSize(myForceRearrangeComboBox.getPreferredSize());
  myPanel = createPanel();
}