Class Outline

  • All Implemented Interfaces:
    CssProperty, StateChangeInformer<CssProperty>, java.io.Serializable, java.lang.Cloneable


    public class Outline
    extends AbstractCssProperty<Outline>
    implements StateChangeInformer<CssProperty>
    
     outline: outline-color outline-style outline-width|initial|inherit;
    
     An outline is a line that is drawn around elements (outside the borders) to make the element "stand out".
    
     The outline shorthand property sets all the outline properties in one declaration.
    
     The properties that can be set, are (in order): outline-color, outline-style, outline-width.
    
     If one of the values above are missing, e.g. "outline:solid #ff0000;", the default value for the missing property will be inserted, if any.
    
     Note: The outline is not a part of the element's dimensions, therefore the element's width and height properties do not contain the width of the outline.
     Default value:  invert none medium
     Inherited:      no
     Animatable:     yes
     Version:        CSS2
     JavaScript syntax:      object.style.outline="#0000FF dotted 5px"
     
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Field Detail

      • LOGGER

        public static final java.util.logging.Logger LOGGER
    • Constructor Detail

      • Outline

        public Outline​()
        The value medium none black will be assigned as the cssValue.
        Since:
        1.0.0
      • Outline

        public Outline​(java.lang.String cssValue)
        Parameters:
        cssValue - the css value to set.
      • Outline

        public Outline​(Outline outline)
        Parameters:
        widthtCss - the Outline object from which the cssValue to set.And, null will throw NullValueException
    • Method Detail

      • getCssName

        public java.lang.String getCssName​()
        Specified by:
        getCssName in interface CssProperty
        Returns:
        the name portion in style, eg align-content for style align-content: center.
      • getCssValue

        public java.lang.String getCssValue​()
        Specified by:
        getCssValue in interface CssProperty
        Returns:
        the value portion in style, eg center for style align-content: center.
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object
      • setCssValue

        public Outline setCssValue​(java.lang.String cssValue)
        Specified by:
        setCssValue in class AbstractCssProperty<Outline>
        Parameters:
        cssValue - the value should be in the format of medium none color, initial or inherit. null is considered as an invalid value and it will throw NullValueException.
        Returns:
        the current object.
        Since:
        1.0.0
      • isValid

        public static boolean isValid​(java.lang.String cssValue)
        checks the given css value is valid for this class. It does't do a strict validation.
        Parameters:
        cssValue -
        Returns:
        Since:
        1.0.0
      • setAsInitial

        public void setAsInitial​()
        sets as initial
        Since:
        1.0.0
      • setAsInherit

        public void setAsInherit​()
        sets as inherit
        Since:
        1.0.0
      • getOutlineColor

        public OutlineColor getOutlineColor​()
      • getOutlineStyle

        public OutlineStyle getOutlineStyle​()
      • getOutlineWidth

        public OutlineWidth getOutlineWidth​()
      • addPredefinedConstant

        protected void addPredefinedConstant​(java.lang.String constant)
        Since:
        1.0.0