if (state == MOVING) {
proj.getSelection().drawGhostsShifted(context, dx, dy);
MoveGesture gesture = moveGesture;
if (gesture != null && drawConnections && (dx != 0 || dy != 0)) {
MoveResult result = gesture.findResult(dx, dy);
if (result != null) {
Collection<Wire> wiresToAdd = result.getWiresToAdd();
Graphics g = context.getGraphics();
GraphicsUtil.switchToWidth(g, 3);
g.setColor(Color.GRAY);
for (Wire w : wiresToAdd) {
Location loc0 = w.getEnd0();
Location loc1 = w.getEnd1();
g.drawLine(loc0.getX(), loc0.getY(),
loc1.getX(), loc1.getY());
}
GraphicsUtil.switchToWidth(g, 1);
g.setColor(COLOR_UNMATCHED);
for (Location conn : result.getUnconnectedLocations()) {
int connX = conn.getX();
int connY = conn.getY();
g.fillOval(connX - 3, connY - 3, 6, 6);
g.fillOval(connX + dx - 3, connY + dy - 3, 6, 6);
}