/*
 * Copyright 2000-2013 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.openapi.editor.colors;

import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.options.FontSize;
import com.intellij.openapi.options.Scheme;
import org.jdom.Element;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.awt.*;

public interface EditorColorsScheme extends Cloneable, TextAttributesScheme, Scheme {
  @NonNls String DEFAULT_SCHEME_NAME = "Default";

  void setName(String name);

  void setAttributes(TextAttributesKey key, TextAttributes attributes);

  @NotNull
  Color getDefaultBackground();
  @NotNull
  Color getDefaultForeground();

  @Nullable
  Color getColor(ColorKey key);
  void setColor(ColorKey key, Color color);

  /**
   * The IDE has allowed to configure only a single font family for a while. However, that doesn't handle a situation when
   * that font family is unable to display particular char - fallback font family was chosen randomly from the whole collection
   * of all registered fonts.
   * <p/>
   * Now it's possible to specify more than one font, i.e. directly indicated 'fallback fonts sequence' (see {@link FontPreferences}).
   * However, old single font-based API is still here in order to preserve backward compatibility ({@link #getEditorFontName()} and
   * {@link #getEditorFontSize()}). I.e. those methods are just re-written in order to use {@link FontPreferences} object exposed
   * by this method.
   *
   * @return    font preferences to use
   */
  @NotNull
  FontPreferences getFontPreferences();
  void setFontPreferences(@NotNull FontPreferences preferences);

  String getEditorFontName();
  void setEditorFontName(String fontName);

  int getEditorFontSize();
  void setEditorFontSize(int fontSize);

  FontSize getQuickDocFontSize();
  void setQuickDocFontSize(@NotNull FontSize fontSize);

  Font getFont(EditorFontType key);
  void setFont(EditorFontType key, Font font);

  float getLineSpacing();
  void setLineSpacing(float lineSpacing);

  Object clone();

  /**
   * @return    console font preferences to use
   * @see #getFontPreferences()
   */
  @NotNull
  FontPreferences getConsoleFontPreferences();
  void setConsoleFontPreferences(@NotNull FontPreferences preferences);

  String getConsoleFontName();
  void setConsoleFontName(String fontName);

  int getConsoleFontSize();
  void setConsoleFontSize(int fontSize);

  float getConsoleLineSpacing();
  void setConsoleLineSpacing(float lineSpacing);

  void readExternal(Element parentNode);
}

@@ -21,9 +21,9 @@
 -201
-3
+6
  Jet
@@ -2363,249 +2363,1059 @@
 ();%0A
-  void setEditorFontSize(int fontSize);%0A%0A  FontSize getQuickDocFontSize();%0A  void setQuickDocFontSize(@NotNull FontSize fontSize);%0A%0A  Font getFont(EditorFontType key);%0A  void setFont(EditorFontType key, Font font);%0A%0A  float getLineSpacing();
+%0A  /**%0A   * Sets font size. Note, that this method checks that %7B@code fontSize%7D is within bounds and could change it if it is%0A   * more than %7B@code com.intellij.application.options.EditorFontsConstants.getMaxEditorFontSize()%7D or less than%0A   * %7B@code com.intellij.application.options.EditorFontsConstants.getMinEditorFontSize()%7D%0A   * @see com.intellij.application.options.EditorFontsConstants%0A   */%0A  void setEditorFontSize(int fontSize);%0A%0A  FontSize getQuickDocFontSize();%0A  void setQuickDocFontSize(@NotNull FontSize fontSize);%0A%0A  Font getFont(EditorFontType key);%0A  void setFont(EditorFontType key, Font font);%0A%0A  float getLineSpacing();%0A%0A  /**%0A   * Sets line spacing. Note, that this method checks that %7B@code lineSpacing%7D is within bounds and could change it if it is%0A   * more than %7B@code com.intellij.application.options.EditorFontsConstants.getMaxEditorLineSpacing()%7D or less than%0A   * %7B@code com.intellij.application.options.EditorFontsConstants.getMinEditorLineSpacing()%7D%0A   * @see com.intellij.application.options.EditorFontsConstants%0A   */
 %0A  v

add JavaDoc