Class Border

  • All Implemented Interfaces:
    Comparable<AbstractStyle>

    public class Border
    extends AbstractStyle
    Class representing a Border entry. The Border entry is used to define frames and cell borders
    Author:
    Raphael Stoeckli
    • Constructor Detail

      • Border

        public Border()
        Default constructor
    • Method Detail

      • getStyleName

        public static String getStyleName​(Border.StyleValue style)
        Gets the border style name from the enum
        Parameters:
        style - Enum to process
        Returns:
        The valid value of the border style as String
      • getLeftStyle

        public Border.StyleValue getLeftStyle()
        Gets the style of left cell border
        Returns:
        Style of left cell border
      • setLeftStyle

        public void setLeftStyle​(Border.StyleValue leftStyle)
        Sets the style of left cell border
        Parameters:
        leftStyle - Style of left cell border
      • getRightStyle

        public Border.StyleValue getRightStyle()
        Gets the style of right cell border
        Returns:
        Style of right cell border
      • setRightStyle

        public void setRightStyle​(Border.StyleValue rightStyle)
        Sets the style of right cell border
        Parameters:
        rightStyle - Style of right cell border
      • getTopStyle

        public Border.StyleValue getTopStyle()
        Gets the style of top cell border
        Returns:
        Style of top cell border
      • setTopStyle

        public void setTopStyle​(Border.StyleValue topStyle)
        Sets the style of top cell border
        Parameters:
        topStyle - Style of top cell border
      • getBottomStyle

        public Border.StyleValue getBottomStyle()
        Gets the style of bottom cell border
        Returns:
        Style of bottom cell border
      • setBottomStyle

        public void setBottomStyle​(Border.StyleValue bottomStyle)
        Sets the style of bottom cell border
        Parameters:
        bottomStyle - Style of bottom cell border
      • getDiagonalStyle

        public Border.StyleValue getDiagonalStyle()
        Gets the style of the diagonal lines
        Returns:
        Style of the diagonal lines
      • setDiagonalStyle

        public void setDiagonalStyle​(Border.StyleValue diagonalStyle)
        Sets the style of the diagonal lines
        Parameters:
        diagonalStyle - Style of the diagonal lines
      • isDiagonalDown

        public boolean isDiagonalDown()
        Gets the downwards diagonal line
        Returns:
        If true, the downwards diagonal line is used
      • setDiagonalDown

        public void setDiagonalDown​(boolean diagonalDown)
        Sets the downwards diagonal line
        Parameters:
        diagonalDown - If true, the downwards diagonal line is used
      • isDiagonalUp

        public boolean isDiagonalUp()
        Gets the upwards diagonal line
        Returns:
        If true, the upwards diagonal line is used
      • setDiagonalUp

        public void setDiagonalUp​(boolean diagonalUp)
        Sets the upwards diagonal line
        Parameters:
        diagonalUp - If true, the upwards diagonal line is used
      • getLeftColor

        public String getLeftColor()
        Gets the color code of the left border. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Returns:
        Color code (ARGB)
      • setLeftColor

        public void setLeftColor​(String leftColor)
        Sets the color code of the left border. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Parameters:
        leftColor - Color code (ARGB)
      • getRightColor

        public String getRightColor()
        Gets the color code of the right border. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Returns:
        Color code (ARGB)
      • setRightColor

        public void setRightColor​(String rightColor)
        Sets the color code of the right border. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Parameters:
        rightColor - Color code (ARGB)
      • getTopColor

        public String getTopColor()
        Gets the color code of the top border. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Returns:
        Color code (ARGB)
      • setTopColor

        public void setTopColor​(String topColor)
        Sets the color code of the top border. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Parameters:
        topColor - Color code (ARGB)
      • getBottomColor

        public String getBottomColor()
        Gets the color code of the bottom border. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Returns:
        Color code (ARGB)
      • setBottomColor

        public void setBottomColor​(String bottomColor)
        Sets the color code of the bottom border. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Parameters:
        bottomColor - Color code (ARGB)
      • getDiagonalColor

        public String getDiagonalColor()
        Gets the color code of the diagonal lines. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Returns:
        Color code (ARGB)
      • setDiagonalColor

        public void setDiagonalColor​(String diagonalColor)
        Sets the color code of the diagonal lines. The value is expressed as hex string with the format AARRGGBB. AA (Alpha) is usually FF
        Parameters:
        diagonalColor - Color code (ARGB)
      • isEmpty

        public boolean isEmpty()
        Method to determine whether the object has no values but the default values (means: is empty and must not be processed)
        Returns:
        True if empty, otherwise false
      • toString

        public String toString()
        Override toString method
        Overrides:
        toString in class Object
        Returns:
        String of a class
      • copy

        public Border copy()
        Method to copy the current object to a new one
        Specified by:
        copy in class AbstractStyle
        Returns:
        Copy of the current object without the internal ID
      • hashCode

        public int hashCode()
        Override method to calculate the hash of this component
        Overrides:
        hashCode in class Object
        Returns:
        Calculated hash as string