Package ch.rabanti.picoxlsx4j.style
Class Border
- java.lang.Object
-
- ch.rabanti.picoxlsx4j.style.AbstractStyle
-
- ch.rabanti.picoxlsx4j.style.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Border.StyleValue
Enum for the border style
-
Constructor Summary
Constructors Constructor Description Border()
Default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Border
copy()
Method to copy the current object to a new oneString
getBottomColor()
Gets the color code of the bottom border.Border.StyleValue
getBottomStyle()
Gets the style of bottom cell borderString
getDiagonalColor()
Gets the color code of the diagonal lines.Border.StyleValue
getDiagonalStyle()
Gets the style of the diagonal linesString
getLeftColor()
Gets the color code of the left border.Border.StyleValue
getLeftStyle()
Gets the style of left cell borderString
getRightColor()
Gets the color code of the right border.Border.StyleValue
getRightStyle()
Gets the style of right cell borderstatic String
getStyleName(Border.StyleValue style)
Gets the border style name from the enumString
getTopColor()
Gets the color code of the top border.Border.StyleValue
getTopStyle()
Gets the style of top cell borderint
hashCode()
Override method to calculate the hash of this componentboolean
isDiagonalDown()
Gets the downwards diagonal lineboolean
isDiagonalUp()
Gets the upwards diagonal lineboolean
isEmpty()
Method to determine whether the object has no values but the default values (means: is empty and must not be processed)void
setBottomColor(String bottomColor)
Sets the color code of the bottom border.void
setBottomStyle(Border.StyleValue bottomStyle)
Sets the style of bottom cell bordervoid
setDiagonalColor(String diagonalColor)
Sets the color code of the diagonal lines.void
setDiagonalDown(boolean diagonalDown)
Sets the downwards diagonal linevoid
setDiagonalStyle(Border.StyleValue diagonalStyle)
Sets the style of the diagonal linesvoid
setDiagonalUp(boolean diagonalUp)
Sets the upwards diagonal linevoid
setLeftColor(String leftColor)
Sets the color code of the left border.void
setLeftStyle(Border.StyleValue leftStyle)
Sets the style of left cell bordervoid
setRightColor(String rightColor)
Sets the color code of the right border.void
setRightStyle(Border.StyleValue rightStyle)
Sets the style of right cell bordervoid
setTopColor(String topColor)
Sets the color code of the top border.void
setTopStyle(Border.StyleValue topStyle)
Sets the style of top cell borderString
toString()
Override toString method-
Methods inherited from class ch.rabanti.picoxlsx4j.style.AbstractStyle
compareTo, equals, getInternalID, setInternalID
-
-
-
-
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
-
copy
public Border copy()
Method to copy the current object to a new one- Specified by:
copy
in classAbstractStyle
- Returns:
- Copy of the current object without the internal ID
-
-