- Since:
- 100.0.0
-
Property Summary
PropertiesTypePropertyDescriptionThe background color of the grid.The color of the grid lines. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a background grid with default values.BackgroundGrid(int color, int gridLineColor, float gridLineWidth, float gridSize) Deprecated, for removal: This API element is subject to removal in a future version.BackgroundGrid(Color color, Color gridLineColor, float gridLineWidth, float gridSize) Creates a new instance of BackgroundGrid with the specified color, grid line color, grid line width and grid size. -
Method Summary
Modifier and TypeMethodDescriptionThe background color of the grid.getColor()Gets the value of thecolorproperty.Gets the value of thegridLineColorproperty.floatGets the background grid line width in device-independent pixels (DIP).floatGets the size of each background grid square, in device-independent pixels (DIP).The color of the grid lines.booleanGets whether the grid lines are visible or not.voidsetColor(int argb) Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced bysetColor(Color)voidSets the value of thecolorproperty.voidsetGridLineColor(int argb) Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced bysetGridLineColor(Color)voidsetGridLineColor(Color color) Sets the value of thegridLineColorproperty.voidsetGridLineWidth(float gridLineWidth) Sets the background grid line width in device-independent pixels (DIP).voidsetGridSize(float gridSize) Sets the size of each background grid square, in device-independent pixels (DIP).voidsetVisible(boolean visible) Sets the grid lines visible or not.
-
Property Details
-
color
The background color of the grid.The default value is Color.SILVER - RGBA(192,192,192,255).
Attempting to set the color to null will throw a NullPointerException exception.
- Since:
- 200.0.0
- See Also:
-
gridLineColor
The color of the grid lines.The default value is Color.BLACK - RGBA(0,0,0,255).
Attempting to set the color to null will throw a NullPointerException exception.
- Since:
- 200.0.0
- See Also:
-
-
Constructor Details
-
BackgroundGrid
public BackgroundGrid()Creates a background grid with default values.- Since:
- 100.0.0
-
BackgroundGrid
Creates a new instance of BackgroundGrid with the specified color, grid line color, grid line width and grid size.- Parameters:
color- a background colorgridLineColor- a grid line colorgridLineWidth- the grid line width in device-independent pixels (DIP)gridSize- the grid size in device-independent pixels (DIP)- Throws:
IllegalArgumentException- if color is nullIllegalArgumentException- if gridLineColor is nullIllegalArgumentException- if gridLineWidth is less than zeroIllegalArgumentException- if the gridSize is less than or equal to one- Since:
- 200.0.0
-
BackgroundGrid
@Deprecated(since="200.0.0", forRemoval=true) public BackgroundGrid(int color, int gridLineColor, float gridLineWidth, float gridSize) Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced byBackgroundGrid(Color, Color, float, float)Creates a new instance of BackgroundGrid with the specified color, grid line color, grid line width and grid size.- Parameters:
color- an integer representing the background color as 0xAARRGGBBgridLineColor- an integer representing the grid line color as 0xAARRGGBBgridLineWidth- the grid line width in device-independent pixels (DIP)gridSize- the grid size in device-independent pixels (DIP)- Throws:
IllegalArgumentException- if gridLineWidth is less than zeroIllegalArgumentException- if the gridSize is less than or equal to one- Since:
- 100.0.0
-
-
Method Details
-
colorProperty
The background color of the grid.The default value is Color.SILVER - RGBA(192,192,192,255).
Attempting to set the color to null will throw a NullPointerException exception.
- Returns:
- the
colorproperty - Since:
- 200.0.0
- See Also:
-
getColor
Gets the value of thecolorproperty.- Property description:
- The background color of the grid.
The default value is Color.SILVER - RGBA(192,192,192,255).
Attempting to set the color to null will throw a NullPointerException exception.
- Returns:
- the value of the
colorproperty - Since:
- 200.0.0
- See Also:
-
setColor
Sets the value of thecolorproperty.- Property description:
- The background color of the grid.
The default value is Color.SILVER - RGBA(192,192,192,255).
Attempting to set the color to null will throw a NullPointerException exception.
- Parameters:
color- the value for thecolorproperty- Since:
- 200.0.0
- See Also:
-
setColor
Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced bysetColor(Color)Sets the color of the background.- Parameters:
argb- the color in the format 0xAARRGGBB- Since:
- 100.0.0
- See Also:
-
gridLineColorProperty
The color of the grid lines.The default value is Color.BLACK - RGBA(0,0,0,255).
Attempting to set the color to null will throw a NullPointerException exception.
- Returns:
- the
gridLineColorproperty - Since:
- 200.0.0
- See Also:
-
getGridLineColor
Gets the value of thegridLineColorproperty.- Property description:
- The color of the grid lines.
The default value is Color.BLACK - RGBA(0,0,0,255).
Attempting to set the color to null will throw a NullPointerException exception.
- Returns:
- the value of the
gridLineColorproperty - Since:
- 200.0.0
- See Also:
-
setGridLineColor
Sets the value of thegridLineColorproperty.- Property description:
- The color of the grid lines.
The default value is Color.BLACK - RGBA(0,0,0,255).
Attempting to set the color to null will throw a NullPointerException exception.
- Parameters:
color- the value for thegridLineColorproperty- Since:
- 200.0.0
- See Also:
-
setGridLineColor
Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced bysetGridLineColor(Color)Sets the background grid line color.- Parameters:
argb- the color in the format 0xAARRGGBB- Since:
- 100.0.0
- See Also:
-
getGridLineWidth
public float getGridLineWidth()Gets the background grid line width in device-independent pixels (DIP).- Returns:
- the grid line width in dp. Default is 0.1.
- Since:
- 100.0.0
- See Also:
-
setGridLineWidth
public void setGridLineWidth(float gridLineWidth) Sets the background grid line width in device-independent pixels (DIP).- Parameters:
gridLineWidth- grid line width in dp. Must be greater than or equal to 0. Setting to 0 makes grid lines invisible.- Throws:
IllegalArgumentException- if the gridLineWidth is less than 0- Since:
- 100.0.0
- See Also:
-
getGridSize
public float getGridSize()Gets the size of each background grid square, in device-independent pixels (DIP).- Returns:
- the grid size in dp. Default is 20 * 20 pixels.
- Since:
- 100.0.0
-
setGridSize
public void setGridSize(float gridSize) Sets the size of each background grid square, in device-independent pixels (DIP). The background grid size must be greater than 1.- Parameters:
gridSize- the size of each grid square in device-independent pixels (DIP)- Throws:
IllegalArgumentException- if the gridSize is less than or equal to one- Since:
- 100.0.0
-
isVisible
public boolean isVisible()Gets whether the grid lines are visible or not.In the context of
MapView, this value indicates if thegridLineColorProperty()is visible.In the context of
SceneView, this value indicates if both theBackgroundGrid.colorProperty()and theBackgroundGrid.gridLineColorProperty()are visible.The default value is true.
- Returns:
- true if grid lines are visible on the
BackgroundGrid.colorProperty(), false otherwise - Since:
- 100.7.0
- See Also:
-
setVisible
public void setVisible(boolean visible) Sets the grid lines visible or not.In the context of
MapView, this value indicates if thegridLineColorProperty()is visible.In the context of
SceneView, this value indicates if both theBackgroundGrid.colorProperty()and theBackgroundGrid.gridLineColorProperty()are visible.- Parameters:
visible- true if grid lines are to be visible on theBackgroundGrid.colorProperty(), false otherwise- Since:
- 100.7.0
- See Also:
-
BackgroundGrid(Color, Color, float, float)