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