Class FillImpl

    • Field Detail

      • DEFAULT

        public static final Fill DEFAULT
      • NULL

        public static final Fill NULL
    • Constructor Detail

      • FillImpl

        protected FillImpl()
        Creates a new instance of DefaultFill
    • Method Detail

      • setFilterFactory

        public void setFilterFactory​(FilterFactory factory)
      • getColor

        public Expression getColor()
        This parameter gives the solid color that will be used for a Fill.
        The color value is RGB-encoded using two hexadecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexadecimal digits between A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks). The default color is defined to be 50% gray ("#808080").

        Note: in CSS this parameter is just called Fill and not Color.

        Specified by:
        getColor in interface Fill
        Returns:
        The color of the Fill encoded as a hexidecimal RGB value.
      • setColor

        public void setColor​(Expression rgb)
        This parameter gives the solid color that will be used for a Fill.
        The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexidecimal digits between A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks).

        Note: in CSS this parameter is just called Fill and not Color.

        Specified by:
        setColor in interface Fill
        Parameters:
        rgb - The color of the Fill encoded as a hexidecimal RGB value.
      • setColor

        public void setColor​(String rgb)
      • getOpacity

        public Expression getOpacity()
        This specifies the level of translucency to use when rendering the fill.
        The value is encoded as a floating-point value between 0.0 and 1.0 with 0.0 representing totally transparent and 1.0 representing totally opaque, with a linear scale of translucency for intermediate values.
        For example, "0.65" would represent 65% opacity. The default value is 1.0 (opaque).
        Specified by:
        getOpacity in interface Fill
        Returns:
        The opacity of the fill, where 0.0 is completely transparent and 1.0 is completely opaque.
      • setOpacity

        public void setOpacity​(Expression opacity)
        Setter for property opacity.
        Specified by:
        setOpacity in interface Fill
        Parameters:
        opacity - New value of property opacity.
      • setOpacity

        public void setOpacity​(String opacity)
      • getGraphicFill

        public Graphic getGraphicFill()
        This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.
        Specified by:
        getGraphicFill in interface Fill
        Returns:
        graphic The graphic to use as a stipple fill. If null then no Stipple fill should be used.
      • setGraphicFill

        public void setGraphicFill​(Graphic graphicFill)
        Setter for property graphic.
        Specified by:
        setGraphicFill in interface Fill
        Parameters:
        graphicFill - New value of property graphic.
      • accept

        public Object accept​(TraversingStyleVisitor visitor,
                             Object data)
        Description copied from interface: Fill
        calls the visit method of a StyleVisitor
        Specified by:
        accept in interface Fill
        Parameters:
        visitor - the style visitor
      • hashCode

        public int hashCode()
        Generates a hashcode for the FillImpl.
        Overrides:
        hashCode in class Object
        Returns:
        The hashcode.
      • equals

        public boolean equals​(Object oth)
        Compares a FillImpl with another for equality.

        Two FillImpls are equal if they contain the same, color, backgroundcolor, opacity and graphicFill.

        Overrides:
        equals in class Object
        Parameters:
        oth - The other FillImpl
        Returns:
        True if this FillImpl is equal to oth.