Class TilesFactoryDefaults
- java.lang.Object
-
- org.pepstock.charba.client.colors.tiles.TilesFactoryDefaults
-
public final class TilesFactoryDefaults extends Object
Contains the defaults configuration of tile builder.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static IsColor
DEFAULT_BACKGROUND_COLOR
Default background color, "rgba(100, 100, 100, 0.7)".static String
DEFAULT_BACKGROUND_COLOR_AS_STRING
Default background color as string, "rgba(100, 100, 100, 0.7)".static CapStyle
DEFAULT_LINE_CAP
Default to determine the shape used to draw the end points of lines,CapStyle.ROUND
.static JoinStyle
DEFAULT_LINE_JOIN
Default to determine the shape used to join two line segments where they meet,JoinStyle.ROUND
.static IsShape
DEFAULT_SHAPE
Default the shape,Shape.SQUARE
.static IsColor
DEFAULT_SHAPE_COLOR
Default shape color, "rgba(255, 255, 255, 0.8)".static String
DEFAULT_SHAPE_COLOR_AS_STRING
Default shape color as string, "rgba(255, 255, 255, 0.8)".static int
DEFAULT_SIZE
Default tile size, 20.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsColor
getBackgroundColor()
Returns the background color of tile.String
getBackgroundColorAsString()
Returns the background color of tile.CapStyle
getLineCap()
Returns the lineCap, to determine the shape used to draw the end points of lines.JoinStyle
getLineJoin()
Returns the lineJoin, to determine the shape used to join two line segments where they meet.IsShape
getShape()
Returns the shape of tile.IsColor
getShapeColor()
Returns the shape color of tile.String
getShapeColorAsString()
Returns the shape color of tile.int
getSize()
Returns the size of the tile.void
setBackgroundColor(String backgroundColor)
Sets the background color of tile as string.void
setBackgroundColor(IsColor backgroundColor)
Sets the background color of tile.void
setLineCap(CapStyle lineCap)
Sets the lineCap, to determine the shape used to draw the end points of lines.void
setLineJoin(JoinStyle lineJoin)
Sets the lineJoin, to determine the shape used to join two line segments where they meet.void
setShape(IsShape shape)
Sets the shape of the tile.void
setShapeColor(String shapeColor)
Sets the shape color of tile.void
setShapeColor(IsColor shapeColor)
Sets the shape color of tile.void
setSize(int size)
Sets the size of the tile, minimum size is the default size.
-
-
-
Field Detail
-
DEFAULT_BACKGROUND_COLOR_AS_STRING
public static final String DEFAULT_BACKGROUND_COLOR_AS_STRING
Default background color as string, "rgba(100, 100, 100, 0.7)".- See Also:
- Constant Field Values
-
DEFAULT_SHAPE_COLOR_AS_STRING
public static final String DEFAULT_SHAPE_COLOR_AS_STRING
Default shape color as string, "rgba(255, 255, 255, 0.8)".- See Also:
- Constant Field Values
-
DEFAULT_BACKGROUND_COLOR
public static final IsColor DEFAULT_BACKGROUND_COLOR
Default background color, "rgba(100, 100, 100, 0.7)".
-
DEFAULT_SHAPE_COLOR
public static final IsColor DEFAULT_SHAPE_COLOR
Default shape color, "rgba(255, 255, 255, 0.8)".
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE
Default tile size, 20.- See Also:
- Constant Field Values
-
DEFAULT_LINE_CAP
public static final CapStyle DEFAULT_LINE_CAP
Default to determine the shape used to draw the end points of lines,CapStyle.ROUND
.
-
DEFAULT_SHAPE
public static final IsShape DEFAULT_SHAPE
Default the shape,Shape.SQUARE
.
-
DEFAULT_LINE_JOIN
public static final JoinStyle DEFAULT_LINE_JOIN
Default to determine the shape used to join two line segments where they meet,JoinStyle.ROUND
.
-
-
Method Detail
-
getShape
public IsShape getShape()
Returns the shape of tile. Ifnull
, returns the default one.- Returns:
- the shape of tile. If
null
, returns the default one
-
setShape
public void setShape(IsShape shape)
Sets the shape of the tile.- Parameters:
shape
- the shape of tile
-
getSize
public final int getSize()
Returns the size of the tile.- Returns:
- the size of the tile
-
setSize
public void setSize(int size)
Sets the size of the tile, minimum size is the default size.- Parameters:
size
- the size to set
-
getBackgroundColorAsString
public String getBackgroundColorAsString()
Returns the background color of tile. Ifnull
, returns the default one.- Returns:
- the background color of tile. If
null
, returns the default one
-
getBackgroundColor
public IsColor getBackgroundColor()
Returns the background color of tile. Ifnull
, returns the default one.- Returns:
- the background color of tile. If
null
, returns the default one
-
setBackgroundColor
public void setBackgroundColor(String backgroundColor)
Sets the background color of tile as string.- Parameters:
backgroundColor
- the background color of tile as string
-
setBackgroundColor
public void setBackgroundColor(IsColor backgroundColor)
Sets the background color of tile.- Parameters:
backgroundColor
- the background color of tile
-
getShapeColorAsString
public String getShapeColorAsString()
Returns the shape color of tile. Ifnull
, returns the default one.- Returns:
- the shape color of tile. If
null
, returns the default one
-
getShapeColor
public IsColor getShapeColor()
Returns the shape color of tile. Ifnull
, returns the default one.- Returns:
- the shape color of tile. If
null
, returns the default one
-
setShapeColor
public void setShapeColor(String shapeColor)
Sets the shape color of tile.- Parameters:
shapeColor
- the shape color of tile
-
setShapeColor
public void setShapeColor(IsColor shapeColor)
Sets the shape color of tile.- Parameters:
shapeColor
- the shape color of tile
-
getLineCap
public CapStyle getLineCap()
Returns the lineCap, to determine the shape used to draw the end points of lines. Ifnull
, returns the default one.- Returns:
- lineCap the lineCap to determine the shape used to draw the end points of lines. If
null
, returns the default one
-
setLineCap
public void setLineCap(CapStyle lineCap)
Sets the lineCap, to determine the shape used to draw the end points of lines.- Parameters:
lineCap
- the lineCap to determine the shape used to draw the end points of lines
-
getLineJoin
public JoinStyle getLineJoin()
Returns the lineJoin, to determine the shape used to join two line segments where they meet. Ifnull
, returns the default one.- Returns:
- lineJoin the lineJoin to determine the shape used to join two line segments where they meet. If
null
, returns the default one
-
setLineJoin
public void setLineJoin(JoinStyle lineJoin)
Sets the lineJoin, to determine the shape used to join two line segments where they meet.- Parameters:
lineJoin
- the lineJoin, to determine the shape used to join two line segments where they meet.
-
-