Package org.apache.sis.internal.util

Examples of org.apache.sis.internal.util.X364


     * @param  level The level for which to get the color.
     * @return The color for the given level, or {@code null} if none.
     */
    public synchronized String getLevelColor(final Level level) {
        if (colors != null) {
            final X364 code = colors.get(level);
            if (code != null) {
                return code.color;
            }
        }
        return null;
View Full Code Here


     * @throws IllegalArgumentException If the given color is not one of the recognized values.
     */
    public synchronized void setLevelColor(final Level level, final String color) throws IllegalArgumentException {
        boolean changed = false;
        if (color != null) {
            final X364 code = X364.forColorName(color).background();
            changed = (colors().put(level, code) != code);
        } else if (colors != null) {
            changed = (colors.remove(level) != null);
            if (colors.isEmpty()) {
                colors = null;
View Full Code Here

     *
     * @param key The syntactic element for which to get the color.
     * @return The color of the specified element, or {@code null} if none.
     */
    public final String getName(final ElementKind key) { // Declared final for consistency with getAnsiSequence(…)
        final X364 color = map.get(key);
        return (color != null) ? color.color : null;
    }
View Full Code Here

    /**
     * Returns the ANSI sequence for the given syntactic element, or {@code null} if none.
     */
    final String getAnsiSequence(final ElementKind key) {
        final X364 color = map.get(key);
        return (color != null) ? color.sequence() : null;
    }
View Full Code Here

     * @return The color for the given level, or {@code null} if none.
     */
    public String getLevelColor(final Level level) {
        synchronized (buffer) {
            if (colors != null) {
                final X364 code = colors.get(level);
                if (code != null) {
                    return code.color;
                }
            }
        }
View Full Code Here

     */
    public void setLevelColor(final Level level, final String color) throws IllegalArgumentException {
        boolean changed = false;
        synchronized (buffer) {
            if (color != null) {
                final X364 code = X364.forColorName(color).background();
                changed = (colors().put(level, code) != code);
            } else if (colors != null) {
                changed = (colors.remove(level) != null);
                if (colors.isEmpty()) {
                    colors = null;
View Full Code Here

TOP

Related Classes of org.apache.sis.internal.util.X364

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.