예제 #1
0
 private void setRootLayer(ILayer newRoot) {
   if (layerModel != null) {
     layerModel.removeLayerListenerRecursively(openerListener);
   }
   super.setLayerModel(newRoot);
   layerModel.addLayerListenerRecursively(openerListener);
 }
예제 #2
0
 @Override
 public void setSelectedStyles(Style[] selectedStyles) {
   checkIsOpen();
   super.setSelectedStyles(selectedStyles);
   // DEPRECATED LISTENERS
   for (MapContextListener listener : listeners) {
     listener.layerSelectionChanged(this);
   }
 }
예제 #3
0
  @Override
  public void setSelectedLayers(ILayer[] selectedLayers) {
    checkIsOpen();
    ArrayList<ILayer> filtered = new ArrayList<ILayer>();
    for (ILayer layer : selectedLayers) {
      if (layerModel.getLayerByName(layer.getName()) != null) {
        filtered.add(layer);
      }
    }
    super.setSelectedLayers(filtered.toArray(new ILayer[filtered.size()]));

    // DEPRECATED LISTENERS
    for (MapContextListener listener : listeners) {
      listener.layerSelectionChanged(this);
    }
  }