org.jhotdraw8.draw.key.NulllableBooleanStyleableKey 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!
/*
* @(#)NulllableBooleanStyleableKey.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;
/**
* Nullable NonNullBooleanStyleableKey.
*
* @author Werner Randelshofer
*/
public class NulllableBooleanStyleableKey extends NullableObjectStyleableKey implements WritableStyleableMapAccessor {
public NulllableBooleanStyleableKey(String key) {
this(key, ReadOnlyStyleableMapAccessor.toCssName(key), null);
}
public NulllableBooleanStyleableKey(String key, Boolean defaultValue) {
this(key, ReadOnlyStyleableMapAccessor.toCssName(key), defaultValue);
}
public NulllableBooleanStyleableKey(String key, String cssName) {
this(key, ReadOnlyStyleableMapAccessor.toCssName(key), null);
}
public NulllableBooleanStyleableKey(String key, String cssName, Boolean defaultValue) {
super(key, Boolean.class, new BooleanCssConverter(true), defaultValue);
}
}