public void drawLink ( Link link ) { List < Device > linkedDevices = link . getLinkedDevices ( ) ; for ( int i = 0 ; i < linkedDevices . size ( ) ; i ++ ) { Device from = linkedDevices . get ( i ) ; for ( int j = i + 1 ; j < linkedDevices . size ( ) ; j ++ ) { Device to = linkedDevices . get ( j ) ; Edge e = new Edge ( from , to , link ) ; links . addEdge ( e ) ; } } }
To draw a link