public Object flipEdge(Object edge){
  if (edge != null && alternateEdgeStyle != null) {
    model.beginUpdate();
    try {
      String style=model.getStyle(edge);
      if (style == null || style.length() == 0) {
        model.setStyle(edge,alternateEdgeStyle);
      }
 else {
        model.setStyle(edge,null);
      }
      resetEdge(edge);
      fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,"edge",edge));
    }
  finally {
      model.endUpdate();
    }
  }
  return edge;
}

public Object flipEdge ( Object edge ) { if ( edge != null && alternateEdgeStyle != null ) { model . beginUpdate ( ) ; try { String style = model . getStyle ( edge ) ; if ( style == null || style . length ( ) == 0 ) { model . setStyle ( edge , alternateEdgeStyle ) ; } else { model . setStyle ( edge , null ) ; } resetEdge ( edge ) ; fireEvent ( new mxEventObject ( mxEvent . FLIP_EDGE , "edge" , edge ) ) ; } finally { model . endUpdate ( ) ; } } return edge ; }
called when the main control point of the edge is double - clicked . this implementation switches between null ( default ) and alternateedgestyle and resets the edges control points . finally , a flip event is fired before endupdate is called on the model .
