public class TLspGARSGridOverlayLabelBuilder extends Object
Builder that makes it possible to create Global Area Reference System (GARS) overlay labels. These labels are added to the view and show (part of) a GARS coordinate. The labels can have a pre-defined content and style.
The overlay label builder can be used in 2 ways:
TLspGARSGridLayerBuilder
.
When using this method, the overlay label will be added to the overlay panel of the view. On top of that, the visibility
of the overlay label will be synchronized with the visibility of the layer.An example of how to use this builder:
// See TLspGARSGridStyle for more information on configuring the grid style
JComponent component = TLspGARSGridOverlayLabelBuilder
.newBuilder()
.view(view)
.content(TLspGARSGridOverlayLabelBuilder.Content.COORDINATE_AT_CENTER)
.build();
Modifier and Type | Class and Description |
---|---|
static class |
TLspGARSGridOverlayLabelBuilder.Content
The content that is displayed in the label.
|
Modifier and Type | Method and Description |
---|---|
TLspGARSGridOverlayLabelBuilder |
all(TLspGARSGridOverlayLabelBuilder aBuilder)
Copies all properties from the given builder.
|
JComponent |
build()
Creates an GARS grid label.
|
TLspGARSGridOverlayLabelBuilder |
content(TLspGARSGridOverlayLabelBuilder.Content aContent)
The content which is being displayed.
|
static TLspGARSGridOverlayLabelBuilder |
newBuilder()
Creates a new builder, capable of adding GARS grid labels.
|
TLspGARSGridOverlayLabelBuilder |
style(TLspGARSGridStyle aGARSGridStyle)
The style with which the overlay label is being displayed.
|
TLspGARSGridOverlayLabelBuilder |
view(ILspView aView)
The view for which the overlay labels should be added.
|
public static TLspGARSGridOverlayLabelBuilder newBuilder()
public TLspGARSGridOverlayLabelBuilder view(ILspView aView)
aView
- the view.public TLspGARSGridOverlayLabelBuilder content(TLspGARSGridOverlayLabelBuilder.Content aContent)
COORDINATE_AT_CENTER
.aContent
- coordinate which is being displayed.public TLspGARSGridOverlayLabelBuilder style(TLspGARSGridStyle aGARSGridStyle)
TLspGARSGridStyle.Builder.overlay()
are used. Only the following styles are supported:
When setting a format, it is ignored when using
COMMON_VIEW_COORDINATE
.aGARSGridStyle
- the GARS grid style.public TLspGARSGridOverlayLabelBuilder all(TLspGARSGridOverlayLabelBuilder aBuilder)
aBuilder
- a builderpublic JComponent build()