java.lang.Object
org.jhotdraw8.fxcollection.typesafekey.AbstractKey<CssDefaultableValue<T>>
org.jhotdraw8.draw.key.AbstractStyleableKey<CssDefaultableValue<T>>
org.jhotdraw8.draw.key.DefaultableStyleableKey<T>
- Type Parameters:
T- the value type
- All Implemented Interfaces:
DefaultableStyleableMapAccessor<T>,ReadOnlyStyleableMapAccessor<CssDefaultableValue<T>>,WritableStyleableMapAccessor<CssDefaultableValue<T>>,Key<CssDefaultableValue<T>>,MapAccessor<CssDefaultableValue<T>>,NonNullKey<CssDefaultableValue<T>>,NonNullMapAccessor<CssDefaultableValue<T>>
public class DefaultableStyleableKey<T>
extends AbstractStyleableKey<CssDefaultableValue<T>>
implements WritableStyleableMapAccessor<CssDefaultableValue<T>>, DefaultableStyleableMapAccessor<T>, NonNullKey<CssDefaultableValue<T>>
DefaultableStyleableKey.
- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from interface org.jhotdraw8.fxcollection.typesafekey.Key
serialVersionUIDFields inherited from interface org.jhotdraw8.fxcollection.typesafekey.NonNullMapAccessor
serialVersionUIDFields inherited from interface org.jhotdraw8.fxbase.styleable.WritableStyleableMapAccessor
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionDefaultableStyleableKey(String name, Type type, CssConverter<T> converter, CssDefaultableValue<T> initialDefaultingValue, @Nullable T initialValue) Creates a new instance with the specified name, mask and default value. -
Method Summary
Modifier and TypeMethodDescriptionorg.jhotdraw8.base.converter.Converter<CssDefaultableValue<T>> Returns the initial value of the attribute.Methods inherited from class org.jhotdraw8.draw.key.AbstractStyleableKey
getCssName, getCssNamespaceMethods inherited from class org.jhotdraw8.fxcollection.typesafekey.AbstractKey
getDefaultValue, getName, getValueType, isNullable, isTransient, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jhotdraw8.fxcollection.typesafekey.Key
cast, containsKey, getValue, getValueProperty, isAssignable, isDefault, isNullable, propertyAt, put, put, putValue, readOnlyPropertyAt, remove, remove, valueAtMethods inherited from interface org.jhotdraw8.fxcollection.typesafekey.MapAccessor
getDefaultValue, getName, getRawValueType, getValueType, isTransient, setMethods inherited from interface org.jhotdraw8.fxcollection.typesafekey.NonNullKey
get, getMethods inherited from interface org.jhotdraw8.fxcollection.typesafekey.NonNullMapAccessor
getDefaultValueNonNull, getNonNull, getNonNull, putNonNullMethods inherited from interface org.jhotdraw8.fxbase.styleable.ReadOnlyStyleableMapAccessor
getCssName, getCssNamespaceMethods inherited from interface org.jhotdraw8.fxbase.styleable.WritableStyleableMapAccessor
getExamples
-
Constructor Details
-
DefaultableStyleableKey
public DefaultableStyleableKey(String name, Type type, CssConverter<T> converter, CssDefaultableValue<T> initialDefaultingValue, @Nullable T initialValue) Creates a new instance with the specified name, mask and default value.- Parameters:
name- The name of the key.type- The full typeconverter- String converter for a list elementinitialDefaultingValue- The default value.
-
-
Method Details
-
getCssConverter
- Specified by:
getCssConverterin interfaceReadOnlyStyleableMapAccessor<T>
-
getInitialValue
Returns the initial value of the attribute.We use the definition from CSS initial value:
"Each property has an initial value, defined in the property's definition table. If the property is not an inherited property, and the cascade does not result in a value, then the specified value of the property is its initial value."
We intentionally do not use the definition from SVG initial value:
"The initial value of an attribute or property is the value used when that attribute or property is not specified, or when it has an invalid value."References:
- Specified by:
getInitialValuein interfaceDefaultableStyleableMapAccessor<T>- Returns:
- the initial value.
-