Exemplo n.º 1
0
 /** @see org.eclipse.draw2d.ConnectionRouter#invalidate(Connection) */
 public void invalidate(Connection conn) {
   if (next() != null) next().invalidate(conn);
   if (conn.getSourceAnchor() == null || conn.getTargetAnchor() == null) return;
   HashKey connectionKey = new HashKey(conn);
   ArrayList connectionList = connections.get(connectionKey);
   int affected = connections.remove(connectionKey, conn);
   if (affected != -1) {
     for (int i = affected; i < connectionList.size(); i++)
       ((Connection) connectionList.get(i)).revalidate();
   } else connections.removeValue(conn);
 }
Exemplo n.º 2
0
 /** @see org.eclipse.draw2d.ConnectionRouter#remove(Connection) */
 public void remove(Connection conn) {
   if (conn.getSourceAnchor() == null || conn.getTargetAnchor() == null) return;
   HashKey connectionKey = new HashKey(conn);
   ArrayList connectionList = connections.get(connectionKey);
   if (connectionList != null) {
     int index = connections.remove(connectionKey, conn);
     for (int i = index + 1; i < connectionList.size(); i++)
       ((Connection) connectionList.get(i)).revalidate();
   }
   if (next() != null) next().remove(conn);
 }
Exemplo n.º 3
0
 HashKey(Connection conn) {
   anchor1 = conn.getSourceAnchor();
   anchor2 = conn.getTargetAnchor();
 }