本文整理匯總了Java中com.intellij.ui.components.JBLabel.setOpaque方法的典型用法代碼示例。如果您正苦於以下問題:Java JBLabel.setOpaque方法的具體用法?Java JBLabel.setOpaque怎麽用?Java JBLabel.setOpaque使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.ui.components.JBLabel
的用法示例。
在下文中一共展示了JBLabel.setOpaque方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createViewPanel
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
@Override
protected JComponent createViewPanel() {
final String png = myCell.getBase64String();
final JBLabel label = new JBLabel();
if (!StringUtil.isEmptyOrSpaces(png)) {
try {
byte[] btDataFile = new BASE64Decoder().decodeBuffer(png);
BufferedImage image = ImageIO.read(new ByteArrayInputStream(btDataFile));
label.setIcon(new ImageIcon(image));
}
catch (IOException e) {
LOG.error("Couldn't parse image. " + e.getMessage());
}
}
label.setBackground(IpnbEditorUtil.getBackground());
label.setOpaque(true);
return label;
}
示例2: createUIComponents
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
private void createUIComponents() {
myNavigationControlsCombo = new ComboBox(new EnumComboBoxModel<Navigation>(Navigation.class)) {
@Override
public ListCellRenderer getRenderer() {
return new ColoredListCellRenderer() {
@Override
protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {
append(((Navigation)value).getShortDisplayValue());
}
};
}
};
myHelpAndErrorLabel = new JBLabel();
myHelpAndErrorLabel.setBackground(JBColor.background());
myHelpAndErrorLabel.setForeground(JBColor.foreground());
myHelpAndErrorLabel.setOpaque(true);
myHardwareSkinHelpLabel = new HyperlinkLabel("How do I create a custom hardware skin?");
myHardwareSkinHelpLabel.setHyperlinkTarget(AvdWizardConstants.CREATE_SKIN_HELP_LINK);
myCustomSkinPath = new SkinChooser(getProject());
}
示例3: createUIComponents
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
private void createUIComponents() {
mavenHomeField = new TextFieldWithHistory();
mavenHomeField.setHistorySize(-1);
final ArrayList<String> foundMavenHomes = new ArrayList<String>();
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<TextFieldWithHistory>(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, "");
}
示例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: createViewPanel
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
@Override
protected JBLabel createViewPanel() {
final JBLabel label = new JBLabel(renderCellText());
label.setBackground(IpnbEditorUtil.getBackground());
label.setOpaque(true);
return label;
}
示例7: createViewPanel
import com.intellij.ui.components.JBLabel; //導入方法依賴的package包/類
@Override
protected JComponent createViewPanel() {
final StringBuilder text = new StringBuilder("<html>");
for (String html : myCell.getHtmls()) {
html = html.replace("\"", "'");
text.append(html);
}
text.append("</html>");
final JBLabel label = new JBLabel(text.toString());
label.setBackground(IpnbEditorUtil.getBackground());
label.setOpaque(true);
return label;
}
示例8: 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;
}
示例9: 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((Icon)value);
if (table.getSelectedRow() == row) {
label.setBackground(table.getSelectionBackground());
label.setForeground(table.getSelectionForeground());
label.setOpaque(true);
}
return label;
}