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;
24 import org.jetbrains.annotations.Nullable;
28 public interface EditorColorsScheme extends Cloneable, JDOMExternalizable, TextAttributesScheme, Scheme {
29 @NonNls String DEFAULT_SCHEME_NAME = "Default";
31 void setName(String name);
33 void setAttributes(TextAttributesKey key, TextAttributes attributes);
36 Color getDefaultBackground();
38 Color getDefaultForeground();
41 Color getColor(ColorKey key);
42 void setColor(ColorKey key, Color color);
45 * The IDE has allowed to configure only a single font family for a while. However, that doesn't handle a situation when
46 * that font family is unable to display particular char - fallback font family was chosen randomly from the whole collection
47 * of all registered fonts.
49 * Now it's possible to specify more than one font, i.e. directly indicated 'fallback fonts sequence' (see {@link FontPreferences}).
50 * However, old single font-based API is still here in order to preserve backward compatibility ({@link #getEditorFontName()} and
51 * {@link #getEditorFontSize()}). I.e. those methods are just re-written in order to use {@link FontPreferences} object exposed
54 * @return font preferences to use
57 FontPreferences getFontPreferences();
58 void setFontPreferences(@NotNull FontPreferences preferences);
60 String getEditorFontName();
61 void setEditorFontName(String fontName);
63 int getEditorFontSize();
64 void setEditorFontSize(int fontSize);
66 FontSize getQuickDocFontSize();
67 void setQuickDocFontSize(@NotNull FontSize fontSize);
69 Font getFont(EditorFontType key);
70 void setFont(EditorFontType key, Font font);
72 float getLineSpacing();
73 void setLineSpacing(float lineSpacing);
78 * @return console font preferences to use
79 * @see #getFontPreferences()
82 FontPreferences getConsoleFontPreferences();
83 void setConsoleFontPreferences(@NotNull FontPreferences preferences);
85 String getConsoleFontName();
86 void setConsoleFontName(String fontName);
88 int getConsoleFontSize();
89 void setConsoleFontSize(int fontSize);
91 float getConsoleLineSpacing();
92 void setConsoleLineSpacing(float lineSpacing);