示例#1
0
 @Override
 public void setSelectedStyles(Style[] selectedStyles) {
   checkIsOpen();
   super.setSelectedStyles(selectedStyles);
   // DEPRECATED LISTENERS
   for (MapContextListener listener : listeners) {
     listener.layerSelectionChanged(this);
   }
 }
示例#2
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);
    }
  }