use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class GitRejectedPushUpdateDialog method createCenterPanel.
@Override
protected JComponent createCenterPanel() {
JBLabel desc = new JBLabel(wrapInHtml(makeDescription()));
JPanel options = new JPanel(new BorderLayout());
if (!myRebaseOverMergeProblemDetected) {
options.add(myAutoUpdateInFuture, BorderLayout.SOUTH);
}
if (!GitUtil.justOneGitRepository(myProject)) {
options.add(myUpdateAllRoots);
}
final int GAP = 15;
JPanel rootPanel = new JPanel(new BorderLayout(GAP, GAP));
rootPanel.add(desc);
rootPanel.add(options, BorderLayout.SOUTH);
JLabel iconLabel = new JLabel(myRebaseOverMergeProblemDetected ? UIUtil.getWarningIcon() : UIUtil.getQuestionIcon());
rootPanel.add(iconLabel, BorderLayout.WEST);
return rootPanel;
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class GitCompareBranchesLogPanel method layoutCommitListPanel.
private JPanel layoutCommitListPanel(@NotNull String currentBranch, boolean forward) {
String desc = makeDescription(currentBranch, forward);
JPanel bth = new JPanel(new BorderLayout());
JBLabel descriptionLabel = new JBLabel(desc, UIUtil.ComponentStyle.SMALL);
descriptionLabel.setBorder(JBUI.Borders.emptyBottom(5));
bth.add(descriptionLabel, BorderLayout.NORTH);
bth.add(forward ? myHeadToBranchListPanel : myBranchToHeadListPanel);
return bth;
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class MavenEnvironmentForm method createUIComponents.
private void createUIComponents() {
mavenHomeField = new TextFieldWithHistory();
mavenHomeField.setHistorySize(-1);
final ArrayList<String> foundMavenHomes = new ArrayList<>();
foundMavenHomes.add(MavenServerManager.BUNDLED_MAVEN_2);
foundMavenHomes.add(MavenServerManager.BUNDLED_MAVEN_3);
final File mavenHomeDirectory = MavenUtil.resolveMavenHomeDirectory(null);
if (mavenHomeDirectory != null) {
foundMavenHomes.add(FileUtil.toSystemIndependentName(mavenHomeDirectory.getPath()));
}
mavenHomeField.setHistory(foundMavenHomes);
mavenHomeComponent = LabeledComponent.create(new ComponentWithBrowseButton<>(mavenHomeField, null), "Maven &home directory");
final JBLabel versionLabel = new JBLabel();
versionLabel.setOpaque(true);
versionLabel.setVerticalAlignment(SwingConstants.TOP);
versionLabel.setVerticalTextPosition(SwingConstants.TOP);
mavenVersionLabelComponent = LabeledComponent.create(versionLabel, "");
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class GitCrlfDialog method createCenterPanel.
@Override
protected JComponent createCenterPanel() {
JLabel description = new JBLabel("<html>You are about to commit CRLF line separators to the Git repository.<br/>" + "It is recommended to set core.autocrlf Git attribute to <code>" + RECOMMENDED_VALUE + "</code> to avoid line separator issues.</html>");
JLabel additionalDescription = new JBLabel("<html>Fix and Commit: <code>git config --global core.autocrlf " + RECOMMENDED_VALUE + "</code> will be called,<br/>" + "Commit as Is: the config value won't be set.</html>", UIUtil.ComponentStyle.SMALL);
JLabel readMore = LinkLabel.create("Read more", () -> BrowserUtil.browse("https://help.github.com/articles/dealing-with-line-endings"));
JLabel icon = new JLabel(UIUtil.getWarningIcon(), SwingConstants.LEFT);
myDontWarn = new JBCheckBox("Don't warn again");
myDontWarn.setMnemonic('w');
JPanel rootPanel = new JPanel(new GridBagLayout());
GridBag g = new GridBag().setDefaultInsets(new Insets(0, 6, DEFAULT_VGAP, DEFAULT_HGAP)).setDefaultAnchor(GridBagConstraints.LINE_START).setDefaultFill(GridBagConstraints.HORIZONTAL);
rootPanel.add(icon, g.nextLine().next().coverColumn(4));
rootPanel.add(description, g.next());
rootPanel.add(readMore, g.nextLine().next().next());
rootPanel.add(additionalDescription, g.nextLine().next().next().pady(DEFAULT_HGAP));
rootPanel.add(myDontWarn, g.nextLine().next().next().insets(0, 0, 0, 0));
return rootPanel;
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class IdeaGradleProjectSettingsControlBuilder method addGradleChooserComponents.
@Override
public IdeaGradleProjectSettingsControlBuilder addGradleChooserComponents(PaintAwarePanel content, int indentLevel) {
ButtonGroup buttonGroup = new ButtonGroup();
if (!dropUseWrapperButton) {
myUseWrapperButton = new JBRadioButton(GradleBundle.message("gradle.settings.text.use.default_wrapper.configured"));
myUseWrapperButton.addActionListener(myActionListener);
buttonGroup.add(myUseWrapperButton);
content.add(myUseWrapperButton, ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
}
if (!dropCustomizableWrapperButton) {
myUseWrapperWithVerificationButton = new JBRadioButton(GradleBundle.message("gradle.settings.text.use.customizable_wrapper"));
myUseWrapperWithVerificationButton.addActionListener(myActionListener);
myUseWrapperVerificationLabel = new JBLabel(GradleBundle.message("gradle.settings.text.wrapper.customization.compatibility"));
myUseWrapperVerificationLabel.setFont(UIUtil.getLabelFont(UIUtil.FontSize.MINI));
myUseWrapperVerificationLabel.setIcon(UIUtil.getBalloonInformationIcon());
buttonGroup.add(myUseWrapperWithVerificationButton);
content.add(myUseWrapperWithVerificationButton, ExternalSystemUiUtil.getLabelConstraints(indentLevel));
content.add(myUseWrapperVerificationLabel, ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
}
if (!dropUseLocalDistributionButton) {
myUseLocalDistributionButton = new JBRadioButton(GradleBundle.message("gradle.settings.text.use.local.distribution"));
myUseLocalDistributionButton.addActionListener(myActionListener);
buttonGroup.add(myUseLocalDistributionButton);
content.add(myUseLocalDistributionButton, ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
}
if (!dropUseBundledDistributionButton) {
myUseBundledDistributionButton = new JBRadioButton(GradleBundle.message("gradle.settings.text.use.bundled.distribution", GradleVersion.current().getVersion()));
myUseBundledDistributionButton.addActionListener(myActionListener);
buttonGroup.add(myUseBundledDistributionButton);
//content.add(Box.createGlue(), ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
content.add(myUseBundledDistributionButton, ExternalSystemUiUtil.getFillLineConstraints(indentLevel));
}
return this;
}
Aggregations