org.jhotdraw8.draw.key.NonNullBooleanStyleableKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.jhotdraw8.draw Show documentation
Show all versions of org.jhotdraw8.draw Show documentation
JHotDraw8 Drawing Framework
The newest version!
/*
* @(#)NonNullBooleanStyleableKey.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.draw.key;
import org.jhotdraw8.css.converter.BooleanCssConverter;
import org.jhotdraw8.fxbase.styleable.ReadOnlyStyleableMapAccessor;
import org.jhotdraw8.fxbase.styleable.WritableStyleableMapAccessor;
import org.jhotdraw8.fxcollection.typesafekey.NonNullKey;
/**
* NonNullBooleanStyleableKey (not nullable).
*
* @author Werner Randelshofer
*/
public class NonNullBooleanStyleableKey extends NonNullObjectStyleableKey
implements WritableStyleableMapAccessor,
NonNullKey {
public NonNullBooleanStyleableKey(String key) {
this(key, ReadOnlyStyleableMapAccessor.toCssName(key), false);
}
public NonNullBooleanStyleableKey(String key, Boolean defaultValue) {
this(key, ReadOnlyStyleableMapAccessor.toCssName(key), defaultValue);
}
public NonNullBooleanStyleableKey(String key, String cssName) {
this(key, ReadOnlyStyleableMapAccessor.toCssName(key), false);
}
public NonNullBooleanStyleableKey(String key, String cssName, Boolean defaultValue) {
super(key, Boolean.class, new BooleanCssConverter(false), defaultValue);
}
}