/*******************************************************************************
 * Caleydo - Visualization for Molecular Biology - http://caleydo.org
 * Copyright (c) The Caleydo Team. All rights reserved.
 * Licensed under the new BSD license, available at http://caleydo.org/license
 *******************************************************************************/
package org.caleydo.view.crossword.internal.test;

import java.awt.Dimension;
import java.util.Random;

import org.caleydo.core.view.opengl.layout2.GLElement;
import org.caleydo.core.view.opengl.layout2.GLElementDecorator;
import org.caleydo.core.view.opengl.layout2.GLSandBox;
import org.caleydo.core.view.opengl.layout2.basic.ScrollingDecorator;
import org.caleydo.core.view.opengl.layout2.layout.GLPadding;
import org.caleydo.datadomain.mock.MockDataDomain;
import org.caleydo.view.crossword.api.ui.CrosswordMultiElement;
import org.caleydo.view.crossword.spi.config.MultiConfig;
import org.eclipse.swt.widgets.Shell;

/**
 * @author Samuel Gratzl
 *
 */
public class MockTest extends GLSandBox {

	public MockTest(Shell parentShell) {
		super(parentShell, "Crossword", new GLElementDecorator(), GLPadding.ZERO, new Dimension(800, 600));

		((GLElementDecorator) getRoot()).setContent(createScene());
	}

	/**
	 * @return
	 */
	private GLElement createScene() {
		CrosswordMultiElement m = new CrosswordMultiElement(new MultiConfig());
		Random r = new Random();
		MockDataDomain numerical = MockDataDomain.createNumerical(100, 100, r);
		m.add(numerical.getDefaultTablePerspective());
		m.add(numerical.addDimGrouping(true, 10, 20, 50));
		m.add(numerical.addRecGrouping(false, 10, 40));


		return ScrollingDecorator.wrap(m, 10);
	}

	public static void main(String[] args) {
		GLSandBox.main(args, MockTest.class);
	}
}

@@ -442,33 +442,8 @@
 ion;
-%0Aimport java.util.Random;
 %0A%0Aim
@@ -1379,35 +1379,8 @@
 ));%0A
-%09%09Random r = new Random();%0A
 %09%09Mo
@@ -1445,17 +1445,37 @@
 0, 100, 
-r
+MockDataDomain.RANDOM
 );%0A%09%09m.a

fix mock test