Class StrokeProps

  • All Implemented Interfaces:
    Props, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>

    public final class StrokeProps
    extends java.util.HashMap<java.lang.String,​java.lang.Object>
    implements Props
    Author:
    Group 3
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String COLOUR  
      static java.lang.Class COLOUR_TYPE  
      static java.lang.String DASH_STYLE  
      static java.lang.String DOT_DASH_STYLE  
      static java.lang.String DOT_STYLE  
      static java.lang.String LINE_CAP  
      static java.lang.Class LINE_CAP_TYPE  
      static java.lang.String LINE_STYLE  
      static java.lang.Class LINE_STYLE_TYPE  
      protected static java.util.Map<java.lang.String,​java.lang.Object> PROP_DEFAULTS
      Contains default values for known props.
      protected static java.util.Map<java.lang.String,​java.lang.Class> PROPS_MAP
      Contains known props and their classes.
      protected static java.util.Map<java.lang.String,​java.lang.String> PROPS_NAMES
      Property friendly names.
      static java.lang.String SOLID_STYLE  
      static java.lang.String WIDTH  
      static java.lang.Class WIDTH_TYPE  
    • Constructor Summary

      Constructors 
      Constructor Description
      StrokeProps()
      Empty constructor.
      StrokeProps​(java.util.Map<java.lang.String,​java.lang.Object> propertiesMap)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> getDefaultProps()
      Get default properties.
      java.util.Optional<java.lang.Object> getProp​(java.lang.String prop)
      Return value of specified property.
      java.util.Map<java.lang.String,​java.lang.Object> getProps()
      Get all current props.
      java.util.Map<java.lang.String,​java.lang.String> getPropsNames()
      Get property friendly names.
      java.util.Map<java.lang.String,​java.lang.Class> getPropsTypes()
      Get property types.
      java.lang.String toCSS()
      Get the JFX CSS for these properties.
      • Methods inherited from class java.util.HashMap

        clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        equals, hashCode
    • Field Detail

      • WIDTH_TYPE

        public static final java.lang.Class WIDTH_TYPE
      • LINE_STYLE_TYPE

        public static final java.lang.Class LINE_STYLE_TYPE
      • COLOUR_TYPE

        public static final java.lang.Class COLOUR_TYPE
      • LINE_CAP_TYPE

        public static final java.lang.Class LINE_CAP_TYPE
      • PROPS_MAP

        protected static final java.util.Map<java.lang.String,​java.lang.Class> PROPS_MAP
        Contains known props and their classes.
      • PROP_DEFAULTS

        protected static final java.util.Map<java.lang.String,​java.lang.Object> PROP_DEFAULTS
        Contains default values for known props.
      • PROPS_NAMES

        protected static final java.util.Map<java.lang.String,​java.lang.String> PROPS_NAMES
        Property friendly names.
    • Constructor Detail

      • StrokeProps

        public StrokeProps​(java.util.Map<java.lang.String,​java.lang.Object> propertiesMap)
        Constructor. Takes map of properties.
        Parameters:
        propertiesMap - Map of properties conforming to PROPS_MAP.
      • StrokeProps

        public StrokeProps()
        Empty constructor.
    • Method Detail

      • getProp

        public java.util.Optional<java.lang.Object> getProp​(java.lang.String prop)
        Return value of specified property.
        Specified by:
        getProp in interface Props
        Parameters:
        prop - Property to get.
        Returns:
        Maybe property. Empty if invalid.
      • toCSS

        public java.lang.String toCSS()
        Get the JFX CSS for these properties.
        Returns:
        CSS String.
      • getDefaultProps

        public java.util.Map<java.lang.String,​java.lang.Object> getDefaultProps()
        Description copied from interface: Props
        Get default properties.
        Specified by:
        getDefaultProps in interface Props
        Returns:
        Default properties map.
      • getPropsTypes

        public java.util.Map<java.lang.String,​java.lang.Class> getPropsTypes()
        Description copied from interface: Props
        Get property types.
        Specified by:
        getPropsTypes in interface Props
        Returns:
        Map of properties to types.
      • getPropsNames

        public java.util.Map<java.lang.String,​java.lang.String> getPropsNames()
        Description copied from interface: Props
        Get property friendly names.
        Specified by:
        getPropsNames in interface Props
        Returns:
        Map of properties to names.
      • getProps

        public java.util.Map<java.lang.String,​java.lang.Object> getProps()
        Description copied from interface: Props
        Get all current props.
        Specified by:
        getProps in interface Props
        Returns:
        current Props.