Search in sources :

Example 1 with ColorBlindness

use of com.intellij.ide.ui.ColorBlindness in project intellij-community by JetBrains.

the class AbstractColorsScheme method readExternal.

@Override
public void readExternal(@NotNull Element parentNode) {
    UISettings settings = UISettings.getInstanceOrNull();
    ColorBlindness blindness = settings == null ? null : settings.getColorBlindness();
    myValueReader.setAttribute(blindness == null ? null : blindness.name());
    if (SCHEME_ELEMENT.equals(parentNode.getName())) {
        readScheme(parentNode);
    } else {
        List<Element> children = parentNode.getChildren(SCHEME_ELEMENT);
        if (children.isEmpty()) {
            throw new InvalidDataException("Scheme is not valid");
        }
        for (Element element : children) {
            readScheme(element);
        }
    }
    initFonts();
    myVersion = CURR_VERSION;
}
Also used : UISettings(com.intellij.ide.ui.UISettings) Element(org.jdom.Element) ColorBlindness(com.intellij.ide.ui.ColorBlindness)

Aggregations

ColorBlindness (com.intellij.ide.ui.ColorBlindness)1 UISettings (com.intellij.ide.ui.UISettings)1 Element (org.jdom.Element)1