@Override
  public IMouseStateChange mouseMoved(final MouseEvent event, final AbstractZyGraph<?, ?> g) {
    final double x = m_graph.getEditMode().translateX(event.getX());
    final double y = m_graph.getEditMode().translateY(event.getY());

    final HitInfo hitInfo = m_graph.getGraph().getHitInfo(x, y);

    if (hitInfo.hasHitEdges()) {
      return CHitEdgesTransformer.changeEdge(m_factory, event, hitInfo, m_edge);
    } else {
      m_factory.createEdgeExitState(m_edge, event);

      return CHitEdgesTransformer.exitEdge(m_factory, event, hitInfo, this);
    }
  }
Creates a new state object.

@param factory Used to create the next state when a state change is necessary.
@param graph The graph for which the mouse state is tracked.
@param edge The Edge the mouse cursor is hovering over.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/editmode/states/CEdgeHoverState.java