use of com.revolsys.swing.map.list.LayerGroupListModel in project com.revolsys.open by revolsys.
the class MapPanel method newToolBarLayerControls.
private void newToolBarLayerControls() {
this.toolBar.addButtonTitleIcon("layers", "Refresh All Layers", "arrow_refresh", this::refresh);
this.selectCoordinateSystem = new SelectMapCoordinateSystem(this);
this.toolBar.addComponent("layers", this.selectCoordinateSystem);
final LayerGroupListModel baseMapLayersModel = new LayerGroupListModel(this.baseMapLayers, true);
this.baseMapLayerField = baseMapLayersModel.newBaseComboBox("baseMapLayer");
this.baseMapLayerField.setMaximumSize(new Dimension(200, 22));
ConsumerSelectedItemListener.addItemListener(this.baseMapLayerField, this::setBaseMapLayer);
if (this.baseMapLayers.getLayerCount() > 0) {
this.baseMapLayerField.setSelectedIndex(1);
}
this.baseMapLayerField.setToolTipText("Base Map");
this.toolBar.addComponent("layers", this.baseMapLayerField);
Property.addListener(this.baseMapOverlay, "layer", this);
this.baseMapLayerField.setSelectedIndex(0);
this.toolBar.addButtonTitleIcon("layers", "Refresh Base Map", "map_refresh", this.baseMapOverlay::refresh);
}
Aggregations