use of com.intellij.ui.TitledSeparator in project android by JetBrains.
the class AndroidDeviceRenderer method renderTitledSeparator.
private static Component renderTitledSeparator(@NotNull String title) {
TitledSeparator separator = new TitledSeparator(title);
separator.setBackground(UIUtil.getListBackground());
separator.setTitleFont(UIUtil.getLabelFont());
return separator;
}
use of com.intellij.ui.TitledSeparator in project intellij-community by JetBrains.
the class SearchDialog method createCenterPanel.
@Override
protected JComponent createCenterPanel() {
myContentPanel = new JPanel(new BorderLayout());
myEditorPanel = createEditorContent();
myContentPanel.add(BorderLayout.CENTER, myEditorPanel);
myContentPanel.add(BorderLayout.SOUTH, Box.createVerticalStrut(8));
JComponent centerPanel = new JPanel(new BorderLayout());
{
JPanel panel = new JPanel(new BorderLayout());
panel.add(BorderLayout.CENTER, myContentPanel);
panel.add(BorderLayout.SOUTH, createTemplateManagementButtons());
centerPanel.add(BorderLayout.CENTER, panel);
}
JPanel optionsContent = new JPanel(new BorderLayout());
centerPanel.add(BorderLayout.SOUTH, optionsContent);
JPanel searchOptions = new JPanel();
searchOptions.setLayout(new GridLayout(getRowsCount(), 1, 0, 0));
searchOptions.setBorder(IdeBorderFactory.createTitledBorder(SSRBundle.message("ssdialog.options.group.border"), true));
myScopeChooserCombo = new ScopeChooserCombo(searchContext.getProject(), true, false, FindSettings.getInstance().getDefaultScopeName());
Disposer.register(myDisposable, myScopeChooserCombo);
JPanel allOptions = new JPanel(new BorderLayout());
if (myShowScopePanel) {
JPanel scopePanel = new JPanel(new GridBagLayout());
TitledSeparator separator = new TitledSeparator(SSRBundle.message("search.dialog.scope.label"), myScopeChooserCombo.getComboBox());
scopePanel.add(separator, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, JBUI.insetsTop(5), 0, 0));
scopePanel.add(myScopeChooserCombo, new GridBagConstraints(0, 1, 1, 1, 1, 1, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, JBUI.insetsLeft(10), 0, 0));
allOptions.add(scopePanel, BorderLayout.SOUTH);
myScopeChooserCombo.getComboBox().addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
initiateValidation();
}
});
}
buildOptions(searchOptions);
allOptions.add(searchOptions, BorderLayout.CENTER);
optionsContent.add(allOptions, BorderLayout.CENTER);
if (myRunFindActionOnClose) {
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0));
openInNewTab = new JCheckBox(FindBundle.message("find.open.in.new.tab.checkbox"));
openInNewTab.setSelected(FindSettings.getInstance().isShowResultsInSeparateView());
ToolWindow findWindow = ToolWindowManager.getInstance(searchContext.getProject()).getToolWindow(ToolWindowId.FIND);
openInNewTab.setEnabled(findWindow != null && findWindow.isAvailable());
panel.add(openInNewTab, BorderLayout.EAST);
optionsContent.add(BorderLayout.SOUTH, panel);
}
updateEditor();
return centerPanel;
}
use of com.intellij.ui.TitledSeparator in project intellij-community by JetBrains.
the class InferNullityAnnotationsAction method getAdditionalActionSettings.
@Override
protected JComponent getAdditionalActionSettings(Project project, BaseAnalysisActionDialog dialog) {
final JPanel panel = new JPanel(new VerticalFlowLayout());
panel.add(new TitledSeparator());
myAnnotateLocalVariablesCb = new JCheckBox("Annotate local variables", PropertiesComponent.getInstance().getBoolean(ANNOTATE_LOCAL_VARIABLES));
panel.add(myAnnotateLocalVariablesCb);
return panel;
}
use of com.intellij.ui.TitledSeparator in project intellij-community by JetBrains.
the class UpdateCopyrightAction method getAdditionalActionSettings.
@Nullable
@Override
protected JComponent getAdditionalActionSettings(Project project, BaseAnalysisActionDialog dialog) {
final JPanel panel = new JPanel(new VerticalFlowLayout());
panel.add(new TitledSeparator());
myUpdateExistingCopyrightsCb = new JCheckBox("Update existing copyrights", PropertiesComponent.getInstance().getBoolean(UPDATE_EXISTING_COPYRIGHTS, true));
panel.add(myUpdateExistingCopyrightsCb);
return panel;
}
Aggregations