Search in sources :

Example 81 with JBLabel

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;
}
Also used : JBLabel(com.intellij.ui.components.JBLabel)

Example 82 with JBLabel

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 &amp;home directory");
    final JBLabel versionLabel = new JBLabel();
    versionLabel.setOpaque(true);
    versionLabel.setVerticalAlignment(SwingConstants.TOP);
    versionLabel.setVerticalTextPosition(SwingConstants.TOP);
    mavenVersionLabelComponent = LabeledComponent.create(versionLabel, "");
}
Also used : JBLabel(com.intellij.ui.components.JBLabel) TextFieldWithHistory(com.intellij.ui.TextFieldWithHistory) ComponentWithBrowseButton(com.intellij.openapi.ui.ComponentWithBrowseButton) ArrayList(java.util.ArrayList) File(java.io.File)

Example 83 with JBLabel

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

the class ShelfProjectConfigurationPanel method createStoreBaseRevisionOption.

private JComponent createStoreBaseRevisionOption() {
    final JBLabel noteLabel = new JBLabel("The base content of files larger than " + ourMaximumFileForBaseRevisionSize / 1000 + "K will not be stored");
    noteLabel.setComponentStyle(UIUtil.ComponentStyle.SMALL);
    noteLabel.setFontColor(UIUtil.FontColor.BRIGHTER);
    noteLabel.setBorder(JBUI.Borders.empty(2, 25, 5, 0));
    final JPanel panel = new JPanel(new BorderLayout());
    panel.add(myBaseRevisionTexts, BorderLayout.NORTH);
    panel.add(noteLabel, BorderLayout.SOUTH);
    return panel;
}
Also used : JBLabel(com.intellij.ui.components.JBLabel)

Example 84 with JBLabel

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

the class ShelfStorageConfigurationDialog method createNorthPanel.

@Nullable
@Override
protected JComponent createNorthPanel() {
    JPanel contentPanel = new JPanel(new BorderLayout(DEFAULT_HGAP, DEFAULT_VGAP));
    JBLabel label = new JBLabel("Store shelves in:");
    contentPanel.add(label, BorderLayout.NORTH);
    JPanel buttonPanel = new JPanel(new BorderLayout(DEFAULT_HGAP, DEFAULT_VGAP));
    buttonPanel.setBorder(JBUI.Borders.emptyLeft(20));
    buttonPanel.add(createCustomShelveLocationPanel(), BorderLayout.NORTH);
    buttonPanel.add(createDefaultLocationPanel(), BorderLayout.SOUTH);
    contentPanel.add(buttonPanel, BorderLayout.CENTER);
    myMoveShelvesCheckBox.setAlignmentX(Component.LEFT_ALIGNMENT);
    myMoveShelvesCheckBox.setBorder(null);
    contentPanel.add(myMoveShelvesCheckBox, BorderLayout.SOUTH);
    return contentPanel;
}
Also used : JBLabel(com.intellij.ui.components.JBLabel) Nullable(org.jetbrains.annotations.Nullable)

Example 85 with JBLabel

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

the class VcsDirectoryConfigurationPanel method createProjectMappingDescription.

private JComponent createProjectMappingDescription() {
    final JBLabel label = new JBLabel(myProjectMessage);
    label.setComponentStyle(UIUtil.ComponentStyle.SMALL);
    label.setFontColor(UIUtil.FontColor.BRIGHTER);
    label.setBorder(JBUI.Borders.empty(2, 5, 2, 0));
    return label;
}
Also used : JBLabel(com.intellij.ui.components.JBLabel)

Aggregations

JBLabel (com.intellij.ui.components.JBLabel)98 Nullable (org.jetbrains.annotations.Nullable)23 NotNull (org.jetbrains.annotations.NotNull)11 JBCheckBox (com.intellij.ui.components.JBCheckBox)10 FileChooserDescriptor (com.intellij.openapi.fileChooser.FileChooserDescriptor)9 VirtualFile (com.intellij.openapi.vfs.VirtualFile)8 ComboBox (com.intellij.openapi.ui.ComboBox)7 VerticalFlowLayout (com.intellij.openapi.ui.VerticalFlowLayout)7 GridBag (com.intellij.util.ui.GridBag)7 List (java.util.List)7 JBList (com.intellij.ui.components.JBList)6 JBTable (com.intellij.ui.table.JBTable)6 JBTextField (com.intellij.ui.components.JBTextField)5 DocumentEvent (javax.swing.event.DocumentEvent)5 DumbAwareAction (com.intellij.openapi.project.DumbAwareAction)4 Project (com.intellij.openapi.project.Project)4 TextFieldWithBrowseButton (com.intellij.openapi.ui.TextFieldWithBrowseButton)4 StringUtil (com.intellij.openapi.util.text.StringUtil)4 java.awt (java.awt)4 ArrayList (java.util.ArrayList)4