Class SvgDefaultablePaintStyleableKey<T extends Paintable>

java.lang.Object
org.jhotdraw8.fxcollection.typesafekey.AbstractKey<SvgDefaultablePaint<T>>
org.jhotdraw8.draw.key.AbstractStyleableKey<SvgDefaultablePaint<T>>
org.jhotdraw8.svg.key.SvgDefaultablePaintStyleableKey<T>
All Implemented Interfaces:
org.jhotdraw8.fxbase.styleable.ReadOnlyStyleableMapAccessor<SvgDefaultablePaint<T>>, org.jhotdraw8.fxbase.styleable.WritableStyleableMapAccessor<SvgDefaultablePaint<T>>, org.jhotdraw8.fxcollection.typesafekey.Key<SvgDefaultablePaint<T>>, org.jhotdraw8.fxcollection.typesafekey.MapAccessor<SvgDefaultablePaint<T>>, org.jhotdraw8.fxcollection.typesafekey.NonNullMapAccessor<SvgDefaultablePaint<T>>, SvgDefaultablePaintStyleableMapAccessor<T>

public class SvgDefaultablePaintStyleableKey<T extends Paintable> extends AbstractStyleableKey<SvgDefaultablePaint<T>> implements org.jhotdraw8.fxbase.styleable.WritableStyleableMapAccessor<SvgDefaultablePaint<T>>, SvgDefaultablePaintStyleableMapAccessor<T>
TListStyleableFigureKey.
Author:
Werner Randelshofer
  • Field Summary

    Fields inherited from interface org.jhotdraw8.fxcollection.typesafekey.NonNullMapAccessor

    serialVersionUID

    Fields inherited from interface org.jhotdraw8.fxbase.styleable.WritableStyleableMapAccessor

    serialVersionUID
  • Constructor Summary

    Constructors
    Constructor
    Description
    SvgDefaultablePaintStyleableKey(String name, Type type, org.jhotdraw8.css.converter.CssConverter<T> converter, SvgDefaultablePaint<T> initialDefaultingValue, @Nullable T initialValue)
    Creates a new instance with the specified name, mask and default value.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Returns the initial value of the attribute.

    Methods inherited from class org.jhotdraw8.draw.key.AbstractStyleableKey

    getCssName, getCssNamespace

    Methods inherited from class org.jhotdraw8.fxcollection.typesafekey.AbstractKey

    getDefaultValue, getName, getValueType, isNullable, isTransient, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.jhotdraw8.fxcollection.typesafekey.Key

    cast, containsKey, get, get, getValue, getValueProperty, isAssignable, isDefault, propertyAt, put, put, putValue, readOnlyPropertyAt, remove, remove, valueAt

    Methods inherited from interface org.jhotdraw8.fxcollection.typesafekey.MapAccessor

    getDefaultValue, getName, getRawValueType, getValueType, isTransient, set

    Methods inherited from interface org.jhotdraw8.fxcollection.typesafekey.NonNullMapAccessor

    getDefaultValueNonNull, getNonNull, getNonNull, putNonNull

    Methods inherited from interface org.jhotdraw8.fxbase.styleable.ReadOnlyStyleableMapAccessor

    getCssName, getCssNamespace

    Methods inherited from interface org.jhotdraw8.fxbase.styleable.WritableStyleableMapAccessor

    getExamples
  • Constructor Details

    • SvgDefaultablePaintStyleableKey

      public SvgDefaultablePaintStyleableKey(String name, Type type, org.jhotdraw8.css.converter.CssConverter<T> converter, SvgDefaultablePaint<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 type
      converter - String converter for a list element
      initialDefaultingValue - The default value.
  • Method Details

    • getCssConverter

      public Converter<SvgDefaultablePaint<T>> getCssConverter()
      Specified by:
      getCssConverter in interface org.jhotdraw8.fxbase.styleable.ReadOnlyStyleableMapAccessor<T extends Paintable>
    • getInitialValue

      public 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:

      CSS Cascading and Inheritance Level 4, Chapter 7.1 Initial Values
      w3.org
      SVG, Chapter 4: Basic Data Types and Interfaces, 4.1 Definitions, Initial Value
      w3.org
      Specified by:
      getInitialValue in interface SvgDefaultablePaintStyleableMapAccessor<T extends Paintable>
      Returns:
      the initial value.