% Block+line styles
\tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=5em,
    text centered, rounded corners, minimum height=4em]
\tikzstyle{impl} = [rectangle, draw, fill=yellow, text width=5em,
    text centered, rounded corners, minimum height=4em]
\tikzstyle{app} = [rectangle, draw, fill=green, text width=5em,
    text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']

\begin{tikzpicture}[node distance = 7em, auto]
    % Servers
    \node [block] (eventserver) {Event server};
    \node [right of=eventserver] (eventserverdots) {$\cdots$};

    \node [impl, right of=eventserverdots] (tuioserver) {TUIO server};

    \node [block, below of=eventserver] (gestureserver) {Gesture erver};
    \path [line] (eventserver) -- node {trigger events of all touch points}(gestureserver);

    % Window
    \node [block, below of=gestureserver] (window) {Window};
    \node [right of=window] (windowdots) {$\cdots$};
    \path [line] (gestureserver) -- node {trigger events of containing touch points}(window);

    \node [impl, right of=windowdots] (rectangularwindow) {Rectangular window};
    \node [impl, right of=rectangularwindow] (circularwindow) {Circular window};

    % Tracker
    \node [block, below of=window] (tracker) {Gesture tracker};
    \node [right of=tracker] (trackerdots) {$\cdots$};
    \path [line] (window) -- node {delegate events}(tracker);

    \node [impl, right of=trackerdots] (taptracker) {Tap tracker};
    \node [impl, right of=taptracker, text width=7em] (transformtracker) {Transformation tracker};

    % Gesture
    \node [block, below of=tracker] (gesture) {Gesture};
    \node [right of=gesture] (gesturedots) {$\cdots$};
    \path [line] (tracker) -- node {trigger by calling gesture handler}(gesture);

    % Client application
    \node [app, left of=window, xshift=-11em] (app) {Client application};
    \path [line, dashed] (app) -- node [left=20, near end] {add to window, bind gesture handler}(tracker);

    \path [line, dashed] (app) -- node [near start] {start}(gestureserver);
    \path [line, dashed] (app) -- node {add to gesture server}(window);
\end{tikzpicture}
