src/main/java/com/mxgraph/swing/mxGraphComponent.java
public mxCellHandler createHandler(mxCellState state)
	{
		if (graph.getModel().isVertex(state.getCell()))
		{
			return new mxVertexHandler(this, state);
		}
		else if (graph.getModel().isEdge(state.getCell()))
		{
			mxEdgeStyleFunction style = graph.getView().getEdgeStyle(state,
					null, null, null);

			if (graph.isLoop(state) || style == mxEdgeStyle.ElbowConnector
					|| style == mxEdgeStyle.SideToSide
					|| style == mxEdgeStyle.TopToBottom)
			{
				return new mxElbowEdgeHandler(this, state);
			}

			return new mxEdgeHandler(this, state);
		}

		return new mxCellHandler(this, state);
	}
/**
	 * 
	 * @param state
	 *            Cell state for which a handler should be created.
	 * @return Returns the handler to be used for the given cell state.
	 */
@param state
Cell state for which a handler should be created.
@return Returns the handler to be used for the given cell state.
@param state Cell state for which a handler should be created . @return Returns the handler to be used for the given cell state .
public mxCellHandler createHandler(mxCellState state)
	{
		if (graph.getModel().isVertex(state.getCell()))
		{
			return new mxVertexHandler(this, state);
		}
		else if (graph.getModel().isEdge(state.getCell()))
		{
			mxEdgeStyleFunction style = graph.getView().getEdgeStyle(state,
					null, null, null);
			if (graph.isLoop(state) || style == mxEdgeStyle.ElbowConnector
					|| style == mxEdgeStyle.SideToSide
					|| style == mxEdgeStyle.TopToBottom)
			{
				return new mxElbowEdgeHandler(this, state);
			}
			return new mxEdgeHandler(this, state);
		}
		return new mxCellHandler(this, state);
	}
public mxCellHandler createHandler ( mxCellState state ) { if ( graph . getModel ( ) . isVertex ( state . getCell ( ) ) ) { return new mxVertexHandler ( this , state ) ; } else if ( graph . getModel ( ) . isEdge ( state . getCell ( ) ) ) { mxEdgeStyleFunction style = graph . getView ( ) . getEdgeStyle ( state , null , null , null ) ; if ( graph . isLoop ( state ) || style == mxEdgeStyle . ElbowConnector || style == mxEdgeStyle . SideToSide || style == mxEdgeStyle . TopToBottom ) { return new mxElbowEdgeHandler ( this , state ) ; } return new mxEdgeHandler ( this , state ) ; } return new mxCellHandler ( this , state ) ; }
@param state
            Cell state for which a handler should be created.
@param state Cell state for which a handler should be created .