public static final class MgrsGridLayer.Builder extends Object implements AutoCloseable
MgrsGridLayer
.
Configuration on how to display the MGRS grid is done using a MgrsGrid
which can be created using a MgrsGrid.Builder
.
Constructor and Description |
---|
Builder(MgrsGridLayer.Builder other) |
Modifier and Type | Method and Description |
---|---|
MgrsGridLayer |
build()
Returns the MGRS layer.
|
void |
close() |
protected void |
finalize() |
MgrsGridLayer.Builder |
grid(MgrsGrid grid)
Sets the MGRS grid settings.
|
MgrsGridLayer.Builder |
labeled(boolean labeled)
Sets whether the layer should display labels initially.
|
MgrsGridLayer.Builder |
title(String title)
Sets the title to use for the layer.
|
MgrsGridLayer.Builder |
visible(boolean visible)
Sets whether the layer should be visible initially.
|
public Builder(@NotNull MgrsGridLayer.Builder other)
public void close()
close
in interface AutoCloseable
@NotNull public MgrsGridLayer build() throws IllegalStateException
IllegalStateException
- If not all mandatory parameters are set.@NotNull public MgrsGridLayer.Builder title(@NotNull String title)
If not set, the title defaults to 'MGRS'.
title
- the title for the layer.@NotNull public MgrsGridLayer.Builder visible(boolean visible)
Default is true
.
visible
- the visibility.@NotNull public MgrsGridLayer.Builder labeled(boolean labeled)
Default is true
.
labeled
- whether the layer should display labels initially.@NotNull public MgrsGridLayer.Builder grid(@NotNull MgrsGrid grid)
grid
- the MGRS grid settings.