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 classBorder.StyleValueEnum 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 Bordercopy()Method to copy the current object to a new oneStringgetBottomColor()Gets the color code of the bottom border.Border.StyleValuegetBottomStyle()Gets the style of bottom cell borderStringgetDiagonalColor()Gets the color code of the diagonal lines.Border.StyleValuegetDiagonalStyle()Gets the style of the diagonal linesStringgetLeftColor()Gets the color code of the left border.Border.StyleValuegetLeftStyle()Gets the style of left cell borderStringgetRightColor()Gets the color code of the right border.Border.StyleValuegetRightStyle()Gets the style of right cell borderstatic StringgetStyleName(Border.StyleValue style)Gets the border style name from the enumStringgetTopColor()Gets the color code of the top border.Border.StyleValuegetTopStyle()Gets the style of top cell borderinthashCode()Override method to calculate the hash of this componentbooleanisDiagonalDown()Gets the downwards diagonal linebooleanisDiagonalUp()Gets the upwards diagonal linebooleanisEmpty()Method to determine whether the object has no values but the default values (means: is empty and must not be processed)voidsetBottomColor(String bottomColor)Sets the color code of the bottom border.voidsetBottomStyle(Border.StyleValue bottomStyle)Sets the style of bottom cell bordervoidsetDiagonalColor(String diagonalColor)Sets the color code of the diagonal lines.voidsetDiagonalDown(boolean diagonalDown)Sets the downwards diagonal linevoidsetDiagonalStyle(Border.StyleValue diagonalStyle)Sets the style of the diagonal linesvoidsetDiagonalUp(boolean diagonalUp)Sets the upwards diagonal linevoidsetLeftColor(String leftColor)Sets the color code of the left border.voidsetLeftStyle(Border.StyleValue leftStyle)Sets the style of left cell bordervoidsetRightColor(String rightColor)Sets the color code of the right border.voidsetRightStyle(Border.StyleValue rightStyle)Sets the style of right cell bordervoidsetTopColor(String topColor)Sets the color code of the top border.voidsetTopStyle(Border.StyleValue topStyle)Sets the style of top cell borderStringtoString()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:
copyin classAbstractStyle- Returns:
- Copy of the current object without the internal ID
-
-