本文整理汇总了Java中com.intellij.ui.JBColor.black方法的典型用法代码示例。如果您正苦于以下问题:Java JBColor.black方法的具体用法?Java JBColor.black怎么用?Java JBColor.black使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.JBColor
的用法示例。
在下文中一共展示了JBColor.black方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: lookAndFeelChanged
import com.intellij.ui.JBColor; //导入方法依赖的package包/类
@Override
public void lookAndFeelChanged(LafManager source) {
final Color background = UIUtil.isUnderDarcula()
? JBColor.background()
: JBColor.black;
inputTerminal.setBackground(background);
// TODO: Upstream fix for Kahlua
outputTerminal.setBackground(background);
// Find the panes we are looking for
JScrollPane scrollPane = (JScrollPane) outputTerminal.getComponent(0);
JPanel panel1 = (JPanel) scrollPane.getViewport().getView();
JPanel panel2 = (JPanel) panel1.getComponent(0);
// Set the background onto the panes directly
JPanel panel3 = (JPanel) panel2.getComponent(0);
panel3.setBackground(background);
JEditorPane editorPane = (JEditorPane) panel2.getComponent(1);
editorPane.setBackground(background);
}
示例2: addTransparencyIfNeeded
import com.intellij.ui.JBColor; //导入方法依赖的package包/类
public static SimpleTextAttributes addTransparencyIfNeeded(@NotNull final SimpleTextAttributes baseStyle, boolean isActive) {
if (isActive) return baseStyle;
Color color = baseStyle.getFgColor();
if (color == null) {
color = JBColor.black;
}
//noinspection UseJBColor
return new SimpleTextAttributes(baseStyle.getStyle(),
new Color(color.getRed(), color.getGreen(), color.getBlue(), 85));
}
示例3: getRecordTitleColor
import com.intellij.ui.JBColor; //导入方法依赖的package包/类
@Nullable
private Color getRecordTitleColor(@NotNull DiffChange change) {
TextDiffType type = getDiffType(change);
if (type == TextDiffType.INSERTED) return FileStatus.ADDED.getColor();
if (type == TextDiffType.DELETED) return FileStatus.DELETED.getColor();
if (type == TextDiffType.MODIFIED) return FileStatus.MODIFIED.getColor();
return JBColor.black; // unchanged
}
示例4: getOutlineColor
import com.intellij.ui.JBColor; //导入方法依赖的package包/类
@Override
public Color getOutlineColor(boolean isActive) {
ColorKey key = isActive ? EditorColors.SELECTED_TEARLINE_COLOR : EditorColors.TEARLINE_COLOR;
Color color = myEditor.getColorsScheme().getColor(key);
return color != null ? color : JBColor.black;
}