本文整理汇总了Java中com.intellij.openapi.editor.colors.ColorKey类的典型用法代码示例。如果您正苦于以下问题:Java ColorKey类的具体用法?Java ColorKey怎么用?Java ColorKey使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ColorKey类属于com.intellij.openapi.editor.colors包,在下文中一共展示了ColorKey类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addEditorSettingDescription
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
private static void addEditorSettingDescription(ArrayList<EditorSchemeAttributeDescriptor> array,
String name,
String group,
ColorKey backgroundKey,
ColorKey foregroundKey,
EditorColorsScheme scheme) {
String type = null;
if (foregroundKey != null) {
type = foregroundKey.getExternalName();
}
else {
if (backgroundKey != null) {
type = backgroundKey.getExternalName();
}
}
ColorAndFontDescription descr = new EditorSettingColorDescription(name, group, backgroundKey, foregroundKey, type, scheme);
array.add(descr);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:ColorAndFontOptions.java
示例2: getAnchorIndexes
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Nonnull
List<Integer> getAnchorIndexes(@Nullable EditorColorsScheme scheme) {
if (scheme == null) scheme = EditorColorsManager.getInstance().getGlobalScheme();
List<Integer> result = new ArrayList<>(ANCHORS_COUNT);
int count = 0;
for (ColorKey key : ANCHOR_COLOR_KEYS) {
if (scheme.getColor(key) != null) {
result.add(count);
count += COLORS_BETWEEN_ANCHORS + 1;
}
else {
result.add(null);
}
}
return result;
}
开发者ID:consulo,项目名称:consulo,代码行数:20,代码来源:AnnotationsSettings.java
示例3: getColorKeys
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@NotNull
public static ColorKey[] getColorKeys()
{
final int levelCount = XmlEditorOptions.getInstance().getTagTreeHighlightingLevelCount();
if(ourColorKeys == null || ourColorKeys.length != levelCount)
{
ourColorKeys = new ColorKey[levelCount];
for(int i = 0; i < ourColorKeys.length; i++)
{
ourColorKeys[i] = ColorKey.createColorKey("HTML_TAG_TREE_LEVEL" + i, DEFAULT_COLORS[i % DEFAULT_COLORS.length]);
}
}
return ourColorKeys;
}
开发者ID:consulo,项目名称:consulo-xml,代码行数:18,代码来源:XmlTagTreeHighlightingColors.java
示例4: getColor
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Nullable
@Override
public Color getColor(ColorKey key) {
if (key == null) return null;
Color color = myColorsMap.get(key);
return color != null ? color : key.getDefaultColor();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:DefaultColorsScheme.java
示例5: getColor
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Nullable
@Override
public Color getColor(ColorKey key) {
if (myColorsMap.containsKey(key)) {
return myColorsMap.get(key);
}
else {
return myParentScheme.getColor(key);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:EditorColorsSchemeImpl.java
示例6: getColor
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Override
public Color getColor() {
while (!myKeys.isEmpty()) {
ColorKey key = myKeys.get(myKeys.size() - 1);
Color result = myScheme.getColor(key);
if (result == null || result.equals(myScheme.getDefaultForeground())) {
myKeys.remove(myKeys.size() - 1);
}
else {
return result;
}
}
return myScheme.getDefaultForeground();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:ColorProvider.java
示例7: calcType
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Nullable
private static String calcType(@Nullable ColorKey backgroundKey, @Nullable ColorKey foregroundKey) {
if (foregroundKey != null) {
return foregroundKey.getExternalName();
}
else if (backgroundKey != null) {
return backgroundKey.getExternalName();
}
return null;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ColorAndFontOptions.java
示例8: addEditorSettingDescription
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
private static void addEditorSettingDescription(@NotNull List<EditorSchemeAttributeDescriptor> list,
String name,
String group,
@Nullable ColorKey backgroundKey,
@Nullable ColorKey foregroundKey,
@NotNull EditorColorsScheme scheme) {
list.add(new EditorSettingColorDescription(name, group, backgroundKey, foregroundKey, calcType(backgroundKey, foregroundKey), scheme));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ColorAndFontOptions.java
示例9: EditorSettingColorDescription
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
private EditorSettingColorDescription(String name,
String group,
ColorKey backgroundKey,
ColorKey foregroundKey,
String type,
EditorColorsScheme scheme) {
super(name, group, type, scheme, null, null);
if (backgroundKey != null) {
myGetSetBackground = new GetSetColor(backgroundKey, scheme);
}
if (foregroundKey != null) {
myGetSetForeground = new GetSetColor(foregroundKey, scheme);
}
initCheckedStatus();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ColorAndFontOptions.java
示例10: getColorKeys
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@NotNull
public static ColorKey[] getColorKeys() {
final int levelCount = WebEditorOptions.getInstance().getTagTreeHighlightingLevelCount();
if (ourColorKeys == null || ourColorKeys.length != levelCount) {
ourColorKeys = new ColorKey[levelCount];
for (int i = 0; i < ourColorKeys.length; i++) {
ourColorKeys[i] = ColorKey.createColorKey("HTML_TAG_TREE_LEVEL" + i, DEFAULT_COLORS[i % DEFAULT_COLORS.length]);
}
}
return ourColorKeys;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:XmlTagTreeHighlightingColors.java
示例11: getBaseColors
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
static Color[] getBaseColors() {
final ColorKey[] colorKeys = XmlTagTreeHighlightingColors.getColorKeys();
final Color[] colors = new Color[colorKeys.length];
final EditorColorsScheme colorsScheme = EditorColorsManager.getInstance().getGlobalScheme();
for (int i = 0; i < colors.length; i++) {
colors[i] = colorsScheme.getColor(colorKeys[i]);
}
return colors;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:XmlTagTreeHighlightingUtil.java
示例12: getColorDescriptors
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Override
@NotNull
public ColorDescriptor[] getColorDescriptors() {
// todo: make preview for it
final ColorKey[] colorKeys = XmlTagTreeHighlightingColors.getColorKeys();
final ColorDescriptor[] colorDescriptors = new ColorDescriptor[colorKeys.length];
for (int i = 0; i < colorDescriptors.length; i++) {
colorDescriptors[i] = new ColorDescriptor(OptionsBundle.message("options.html.attribute.descriptor.tag.tree", i + 1),
colorKeys[i], ColorDescriptor.Kind.BACKGROUND);
}
return colorDescriptors;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:HTMLColorsPage.java
示例13: get
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
public static Color get(final FileStatus status) {
final EditorColorsScheme globalScheme = EditorColorsManager.getInstance().getGlobalScheme();
final ColorKey colorKey = MTFileColors.fileStatusColorKeyHashMap.get(status);
if (colorKey != null) {
return globalScheme.getColor(colorKey);
}
return globalScheme.getDefaultForeground();
}
开发者ID:ChrisRM,项目名称:material-theme-jetbrains,代码行数:11,代码来源:MTFileColors.java
示例14: getColor
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Override
public Color getColor(ColorKey key) {
if (myColorsMap.containsKey(key)) {
return myColorsMap.get(key);
}
else {
return myParentScheme.getColor(key);
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:EditorColorsSchemeImpl.java
示例15: getColorDescriptors
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@NotNull
public ColorDescriptor[] getColorDescriptors() {
// todo: make preview for it
final ColorKey[] colorKeys = XmlTagTreeHighlightingColors.getColorKeys();
final ColorDescriptor[] colorDescriptors = new ColorDescriptor[colorKeys.length];
for (int i = 0; i < colorDescriptors.length; i++) {
colorDescriptors[i] = new ColorDescriptor(OptionsBundle.message("options.html.attribute.descriptor.tag.tree", i + 1),
colorKeys[i], ColorDescriptor.Kind.BACKGROUND);
}
return colorDescriptors;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:HTMLColorsPage.java
示例16: createColorKeys
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Nonnull
private static List<ColorKey> createColorKeys(int count) {
List<ColorKey> keys = new ArrayList<>();
for (int i = 0; i < count; i++) {
keys.add(ColorKey.createColorKey("VCS_ANNOTATIONS_COLOR_" + (i + 1)));
}
return keys;
}
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:AnnotationsSettings.java
示例17: getOrderedColors
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Nonnull
public List<Color> getOrderedColors(@Nullable EditorColorsScheme scheme) {
if (scheme == null) scheme = EditorColorsManager.getInstance().getGlobalScheme();
List<Color> anchorColors = new ArrayList<>();
for (ColorKey key : ANCHOR_COLOR_KEYS) {
ContainerUtil.addIfNotNull(anchorColors, scheme.getColor(key));
}
return ColorGenerator.generateLinearColorSequence(anchorColors, COLORS_BETWEEN_ANCHORS);
}
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:AnnotationsSettings.java
示例18: addEditorSettingDescription
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
private static void addEditorSettingDescription(@Nonnull List<EditorSchemeAttributeDescriptor> list,
String name,
String group,
@Nullable ColorKey backgroundKey,
@Nullable ColorKey foregroundKey,
@Nonnull EditorColorsScheme scheme) {
list.add(new EditorSettingColorDescription(name, group, backgroundKey, foregroundKey, calcType(backgroundKey, foregroundKey), scheme));
}
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:ColorAndFontOptions.java
示例19: EditorSettingColorDescription
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
private EditorSettingColorDescription(String name, String group, ColorKey backgroundKey, ColorKey foregroundKey, String type, EditorColorsScheme scheme) {
super(name, group, type, scheme, null, null);
if (backgroundKey != null) {
myGetSetBackground = new GetSetColor(backgroundKey, scheme);
}
if (foregroundKey != null) {
myGetSetForeground = new GetSetColor(foregroundKey, scheme);
}
initCheckedStatus();
}
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:ColorAndFontOptions.java
示例20: setColor
import com.intellij.openapi.editor.colors.ColorKey; //导入依赖的package包/类
@Override
public void setColor(ColorKey key, Color color) {
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:DefaultColorsScheme.java
注:本文中的com.intellij.openapi.editor.colors.ColorKey类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论