Package com.github.miachm.sods
Class Borders
java.lang.Object
com.github.miachm.sods.Borders
This a class which represents the nature of the borders of a cell.
-
Constructor Summary
ConstructorsConstructorDescriptionBorders()Borders(boolean border) Constructor with all borders the same, and default properties: 0.035cm solid #000000Borders(boolean borderTop, boolean borderBottom, boolean borderLeft, boolean borderRight) Constructor specifying which borders to activate, with default properties: 0.035cm solid #000000.Constructor with all borders the same, specifying its properties.Borders(boolean borderTop, String borderTopProperties, boolean borderBottom, String borderBottomProperties, boolean borderLeft, String borderLeftProperties, boolean borderRight, String borderRightProperties) Constructor specifying which borders to activate, specifying their properties. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTells if there is any border set on.booleanGets bottom border properties.Gets left border properties.Gets global border properties.Gets right border properties.Gets top border properties.Returns a Map representing this class as css-styles.inthashCode()booleanisBorder()Determines if the style has all borders or not.booleanDetermines if the style has bottom border or not.booleanDetermines if the style has left border or not.booleanDetermines if the style has right border or not.booleanDetermines if the style has top border or not.voidsetBorder(boolean border) Sets all borders on/off.voidsetBorderBottom(boolean borderBottom) Sets bottom border on/off.voidsetBorderBottomProperties(String borderBottomProperties) Sets bottom border properties.voidsetBorderLeft(boolean borderLeft) Sets left border on/off.voidsetBorderLeftProperties(String borderLeftProperties) Sets left border properties.voidsetBorderProperties(String borderProperties) Sets global border properties.voidsetBorderRight(boolean borderRight) Sets right border on/off.voidsetBorderRightProperties(String borderRightProperties) Sets right border properties.voidsetBorderTop(boolean borderTop) Sets top border on/off.voidsetBorderTopProperties(String borderTopProperties) Sets top border properties.
-
Constructor Details
-
Borders
public Borders() -
Borders
public Borders(boolean border) Constructor with all borders the same, and default properties: 0.035cm solid #000000- Parameters:
border- Boolean setting all borders on/off.
-
Borders
Constructor with all borders the same, specifying its properties.- Parameters:
border- Boolean setting all borders on/off.borderProperties- Border properties.
-
Borders
public Borders(boolean borderTop, boolean borderBottom, boolean borderLeft, boolean borderRight) Constructor specifying which borders to activate, with default properties: 0.035cm solid #000000.- Parameters:
borderTop- Boolean setting top border on/off.borderBottom- Boolean setting bottom border on/off.borderLeft- Boolean setting left border on/off.borderRight- Boolean setting right border on/off.
-
Borders
public Borders(boolean borderTop, String borderTopProperties, boolean borderBottom, String borderBottomProperties, boolean borderLeft, String borderLeftProperties, boolean borderRight, String borderRightProperties) Constructor specifying which borders to activate, specifying their properties.- Parameters:
borderTop- Boolean setting top border on/off.borderTopProperties- Top border properties.borderBottom- Boolean setting bottom border on/off.borderBottomProperties- Bottom border properties.borderLeft- Boolean setting left border on/off.borderLeftProperties- Left border properties.borderRight- Boolean setting right border on/off.borderRightProperties- Right border properties.
-
-
Method Details
-
isBorder
public boolean isBorder()Determines if the style has all borders or not.- Returns:
- true if the style has all borders, false otherwise.
-
setBorder
public void setBorder(boolean border) Sets all borders on/off.- Parameters:
border- Boolean representing all borders set on/off.
-
getBorderProperties
Gets global border properties.- Returns:
- Global border properties.
-
setBorderProperties
Sets global border properties.- Parameters:
borderProperties- Global border properties.
-
isBorderTop
public boolean isBorderTop()Determines if the style has top border or not.- Returns:
- true if the style has top border, false otherwise.
-
setBorderTop
public void setBorderTop(boolean borderTop) Sets top border on/off.- Parameters:
borderTop- Boolean representing top border set on/off.
-
getBorderTopProperties
Gets top border properties.- Returns:
- Top border properties.
-
setBorderTopProperties
Sets top border properties.- Parameters:
borderTopProperties- Top border properties.
-
isBorderBottom
public boolean isBorderBottom()Determines if the style has bottom border or not.- Returns:
- true if the style has bottom border, false otherwise.
-
setBorderBottom
public void setBorderBottom(boolean borderBottom) Sets bottom border on/off.- Parameters:
borderBottom- Boolean representing bottom border set on/off.
-
getBorderBottomProperties
Gets bottom border properties.- Returns:
- Bottom border properties.
-
setBorderBottomProperties
Sets bottom border properties.- Parameters:
borderBottomProperties- Bottom border properties.
-
isBorderLeft
public boolean isBorderLeft()Determines if the style has left border or not.- Returns:
- true if the style has left border, false otherwise.
-
setBorderLeft
public void setBorderLeft(boolean borderLeft) Sets left border on/off.- Parameters:
borderLeft- Boolean representing left border set on/off.
-
getBorderLeftProperties
Gets left border properties.- Returns:
- Left border properties.
-
setBorderLeftProperties
Sets left border properties.- Parameters:
borderLeftProperties- Left border properties.
-
isBorderRight
public boolean isBorderRight()Determines if the style has right border or not.- Returns:
- true if the style has right border, false otherwise.
-
setBorderRight
public void setBorderRight(boolean borderRight) Sets right border on/off.- Parameters:
borderRight- Boolean representing right border set on/off.
-
getBorderRightProperties
Gets right border properties.- Returns:
- Right border properties.
-
setBorderRightProperties
Sets right border properties.- Parameters:
borderRightProperties- Right border properties.
-
anyBorder
public boolean anyBorder()Tells if there is any border set on.- Returns:
- true if there is any border, false otherwise.
-
getCssStyles
Returns a Map representing this class as css-styles. For example, if you set top and bottom borders without specifying their properties, you will get a Map with 2 keys: border-top = 0.035cm solid #000000 border-bottom = 0.035cm solid #000000- Returns:
- A map with the CSS representation of this class
-
hashCode
public int hashCode() -
equals
-