Class FontProps

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

    public class FontProps
    extends java.util.HashMap<java.lang.String,​java.lang.Object>
    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 ALIGNMENT  
      protected static java.lang.Class ALIGNMENT_TYPE  
      static java.lang.String BOLD  
      protected static java.lang.Class BOLD_TYPE  
      static java.lang.String COLOUR  
      protected static java.lang.Class COLOUR_TYPE  
      static java.lang.String FONT  
      protected static java.lang.Class FONT_TYPE  
      static java.lang.String IT  
      protected static java.lang.Class IT_TYPE  
      static java.util.Map<java.lang.String,​java.lang.Object> PROP_DEFAULTS
      Contains default values for known props.
      static java.util.Map<java.lang.String,​java.lang.Class> PROPS_MAP
      Contains known props and their classes.
      static java.lang.String SIZE  
      protected static java.lang.Class SIZE_TYPE  
      static java.lang.String US  
      protected static java.lang.Class US_TYPE  
      static java.lang.String VALIGNMENT  
      protected static java.lang.Class VALIGNMENT_TYPE  
    • Constructor Summary

      Constructors 
      Constructor Description
      FontProps()
      Empty constructor.
      FontProps​(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.Optional<java.lang.Object> getProp​(java.lang.String prop)
      Return value of specified property.
      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

      • US_TYPE

        protected static final java.lang.Class US_TYPE
      • IT_TYPE

        protected static final java.lang.Class IT_TYPE
      • BOLD_TYPE

        protected static final java.lang.Class BOLD_TYPE
      • SIZE_TYPE

        protected static final java.lang.Class SIZE_TYPE
      • FONT_TYPE

        protected static final java.lang.Class FONT_TYPE
      • COLOUR_TYPE

        protected static final java.lang.Class COLOUR_TYPE
      • ALIGNMENT_TYPE

        protected static final java.lang.Class ALIGNMENT_TYPE
      • VALIGNMENT_TYPE

        protected static final java.lang.Class VALIGNMENT_TYPE
      • PROPS_MAP

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

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

      • FontProps

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

        public FontProps()
        Empty constructor.
    • Method Detail

      • getProp

        public final java.util.Optional<java.lang.Object> getProp​(java.lang.String prop)
        Return value of specified property.
        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.