本文整理匯總了Java中com.intellij.ui.components.JBLabel.setBorder方法的典型用法代碼示例。如果您正苦於以下問題:Java JBLabel.setBorder方法的具體用法?Java JBLabel.setBorder怎麽用?Java JBLabel.setBorder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.ui.components.JBLabel
的用法示例。
在下文中一共展示了JBLabel.setBorder方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createUIComponents
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
private void createUIComponents() {
impexLabel = new JBLabel();
impexLabel.setBorder(IdeBorderFactory.createTitledBorder(HybrisI18NBundleUtils.message(
"hybris.import.settings.impex.title"), false));
hybrisRemoteControlLabel = new JBLabel();
hybrisRemoteControlLabel.setBorder(IdeBorderFactory.createTitledBorder(HybrisI18NBundleUtils.message(
"hybris.import.settings.tools.remote.title"), false));
projectImportLabel = new JBLabel();
projectImportLabel.setBorder(IdeBorderFactory.createTitledBorder(HybrisI18NBundleUtils.message(
"hybris.import.settings.project.title")));
junkListPanel = new JunkListPanel("hybris.import.settings.junk.directory.name", new ArrayList<String>());
junkDirectoriesPanel = junkListPanel;
projectTreeViewSettingsLabel = new JBLabel();
projectTreeViewSettingsLabel.setBorder(IdeBorderFactory.createTitledBorder(HybrisI18NBundleUtils.message(
"hybris.project.view.tree.settings")));
}
開發者ID:AlexanderBartash,項目名稱:hybris-integration-intellij-idea-plugin,代碼行數:18,代碼來源:HybrisApplicationSettingsForm.java
示例2: ProGuardConfigFilesPanel
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
public ProGuardConfigFilesPanel() {
super(new BorderLayout());
myModel = new CollectionListModel<String>();
myList = new JBList(myModel);
final ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myList).
setAddAction(new AnActionButtonRunnable() {
@Override
public void run(AnActionButton button) {
final String path = chooseFile();
if (path != null) {
myModel.add(path);
}
}
});
JPanel tablePanel = decorator.setPreferredSize(new Dimension(-1, 120)).createPanel();
tablePanel.setMinimumSize(new Dimension(-1, 120));
add(tablePanel, BorderLayout.CENTER);
final JBLabel label = new JBLabel("Config file paths:");
label.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 5, 0));
add(label, BorderLayout.NORTH);
}
示例3: addLicenses
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
private static void addLicenses(JPanel panel, Set<License> licenses) {
if (licenses == null) {
return;
}
JPanel licensesPanel = new JBPanel(new HorizontalLayout(1));
licensesPanel.setBackground(UIUtil.getTableBackground());
for (License license : licenses) {
if (CollectionUtils.isEmpty(license.moreInfoUrl)) {
licensesPanel.add(createJTextArea(createLicenseString(license), false));
continue;
}
HyperlinkLabel hyperlinkLabel = new HyperlinkLabel(createLicenseString(license));
hyperlinkLabel.setBackground(UIUtil.getTableBackground());
hyperlinkLabel.setHyperlinkTarget(license.moreInfoUrl.get(0));
licensesPanel.add(hyperlinkLabel);
}
JBLabel headerLabel = new JBLabel("Licenses:");
headerLabel.setBackground(UIUtil.getTableBackground());
headerLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.HORIZONTAL;
c.anchor = GridBagConstraints.NORTHWEST;
c.ipadx = 20;
c.ipady = 3;
c.gridy = 4;
panel.add(headerLabel, c);
c.gridx = 1;
c.weightx = 0.9;
panel.add(licensesPanel, c);
}
示例4: createTagLabel
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
private static JLabel createTagLabel(String tagText) {
Border emptyBorder = JBUI.Borders.empty(3, 5);
JBLabel label = new JBLabel(tagText);
label.setOpaque(true);
label.setBorder(emptyBorder);
label.setBackground(new JBColor(COLOR, COLOR));
return label;
}
示例5: setWarning
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
public void setWarning(@NotNull String text) {
JBLabel label = new JBLabel(text, UIUtil.getBalloonWarningIcon(), SwingConstants.CENTER);
label.setOpaque(true);
Color color = HintUtil.INFORMATION_COLOR;
label.setBackground(color);
label.setBorder(BorderFactory.createLineBorder(color, 3));
myHeaderPanel.add(label, BorderLayout.SOUTH);
}
示例6: loadProperties
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
public void loadProperties() {
for (XBreakpointPropertiesSubPanel<B> panel : mySubPanels) {
panel.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));
myConditionEnabledPanel.add(label);
}
else {
myConditionEnabledPanel.add(myConditionEnabledCheckbox);
}
onCheckboxChanged();
}
for (XBreakpointCustomPropertiesPanel<B> customPanel : myCustomPanels) {
customPanel.loadFrom(myBreakpoint);
}
myEnabledCheckbox.setSelected(myBreakpoint.isEnabled());
myBreakpointNameLabel.setText(XBreakpointUtil.getShortText(myBreakpoint));
}
示例7: createProjectMappingDescription
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
private JComponent createProjectMappingDescription() {
final JBLabel label = new JBLabel(myProjectMessage);
label.setComponentStyle(UIUtil.ComponentStyle.SMALL);
label.setFontColor(UIUtil.FontColor.BRIGHTER);
label.setBorder(BorderFactory.createEmptyBorder(2, 5, 2, 0));
return label;
}
示例8: createStoreBaseRevisionOption
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
private JComponent createStoreBaseRevisionOption() {
final JBLabel noteLabel = new JBLabel("File texts bigger than " + ourMaximumFileForBaseRevisionSize / 1000 + "K are not stored");
noteLabel.setComponentStyle(UIUtil.ComponentStyle.SMALL);
noteLabel.setFontColor(UIUtil.FontColor.BRIGHTER);
noteLabel.setBorder(BorderFactory.createEmptyBorder(2, 25, 5, 0));
final JPanel panel = new JPanel(new BorderLayout());
panel.add(myBaseRevisionTexts, BorderLayout.NORTH);
panel.add(noteLabel, BorderLayout.SOUTH);
return panel;
}
示例9: createCenterPanel
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
@Override
protected JComponent createCenterPanel() {
final JPanel panel = new JPanel(new BorderLayout());
panel.setPreferredSize(new Dimension(400, 300));
final JBLabel label = new JBLabel("Choose packages to install:");
label.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
panel.add(label, BorderLayout.NORTH);
panel.add(myRequirementsChooser, BorderLayout.CENTER);
return panel;
}
示例10: createCenterPanel
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
@Override
protected JComponent createCenterPanel() {
final JPanel panel = new JPanel(new BorderLayout());
panel.setPreferredSize(new Dimension(350, 200));
final JBLabel label = new JBLabel(AndroidBundle.message("android.import.dependencies.source.roots.dialog.label"));
label.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
panel.add(label, BorderLayout.NORTH);
panel.add(mySourcePathsChooser, BorderLayout.CENTER);
return panel;
}
示例11: getTableCellRendererComponent
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
JBLabel label = new JBLabel((String)value);
label.setBorder(myBorder);
if (table.getSelectedRow() == row) {
label.setBackground(table.getSelectionBackground());
label.setForeground(table.getSelectionForeground());
label.setOpaque(true);
}
return label;
}
示例12: layoutCommitListPanel
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
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(BorderFactory.createEmptyBorder(0, 0, 5, 0));
bth.add(descriptionLabel, BorderLayout.NORTH);
bth.add(forward ? myHeadToBranchListPanel : myBranchToHeadListPanel);
return bth;
}
示例13: createNorthPanel
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
@Override
protected JComponent createNorthPanel() {
JBLabel description = new JBLabel("<html>Your local changes to the following files would be overwritten by " + myOperationTitle +
".<br/>" + ApplicationNamesInfo.getInstance().getFullProductName() + " can stash the changes, "
+ myOperationTitle + " and unstash them after that.</html>");
description.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 10, 0));
return description;
}
示例14: addTooltip
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
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);
}