public class TLspGeorefGridOverlayLabelBuilder extends Object
Builder that makes it possible to create Georef overlay labels. These labels are added to the view and show (part of) a georef coordinate. These labels can have a pre-defined content, and style.
The overlay label builder can be used in 2 ways:
TLspGeorefGridLayerBuilder
.
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:
JComponent component = TLspGeorefGridOverlayLabelBuilder.newBuilder(view)
.content(TLspGeorefGridOverlayLabelBuilder.Content.COORDINATE_AT_CENTER)
.style(gridStyle)
.build();
Modifier and Type | Class and Description |
---|---|
static class |
TLspGeorefGridOverlayLabelBuilder.Content
The content that is displayed in the label.
|
Modifier and Type | Method and Description |
---|---|
TLspGeorefGridOverlayLabelBuilder |
all(TLspGeorefGridOverlayLabelBuilder aBuilder)
Copies all properties from the given builder.
|
JComponent |
build()
Creates an Georef grid label.
|
TLspGeorefGridOverlayLabelBuilder |
content(TLspGeorefGridOverlayLabelBuilder.Content aContent)
The content which is being displayed.
|
static TLspGeorefGridOverlayLabelBuilder |
newBuilder()
Creates a new builder, capable of adding Georef grid labels.
|
TLspGeorefGridOverlayLabelBuilder |
style(TLspGeorefGridStyle aGeorefGridStyle)
The style with which the overlay label is being displayed.
|
TLspGeorefGridOverlayLabelBuilder |
view(ILspView aView)
The view for which the overlay labels should be added.
|
public static TLspGeorefGridOverlayLabelBuilder newBuilder()
public TLspGeorefGridOverlayLabelBuilder view(ILspView aView)
aView
- the view.public TLspGeorefGridOverlayLabelBuilder content(TLspGeorefGridOverlayLabelBuilder.Content aContent)
COORDINATE_AT_CENTER
.aContent
- coordinate which is being displayed.public TLspGeorefGridOverlayLabelBuilder style(TLspGeorefGridStyle aGeorefGridStyle)
TLspGeorefGridStyle.Builder.overlay()
are used. Only the following styles are supported:
When setting a format, it is ignored when using
COMMON_VIEW_COORDINATE
.aGeorefGridStyle
- the Georef grid style.public TLspGeorefGridOverlayLabelBuilder all(TLspGeorefGridOverlayLabelBuilder aBuilder)
aBuilder
- a builderpublic JComponent build()