case SCAN_2D:
config = new Config2DImpl();
config.setScanAddOn(new ScanAddOnImp());
config.getScanAddOn().setDisplay(new DisplayImpl());
((IConfig2D) config).setDimensionX(new Dimension2DXImpl());
// Creates one X range for a new 2D config.
IRange2DX xRangeToAdd = new Range2DXImpl();
xRangeToAdd.setDimension(((IConfig2D) config).getDimensionX());
xRangeToAdd.setIntegrationTime(1.0);
xRangeToAdd.setStepsNumber(1);