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);
}
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();
});
}
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;
}
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;
}
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();
}
Aggregations