Fire the event that indicates a layer was moved down.

@param layer is the moved layer.
@param newIndex is the new index of the layer.
166882
protected void fireLayerMovedDownEvent(MapLayer layer, int newIndex) {
		fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer,
				Type.MOVE_CHILD_DOWN, newIndex, layer.isTemporaryLayer()));
	}
28427
public void fadeToLayer(int index) {
    mTransitionState = TRANSITION_STARTING;
    Arrays.fill(mIsLayerOn, false);
    mIsLayerOn[index] = true;
    invalidateSelf();
  }
155627
private void remove(Integer layer, Displayable displayable)
    {
        final Collection<Displayable> displayables = getLayer(layer);
        displayables.remove(displayable);
        if (displayables.isEmpty())
        {
            indexs.remove(layer);
        }
    }
112383
protected static void fireElementAddedEvent( int index, Object element, JsonConfig jsonConfig ) {
      if( jsonConfig.isEventTriggeringEnabled() ){
         for( Iterator listeners = jsonConfig.getJsonEventListeners()
               .iterator(); listeners.hasNext(); ){
            JsonEventListener listener = (JsonEventListener) listeners.next();
            try{
               listener.onElementAdded( index, element );
            }catch( RuntimeException e ){
               log.warn( e );
            }
         }
      }
   }
961072
protected boolean addLayer(Layer layer) {
		int index = getLayerIndex(layer);
		if (index < 0) {
			view.add(new LayerControlPanel(mapPresenter, layer, disableToggleOutOfRange));

			return true;
		}
		return false;
	}
15262
function _layerCanFireEvent(layer, eventType) {
	// If events are disable and if
	// layer is tangible or event is not tangible
	return (!layer.disableEvents &&
		(!layer.intangible || $.inArray(eventType, tangibleEvents) === -1));
}
1357832
def setCurrentLayer(self, layer):
        
        if self._currentLayer == layer:
            return False
        
        old = self._currentLayer
        self._currentLayer = layer
        
        if old is not None:
            old.sync()
        if layer is not None:
            layer.sync()
        
        self.selectionFinished.emit()
        self.invalidate()
        
        return True
795302
protected void setMapLayerAt(int index, L layer) {
		this.subLayers.set(index, layer);
		layer.setContainer(this);
		resetBoundingBox();
	}
1121099
public synchronized Layer remove(int index, boolean redraw) {
        Layer layer = this.layersList.remove(index);
        layer.unassign();
        if (redraw) {
            this.redrawer.redrawLayers();
        }
        return layer;
    }
609479
private void fireEvent(boolean resized, ZoomOption option) {
		if (width > 0) {
			// keep old semantics of sameScaleLevel for api compatibility !
			boolean sameScale = lastViewState != null && viewState.isPannableFrom(lastViewState);
			handlerManager.fireEvent(new MapViewChangedEvent(getBounds(), getCurrentScale(), sameScale, viewState
					.isPanDragging(), resized, option));
		}
	}
347661
public void deselectByIndex(int index) {
        getDispatcher().beforeDeselect(this, index);
        
        new Select(getElement()).deselectByIndex(index);
        if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
            logUIActions(UIActions.CLEARED, Integer.toString(index));
        }
        
        getDispatcher().afterDeselect(this, index);
    }
1325469
@Override
	public boolean addLayer(Layer layer) {
		if (layer == null) {
			throw new IllegalArgumentException("Layer is null.");
		}
		if (getLayer(layer.getId()) == null) {
			layers.add(layer);
			if (layer instanceof AbstractLayer) {
				AbstractLayer aLayer = (AbstractLayer) layer;
				aLayer.setViewPort(viewPort);
				aLayer.setEventBus(eventBus);
			}
			eventBus.fireEvent(new LayerAddedEvent(layer));
			return true;
		}
		return false;
	}
394309
private void fireFieldChangeEvent(AssignmentField field, Object oldValue, Object newValue)
   {
      //
      // Internal event handling
      //
      switch (field)
      {
         case START:
         case BASELINE_START:
         {
            m_array[AssignmentField.START_VARIANCE.getValue()] = null;
            break;
         }

         case FINISH:
         case BASELINE_FINISH:
         {
            m_array[AssignmentField.FINISH_VARIANCE.getValue()] = null;
            break;
         }

         case BCWP:
         case ACWP:
         {
            m_array[AssignmentField.CV.getValue()] = null;
            m_array[AssignmentField.SV.getValue()] = null;
            break;
         }

         case COST:
         case BASELINE_COST:
         {
            m_array[AssignmentField.COST_VARIANCE.getValue()] = null;
            break;
         }

         case WORK:
         case BASELINE_WORK:
         {
            m_array[AssignmentField.WORK_VARIANCE.getValue()] = null;
            break;
         }

         case ACTUAL_OVERTIME_COST:
         case REMAINING_OVERTIME_COST:
         {
            m_array[AssignmentField.OVERTIME_COST.getValue()] = null;
            break;
         }

         default:
         {
            break;
         }
      }

      //
      // External event handling
      //
      if (m_listeners != null)
      {
         for (FieldListener listener : m_listeners)
         {
            listener.fieldChange(this, field, oldValue, newValue);
         }
      }
   }
594999
public void setEvent(int index, int event) {
        if (events == null || index < 0 || index >= events.length) {
            throw new IndexOutOfBoundsException("index = " + index + ", limit = " + (events == null ? "null" : events.length));
        }

        events[index] = (byte)event;
    }
1222867
protected void fireLayerRemoveAllEvent(List<? extends L> removedObjects) {
		fireLayerHierarchyChangedEvent(
				new MapLayerHierarchyEvent(
						this,
						removedObjects,
						Type.REMOVE_ALL_CHILDREN,
						-1,
						isTemporaryLayer()));
	}
202922
protected void fireLayerAddedEvent(MapLayer layer, int index) {
		fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer, Type.ADD_CHILD, index, layer.isTemporaryLayer()));
	}
182439
private void fireFieldChangeEvent(ResourceField field, Object oldValue, Object newValue)
   {
      //
      // Internal event handling
      //
      switch (field)
      {
         case UNIQUE_ID:
         {
            ProjectFile parent = getParentFile();
            if (oldValue != null)
            {
               parent.getResources().unmapUniqueID((Integer) oldValue);
            }
            parent.getResources().mapUniqueID((Integer) newValue, this);

            if (m_assignments.isEmpty() == false)
            {
               for (ResourceAssignment assignment : m_assignments)
               {
                  assignment.setResourceUniqueID((Integer) newValue);
               }
            }
            break;
         }

         case COST:
         case BASELINE_COST:
         {
            m_array[ResourceField.COST_VARIANCE.getValue()] = null;
            break;
         }

         case WORK:
         case BASELINE_WORK:
         {
            m_array[ResourceField.WORK_VARIANCE.getValue()] = null;
            break;
         }

         case BCWP:
         case ACWP:
         {
            m_array[ResourceField.CV.getValue()] = null;
            m_array[ResourceField.SV.getValue()] = null;
            break;
         }

         case BCWS:
         {
            m_array[ResourceField.SV.getValue()] = null;
            break;
         }

         case PEAK:
         case MAX_UNITS:
         {
            m_array[ResourceField.OVERALLOCATED.getValue()] = null;
            break;
         }

         default:
         {
            break;
         }
      }

      //
      // External event handling
      //
      if (m_listeners != null)
      {
         for (FieldListener listener : m_listeners)
         {
            listener.fieldChange(this, field, oldValue, newValue);
         }
      }
   }