use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class FormBuilder method addTooltip.
public FormBuilder addTooltip(final String text) {
final JBLabel label = new JBLabel(text, UIUtil.ComponentStyle.SMALL, UIUtil.FontColor.BRIGHTER);
label.setBorder(new EmptyBorder(0, 10, 0, 0));
return addComponentToRightColumn(label, 1);
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class AbstractPopup method setWarning.
public void setWarning(@NotNull String text) {
JBLabel label = new JBLabel(text, UIUtil.getBalloonWarningIcon(), SwingConstants.CENTER);
label.setOpaque(true);
Color color = HintUtil.getInformationColor();
label.setBackground(color);
label.setBorder(BorderFactory.createLineBorder(color, 3));
myHeaderPanel.add(label, BorderLayout.SOUTH);
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class XLightBreakpointPropertiesPanel method loadProperties.
public void loadProperties() {
mySubPanels.forEach(XBreakpointPropertiesSubPanel::loadProperties);
if (myConditionComboBox != null) {
XExpression condition = myBreakpoint.getConditionExpressionInt();
myConditionComboBox.setExpression(condition);
boolean hideCheckbox = !myShowAllOptions && condition == null;
myConditionEnabledCheckbox.setSelected(hideCheckbox || (myBreakpoint.isConditionEnabled() && condition != null));
myConditionEnabledPanel.removeAll();
if (hideCheckbox) {
JBLabel label = new JBLabel(XDebuggerBundle.message("xbreakpoints.condition.checkbox"));
label.setBorder(JBUI.Borders.empty(0, 4));
label.setLabelFor(myConditionComboBox.getComboBox());
myConditionEnabledPanel.add(label);
} else {
myConditionEnabledPanel.add(myConditionEnabledCheckbox);
}
onCheckboxChanged();
}
for (XBreakpointCustomPropertiesPanel customPanel : myCustomPanels) {
customPanel.loadFrom(myBreakpoint);
}
myEnabledCheckbox.setSelected(myBreakpoint.isEnabled());
myBreakpointNameLabel.setText(XBreakpointUtil.getShortText(myBreakpoint));
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class DetailsPanel method rebuildCommitPanels.
private void rebuildCommitPanels(int[] selection) {
myEmptyText.setText("");
int selectionLength = selection.length;
// for each commit besides the first there are two components: Separator and CommitPanel
int existingCount = (myMainContentPanel.getComponentCount() + 1) / 2;
int requiredCount = Math.min(selectionLength, MAX_ROWS);
for (int i = existingCount; i < requiredCount; i++) {
if (i > 0) {
myMainContentPanel.add(new SeparatorComponent(0, OnePixelDivider.BACKGROUND, null));
}
myMainContentPanel.add(new CommitPanel(myLogData, myColorManager));
}
// clear superfluous items
while (myMainContentPanel.getComponentCount() > 2 * requiredCount - 1) {
myMainContentPanel.remove(myMainContentPanel.getComponentCount() - 1);
}
if (selectionLength > MAX_ROWS) {
myMainContentPanel.add(new SeparatorComponent(0, OnePixelDivider.BACKGROUND, null));
JBLabel label = new JBLabel("(showing " + MAX_ROWS + " of " + selectionLength + " selected commits)");
label.setFont(VcsHistoryUtil.getCommitDetailsFont());
label.setBorder(CommitPanel.getDetailsBorder());
myMainContentPanel.add(label);
}
mySelection = Ints.asList(Arrays.copyOf(selection, requiredCount));
repaint();
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class ReferencesPanel method createLabel.
@NotNull
protected JBLabel createLabel(@NotNull String text, @Nullable Icon icon) {
JBLabel label = new JBLabel(text, icon, SwingConstants.LEFT);
label.setFont(getLabelsFont());
label.setIconTextGap(0);
label.setHorizontalAlignment(SwingConstants.LEFT);
return label;
}
Aggregations