2 * Copyright 2000-2013 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.openapi.editor.colors;
18 import com.intellij.openapi.editor.markup.TextAttributes;
19 import com.intellij.openapi.options.FontSize;
20 import com.intellij.openapi.options.Scheme;
21 import com.intellij.openapi.util.JDOMExternalizable;
22 import org.jetbrains.annotations.NonNls;
23 import org.jetbrains.annotations.NotNull;
27 public interface EditorColorsScheme extends Cloneable, JDOMExternalizable, TextAttributesScheme, Scheme {
28 @NonNls String DEFAULT_SCHEME_NAME = "Default";
30 void setName(String name);
32 void setAttributes(TextAttributesKey key, TextAttributes attributes);
35 Color getDefaultBackground();
37 Color getDefaultForeground();
39 Color getColor(ColorKey key);
40 void setColor(ColorKey key, Color color);
43 * The IDE has allowed to configure only a single font family for a while. However, that doesn't handle a situation when
44 * that font family is unable to display particular char - fallback font family was chosen randomly from the whole collection
45 * of all registered fonts.
47 * Now it's possible to specify more than one font, i.e. directly indicated 'fallback fonts sequence' (see {@link FontPreferences}).
48 * However, old single font-based API is still here in order to preserve backward compatibility ({@link #getEditorFontName()} and
49 * {@link #getEditorFontSize()}). I.e. those methods are just re-written in order to use {@link FontPreferences} object exposed
52 * @return font preferences to use
55 FontPreferences getFontPreferences();
56 void setFontPreferences(@NotNull FontPreferences preferences);
58 String getEditorFontName();
59 void setEditorFontName(String fontName);
61 int getEditorFontSize();
62 void setEditorFontSize(int fontSize);
64 FontSize getQuickDocFontSize();
65 void setQuickDocFontSize(@NotNull FontSize fontSize);
67 Font getFont(EditorFontType key);
68 void setFont(EditorFontType key, Font font);
70 float getLineSpacing();
71 void setLineSpacing(float lineSpacing);
76 * @return console font preferences to use
77 * @see #getFontPreferences()
80 FontPreferences getConsoleFontPreferences();
81 void setConsoleFontPreferences(@NotNull FontPreferences preferences);
83 String getConsoleFontName();
84 void setConsoleFontName(String fontName);
86 int getConsoleFontSize();
87 void setConsoleFontSize(int fontSize);
89 float getConsoleLineSpacing();
90 void setConsoleLineSpacing(float lineSpacing);