Ejemplo n.º 1
0
 private void setRootLayer(ILayer newRoot) {
   if (layerModel != null) {
     layerModel.removeLayerListenerRecursively(openerListener);
   }
   super.setLayerModel(newRoot);
   layerModel.addLayerListenerRecursively(openerListener);
 }
Ejemplo n.º 2
0
 @Override
 public void setSelectedStyles(Style[] selectedStyles) {
   checkIsOpen();
   super.setSelectedStyles(selectedStyles);
   // DEPRECATED LISTENERS
   for (MapContextListener listener : listeners) {
     listener.layerSelectionChanged(this);
   }
 }
Ejemplo n.º 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);
    }
  }