void processMouseDragged(MouseEvent e) {

		if (ModelerUtilities.isRightClick(e))
			return;
		if (System.currentTimeMillis() - mousePressedTime < MINIMUM_MOUSE_DRAG_RESPONSE_INTERVAL)
			return;
		int x = e.getX();
		int y = e.getY();
		model.runMouseScript(MouseEvent.MOUSE_DRAGGED, x, y);
		if (model.getJob() != null && !model.getJob().isStopped()) {
			steerParticleUsingMouse(x - mouseHeldX, y - mouseHeldY);
			return;
		}

		super.processMouseDragged(e);

		if (callOutMouseDragged(x, y))
			return;
		if (handleMouseDragged(x, y))
			return;

		switch (actionID) {

		case HEAT_ID:
		case COOL_ID:
			pointHeater.setLocation(x, y);
			repaint();
			break;

		case ADGB_ID:
			addGBIndicator.x = addGBIndicator.y = -1;
			repaint();
			break;

		case RESI_ID:
			if (selectedComponent instanceof GayBerneParticle) {
				if (resizeHandle >= 0) {
					((GayBerneParticle) selectedComponent).resizeTo(x, y, resizeHandle);
				}
			}
			break;

		case ROTA_ID:
			if (selectedComponent instanceof GayBerneParticle) {
				if (rotationHandle >= 0) {
					setCursor(rotateCursor3);
					((GayBerneParticle) selectedComponent).rotateTo(x, y, rotationHandle);
				}
			}
			break;

		case SELE_ID:
			if (selectedComponent != null) {
				if (!isEditable() && !selectedComponent.isDraggable()) {
					showTip("<html><font color=red>The selected object is not draggable!</font></html>", x, y, 500);
				} else {
					dragSelected = false;
					if (selectedComponent instanceof GayBerneParticle) {
						GayBerneParticle p = (GayBerneParticle) selectedComponent;
						if (p.getRestraint() != null) {
							int amp = (int) (400.0 / p.getRestraint().getK());
							Vector2D loc = moveSpring(x, y, (int) p.getRestraint().getX0(), (int) p.getRestraint().getY0(), 0, amp);
							if (loc == null)
								return;
							p.setRx(loc.getX());
							p.setRy(loc.getY());
						} else {
							p.setRx(x - clickPoint.x);
							p.setRy(y - clickPoint.y);
						}
						boundary.setRBC(p, RectangularBoundary.TRANSLATION);
						dragSelected = true;
					} else if (selectedComponent instanceof ImageComponent) {
						ImageComponent ic = (ImageComponent) selectedComponent;
						ic.translateTo(x - clickPoint.x, y - clickPoint.y);
						dragSelected = true;
						moveHostTo(ic.getHost(), ic.getRx() + ic.getWidth() * 0.5, ic.getRy() + ic.getHeight() * 0.5);
					} else if (selectedComponent instanceof TextBoxComponent) {
						TextBoxComponent tb = (TextBoxComponent) selectedComponent;
						tb.translateTo(x - clickPoint.x, y - clickPoint.y);
						dragSelected = true;
						if (tb.getAttachmentPosition() == TextBoxComponent.BOX_CENTER)
							moveHostTo(tb.getHost(), tb.getRx() + 0.5 * tb.getWidth(), tb.getRy() + 0.5 * tb.getHeight());
					} else if (selectedComponent instanceof LineComponent) {
						LineComponent lc = (LineComponent) selectedComponent;
						lc.translateTo(x - clickPoint.x, y - clickPoint.y);
						dragSelected = true;
						moveHostTo(lc.getHost(), lc.getRx(), lc.getRy());
					} else if (selectedComponent instanceof RectangleComponent) {
						RectangleComponent rc = (RectangleComponent) selectedComponent;
						rc.translateTo(x - clickPoint.x, y - clickPoint.y);
						dragSelected = true;
						moveHostTo(rc.getHost(), rc.getRx(), rc.getRy());
					} else if (selectedComponent instanceof TriangleComponent) {
						TriangleComponent tc = (TriangleComponent) selectedComponent;
						tc.translateTo(x - clickPoint.x, y - clickPoint.y);
						dragSelected = true;
						moveHostTo(tc.getHost(), tc.getRx(), tc.getRy());
					} else if (selectedComponent instanceof EllipseComponent) {
						EllipseComponent ec = (EllipseComponent) selectedComponent;
						ec.translateTo(x - clickPoint.x, y - clickPoint.y);
						dragSelected = true;
						moveHostTo(ec.getHost(), ec.getRx(), ec.getRy());
					}
					if (dragSelected) {
						repaint();
						setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
					}
				}
			}
			break;

		case COUN_ID:
		case MARK_ID:
		case DELE_ID:
		case RECT_ID:
		case TRIA_ID:
		case ELLI_ID:
			dragRect(x, y);
			break;

		case VELO_ID:
			if (readyToAdjustVelocityVector) {
				if (selectedComponent instanceof GayBerneParticle) {
					((GayBerneParticle) selectedComponent).setVelocityHandleLocation(x, y);
					repaint();
				}
			}
			break;

		case OMEG_ID:
			if (readyToAdjustOmegaVector) {
				if (selectedComponent instanceof GayBerneParticle) {
					((GayBerneParticle) selectedComponent).getOHotSpot().setRect(x - 3, y - 3, 6, 6);
				}
				repaint();
			}
			break;

		case MEAS_ID:
			if (readyToAdjustDistanceVector && indexOfSelectedMeasurement >= 0) {
				if (selectedComponent instanceof GayBerneParticle) {
					GayBerneParticle p = (GayBerneParticle) selectedComponent;
					GayBerneParticle p1 = whichParticleOtherThan(x, y, p);
					if (p1 != null) {
						p.setMeasurement(indexOfSelectedMeasurement, new Integer(p1.getIndex()));
					} else {
						p.setMeasurement(indexOfSelectedMeasurement, new Point(x, y));
					}
					repaint();
				}
			}
			break;

		case DUPL_ID:
			if (selectedComponent instanceof GayBerneParticle) {
				((GayBerneParticle) selectedComponent).translateTo(x, y);
				boundary.setRBC((GayBerneParticle) selectedComponent, RectangularBoundary.TRANSLATION);
			} else if (selectedComponent instanceof Layered) {
				Layered l = (Layered) selectedComponent;
				l.setLocation(x - l.getWidth() * 0.5, y - l.getHeight() * 0.5);
			}
			repaint();
			break;

		}

		e.consume();

	}