public void setMagnitude(int nMagnitude) {
		this.nMagnitude = nMagnitude;
		double size = 20.0 + 2.0 * nMagnitude;

		if (shape == ELLIPSE) {
			if (ellipse == null)
				ellipse = new Ellipse2D.Double(0.0, 0.0, size, size);
		} else if (shape == RECTANGLE) {
			if (rectangle == null)
				rectangle = new Rectangle2D.Double(0.0, 0.0, size, size);
		} else
			assert false;

		setBounds(0.0, 0.0, size, size);

		if (pMagnetName != null)
			pMagnetName.setOffset(
					(this.getWidth() - pMagnetName.getWidth()) / 2, (this
							.getHeight() - pMagnetName.getHeight()) / 2);
	}