QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, start, end, qd.bitResolution); rndDefCopy.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rndDefCopy.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } MethodCall mCall = new MethodCall() { public void doCall() { servant.setCodomainInterval(start, end); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc);
QuantumDef qd = rndDefCopy.getQuantumDef(), newQd; newQd = new QuantumDef(qd.pixelType, start, end, qd.bitResolution, qd.noiseReduction); rndDefCopy.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rndDefCopy.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } MethodCall mCall = new MethodCall() { public void doCall() { servant.setCodomainInterval(start, end); } }; RenderingPropChange rpc = new RenderingPropChange(mCall); eventBus.post(rpc);
	public void setCodomainInterval(final int start, final int end)	{		//TODO: this might go well w/ our copy, but then throw an exception		//in the servant. We need a future.				QuantumDef qd = rndDefCopy.getQuantumDef(), newQd;		newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, 												start, end, qd.bitResolution);		rndDefCopy.setQuantumDef(newQd);		CodomainMapContext mapCtx;		Iterator i = rndDefCopy.getCodomainChainDef().iterator();		while (i.hasNext()) {			mapCtx = (CodomainMapContext) i.next();			mapCtx.setCodomain(start, end);		}		MethodCall mCall = new MethodCall() {			public void doCall() { 				servant.setCodomainInterval(start, end);			}		};		RenderingPropChange rpc = new RenderingPropChange(mCall);		eventBus.post(rpc);		}