Search in sources :

Example 11 with JBCheckBox

use of com.intellij.ui.components.JBCheckBox in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineDeploymentConfigurationPanel method createUIComponents.

private void createUIComponents() {
    hiddenValidationTrigger = new JBCheckBox();
    hiddenValidationTrigger.setVisible(false);
    projectSelector = new ProjectSelector(ideProject);
}
Also used : JBCheckBox(com.intellij.ui.components.JBCheckBox) ProjectSelector(com.google.cloud.tools.intellij.project.ProjectSelector)

Example 12 with JBCheckBox

use of com.intellij.ui.components.JBCheckBox in project google-cloud-intellij by GoogleCloudPlatform.

the class CloudDebugRunConfigurationPanel method createUIComponents.

private void createUIComponents() {
    hiddenValidationTrigger = new JBCheckBox();
    hiddenValidationTrigger.setVisible(false);
    projectSelector = new ProjectSelector(ideProject);
    projectSelector.addProjectSelectionListener((selectedProject) -> {
        // settings editor does not see all the changes by default, use explicit notification.
        triggerValidation();
    });
}
Also used : JBCheckBox(com.intellij.ui.components.JBCheckBox) ProjectSelector(com.google.cloud.tools.intellij.project.ProjectSelector)

Example 13 with JBCheckBox

use of com.intellij.ui.components.JBCheckBox in project intellij-community by JetBrains.

the class SingleInspectionProfilePanel method createInspectionProfileSettingsPanel.

private JPanel createInspectionProfileSettingsPanel() {
    myBrowser = new JEditorPane(UIUtil.HTML_MIME, EMPTY_HTML);
    myBrowser.setEditable(false);
    myBrowser.setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 5, 5));
    myBrowser.addHyperlinkListener(new HyperlinkAdapter() {

        @Override
        protected void hyperlinkActivated(HyperlinkEvent e) {
            String description = e.getDescription();
            if (description.startsWith(SETTINGS)) {
                String configId = description.substring(SETTINGS.length());
                DataContext context = DataManager.getInstance().getDataContextFromFocus().getResult();
                if (context != null) {
                    Settings settings = Settings.KEY.getData(context);
                    if (settings != null) {
                        settings.select(settings.find(configId));
                    }
                }
            } else {
                BrowserUtil.browse(description);
            }
        }
    });
    initToolStates();
    fillTreeData(myProfileFilter != null ? myProfileFilter.getFilter() : null, true);
    JPanel descriptionPanel = new JPanel(new BorderLayout());
    descriptionPanel.setBorder(IdeBorderFactory.createTitledBorder(InspectionsBundle.message("inspection.description.title"), false, new JBInsets(2, 2, 0, 0)));
    descriptionPanel.add(ScrollPaneFactory.createScrollPane(myBrowser), BorderLayout.CENTER);
    JBSplitter rightSplitter = new JBSplitter(true, "SingleInspectionProfilePanel.HORIZONTAL_DIVIDER_PROPORTION", DIVIDER_PROPORTION_DEFAULT);
    rightSplitter.setFirstComponent(descriptionPanel);
    myOptionsPanel = new JPanel(new GridBagLayout());
    initOptionsAndDescriptionPanel();
    rightSplitter.setSecondComponent(myOptionsPanel);
    rightSplitter.setHonorComponentsMinimumSize(true);
    final JScrollPane tree = initTreeScrollPane();
    final JPanel northPanel = new JPanel(new GridBagLayout());
    northPanel.setBorder(IdeBorderFactory.createEmptyBorder(2, 0, 2, 0));
    myProfileFilter.setPreferredSize(new Dimension(20, myProfileFilter.getPreferredSize().height));
    northPanel.add(myProfileFilter, new GridBagConstraints(0, 0, 1, 1, 0.5, 1, GridBagConstraints.BASELINE_TRAILING, GridBagConstraints.HORIZONTAL, JBUI.emptyInsets(), 0, 0));
    northPanel.add(createTreeToolbarPanel().getComponent(), new GridBagConstraints(1, 0, 1, 1, 1, 1, GridBagConstraints.BASELINE_LEADING, GridBagConstraints.HORIZONTAL, JBUI.emptyInsets(), 0, 0));
    JBSplitter mainSplitter = new OnePixelSplitter(false, DIVIDER_PROPORTION_DEFAULT, 0.01f, 0.99f);
    mainSplitter.setSplitterProportionKey("SingleInspectionProfilePanel.VERTICAL_DIVIDER_PROPORTION");
    mainSplitter.setFirstComponent(tree);
    mainSplitter.setSecondComponent(rightSplitter);
    mainSplitter.setHonorComponentsMinimumSize(false);
    final JPanel inspectionTreePanel = new JPanel(new BorderLayout());
    inspectionTreePanel.add(northPanel, BorderLayout.NORTH);
    inspectionTreePanel.add(mainSplitter, BorderLayout.CENTER);
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(inspectionTreePanel, BorderLayout.CENTER);
    final JBCheckBox disableNewInspectionsCheckBox = new JBCheckBox("Disable new inspections by default", getProfile().isProfileLocked());
    panel.add(disableNewInspectionsCheckBox, BorderLayout.SOUTH);
    disableNewInspectionsCheckBox.addItemListener(new ItemListener() {

        @Override
        public void itemStateChanged(ItemEvent e) {
            final boolean enabled = disableNewInspectionsCheckBox.isSelected();
            final InspectionProfileImpl profile = getProfile();
            if (profile != null) {
                profile.lockProfile(enabled);
            }
        }
    });
    return panel;
}
Also used : ItemEvent(java.awt.event.ItemEvent) JBInsets(com.intellij.util.ui.JBInsets) JBCheckBox(com.intellij.ui.components.JBCheckBox) ItemListener(java.awt.event.ItemListener) Settings(com.intellij.openapi.options.ex.Settings)

Example 14 with JBCheckBox

use of com.intellij.ui.components.JBCheckBox in project intellij-community by JetBrains.

the class GrInplaceParameterIntroducer method getComponent.

@Override
protected JComponent getComponent() {
    JPanel previewPanel = new JPanel(new BorderLayout());
    previewPanel.add(getPreviewEditor().getComponent(), BorderLayout.CENTER);
    previewPanel.setBorder(new EmptyBorder(2, 2, 6, 2));
    myDelegateCB = new JBCheckBox("Delegate via overloading method");
    myDelegateCB.setMnemonic('l');
    myDelegateCB.setFocusable(false);
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(previewPanel, BorderLayout.CENTER);
    panel.add(myDelegateCB, BorderLayout.SOUTH);
    return panel;
}
Also used : EmptyBorder(javax.swing.border.EmptyBorder) JBCheckBox(com.intellij.ui.components.JBCheckBox)

Example 15 with JBCheckBox

use of com.intellij.ui.components.JBCheckBox in project intellij-community by JetBrains.

the class RedmineRepositoryEditor method createCustomPanel.

@Nullable
@Override
protected JComponent createCustomPanel() {
    myProjectLabel = new JBLabel("Project:", SwingConstants.RIGHT);
    myProjectCombo = new ComboBox(300);
    //myProjectCombo.setRenderer(new TaskUiUtil.SimpleComboBoxRenderer("Set URL and password/token first"));
    myProjectCombo.setRenderer(new ListCellRendererWrapper<RedmineProjectItem>() {

        @Override
        public void customize(JList list, RedmineProjectItem value, int index, boolean selected, boolean hasFocus) {
            if (value == null) {
                setText("Set URL and password/token first");
            } else {
                if (myProjectCombo.isPopupVisible()) {
                    //if (value.myLevel == 0 && value.myProject != RedmineRepository.UNSPECIFIED_PROJECT) {
                    //setFont(UIUtil.getListFont().deriveFont(Font.BOLD));
                    //}
                    setText(StringUtil.repeat("   ", value.myLevel) + value.myProject.getName());
                } else {
                    // Do not indent selected project
                    setText(value.myProject.getName());
                }
            }
        }
    });
    myAPIKeyLabel = new JBLabel("API Token:", SwingConstants.RIGHT);
    myAPIKey = new JPasswordField();
    myAllAssigneesCheckBox = new JBCheckBox("Include issues not assigned to me");
    return FormBuilder.createFormBuilder().addLabeledComponent(myAPIKeyLabel, myAPIKey).addLabeledComponent(myProjectLabel, myProjectCombo).addComponentToRightColumn(myAllAssigneesCheckBox).getPanel();
}
Also used : JBLabel(com.intellij.ui.components.JBLabel) ComboBox(com.intellij.openapi.ui.ComboBox) JBCheckBox(com.intellij.ui.components.JBCheckBox) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

JBCheckBox (com.intellij.ui.components.JBCheckBox)28 JBLabel (com.intellij.ui.components.JBLabel)10 Nullable (org.jetbrains.annotations.Nullable)5 ComboBox (com.intellij.openapi.ui.ComboBox)4 JBTextField (com.intellij.ui.components.JBTextField)4 GridBag (com.intellij.util.ui.GridBag)4 NotNull (org.jetbrains.annotations.NotNull)4 TextFieldWithBrowseButton (com.intellij.openapi.ui.TextFieldWithBrowseButton)3 ActionEvent (java.awt.event.ActionEvent)3 ProjectSelector (com.google.cloud.tools.intellij.project.ProjectSelector)2 ZenCodingFilter (com.intellij.codeInsight.template.emmet.filters.ZenCodingFilter)2 FileChooserDescriptor (com.intellij.openapi.fileChooser.FileChooserDescriptor)2 ActionListener (java.awt.event.ActionListener)2 ItemEvent (java.awt.event.ItemEvent)2 ItemListener (java.awt.event.ItemListener)2 PhoneGapTargets (com.github.masahirosuzuka.PhoneGapIntelliJPlugin.commandLine.PhoneGapTargets)1 Option (com.intellij.codeInsight.hints.Option)1 EnvironmentVariablesTextFieldWithBrowseButton (com.intellij.execution.configuration.EnvironmentVariablesTextFieldWithBrowseButton)1 FacetEditorValidator (com.intellij.facet.ui.FacetEditorValidator)1 FacetValidatorsManager (com.intellij.facet.ui.FacetValidatorsManager)1