public void setMode(int mode) {
		if (mode != GeneralDestruction.MODE_GAME
				&& mode != GeneralDestruction.MODE_EDITOR) {
			throw new IllegalArgumentException("Unknown mode flag: " + mode);
		}
		if (mode == GeneralDestruction.MODE_GAME) {
			viewMain.removeAllCanvas3Ds();
			viewOrtho1.removeAllCanvas3Ds();
			viewOrtho2.removeAllCanvas3Ds();
			viewOrtho3.removeAllCanvas3Ds();

			mainPanel.removeAll();
			mainPanel.add(gamePanel);

			viewMain.addCanvas3D(canvasGame);

		} else if (mode == GeneralDestruction.MODE_EDITOR) {
			viewMain.removeAllCanvas3Ds();
			viewOrtho1.removeAllCanvas3Ds();
			viewOrtho2.removeAllCanvas3Ds();
			viewOrtho3.removeAllCanvas3Ds();

			viewMain.addCanvas3D(canvasMain);
			viewOrtho1.addCanvas3D(canvasOrtho1);
			viewOrtho2.addCanvas3D(canvasOrtho2);
			viewOrtho3.addCanvas3D(canvasOrtho3);

			mainPanel.removeAll();
			mainPanel.add(editorPanel);
		}
	}