public static CStateChange changeEdgeLabel(
      final CStateFactory<?, ?> m_factory,
      final MouseEvent event,
      final HitInfo hitInfo,
      final EdgeLabel oldLabel) {
    final EdgeLabel label = hitInfo.getHitEdgeLabel();

    if (label == oldLabel) {
      return new CStateChange(m_factory.createEdgeLabelHoverState(label, event), true);
    } else {
      m_factory.createEdgeLabelExitState(oldLabel, event);

      return new CStateChange(m_factory.createEdgeLabelEnterState(label, event), true);
    }
  }
Changes the state of the edge label depending on the current hitInfo.

@param m_factory The state factory for all states.
@param event The mouse event that caused the state change.
@param hitInfo The information about what was hit.
@param oldLabel The edge label which we come from.
@return The state object that describes the mouse state.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/editmode/transformations/CHitEdgeLabelsTransformer.java