@Override
    public void mouseDragged(final MouseEvent e) {
        // check handlers first
        for (final Element el : getGraphicPanel().getSelectionManager().getSelectedElements()) {
            if (el.getComponent().getHandlers().isHandlerAt(e.getPoint())) {
                if (el instanceof Edge) {
                    getPanel().getStateManager().moveToState(StateType.MOVE_EDGE);
                    return;
                } else if (el instanceof Vertex || el instanceof Lane) {
                    getPanel().getStateManager().moveToState(StateType.RESIZE);
                    return;
                }
            }
        }

        // check elements
        final Element el = getGraphicPanel().getElementAt(e.getPoint());
        if (el != null && (el instanceof Vertex || el instanceof Lane)) {
            getPanel().getStateManager().moveToState(StateType.MOVE);
            return;
        }
    }