Class VisualProps

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

    public class VisualProps
    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 ALPHA  
      protected static java.lang.Class ALPHA_TYPE  
      static java.lang.String B_SHADE_SIZE  
      static java.lang.String DELAY_SECS  
      protected static java.lang.Class DELAY_SECS_TYPE  
      static java.lang.String DISP_SECS  
      protected static java.lang.Class DISP_SECS_TYPE  
      static java.lang.String FILL  
      protected static java.lang.Class FILL_TYPE  
      static java.lang.String ID  
      protected static java.lang.Class ID_TYPE  
      static java.lang.String L_SHADE_SIZE  
      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.
      static java.lang.String R_SHADE_SIZE  
      static java.lang.String ROT  
      protected static java.lang.Class ROT_TYPE  
      static java.lang.String SHADE_COL  
      protected static java.lang.Class SHADE_COL_TYPE  
      static java.lang.String SHADE_SIZE  
      protected static java.lang.Class SHADE_SIZE_TYPE  
      static java.lang.String T_SHADE_SIZE  
      static java.lang.String VISIBLE  
      protected static java.lang.Class VISIBLE_TYPE  
      static java.lang.String X_ORIG  
      static java.lang.String X_SIZE  
      protected static java.lang.Class X_SZ_TYPE  
      protected static java.lang.Class X_TYPE  
      static java.lang.String Y_ORIG  
      static java.lang.String Y_SIZE  
      protected static java.lang.Class Y_SZ_TYPE  
      protected static java.lang.Class Y_TYPE  
      static java.lang.String Z_IND  
      protected static java.lang.Class Z_TYPE  
    • Constructor Summary

      Constructors 
      Constructor Description
      VisualProps()
      Empty constructor.
      VisualProps​(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.util.Optional<javafx.scene.effect.DropShadow> makeShadow()
      Maybe get a shadow for the item.
      • 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

      • SHADE_COL_TYPE

        protected static final java.lang.Class SHADE_COL_TYPE
      • SHADE_SIZE_TYPE

        protected static final java.lang.Class SHADE_SIZE_TYPE
      • ALPHA_TYPE

        protected static final java.lang.Class ALPHA_TYPE
      • FILL_TYPE

        protected static final java.lang.Class FILL_TYPE
      • DISP_SECS_TYPE

        protected static final java.lang.Class DISP_SECS_TYPE
      • DELAY_SECS_TYPE

        protected static final java.lang.Class DELAY_SECS_TYPE
      • VISIBLE_TYPE

        protected static final java.lang.Class VISIBLE_TYPE
      • ID_TYPE

        protected static final java.lang.Class ID_TYPE
      • X_TYPE

        protected static final java.lang.Class X_TYPE
      • Y_TYPE

        protected static final java.lang.Class Y_TYPE
      • Z_TYPE

        protected static final java.lang.Class Z_TYPE
      • X_SZ_TYPE

        protected static final java.lang.Class X_SZ_TYPE
      • Y_SZ_TYPE

        protected static final java.lang.Class Y_SZ_TYPE
      • ROT_TYPE

        protected static final java.lang.Class ROT_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.
    • Constructor Detail

      • VisualProps

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

        public VisualProps()
        Empty constructor.
    • Method Detail

      • getProp

        public final 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.
      • makeShadow

        public final java.util.Optional<javafx.scene.effect.DropShadow> makeShadow()
        Maybe get a shadow for the item.
        Returns:
        Maybe shadow.
      • getDefaultProps

        public final 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 final 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 final 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.