	protected ToolBar createToolBar() {
		if (this.toolBar != null) {
			this.toolBar.clear();
			this.toolBar.destroy(GLContext.getCurrentGL().getGL2());
		}
		ToolBar toolBar = new ToolBar("ToolBarRow", brick);
		toolBar.setPixelSizeY(0);
		ElementLayout spacingLayoutX = new ElementLayout("spacingLayoutX");
		spacingLayoutX.setPixelSizeX(SPACING_PIXELS);
		spacingLayoutX.setRatioSizeY(0);
		toolBar.append(spacingLayoutX);
		for (ElementLayout element : toolBarElements) {
			toolBar.append(element);
		}
		ElementLayout greedyXLayout = new ElementLayout("greedy");
		greedyXLayout.setGrabX(true);
		greedyXLayout.setRatioSizeY(0);
		toolBar.append(greedyXLayout);
		if (showClusterButton) {
			Button clusterButton = new Button(EPickingType.DIMENSION_GROUP_CLUSTER_BUTTON.name(), brick.getID(),
					EIconTextures.CLUSTER_ICON);
			ElementLayout clusterButtonLayout = new ElementLayout("clusterButton");
			clusterButtonLayout.setPixelSizeX(BUTTON_WIDTH_PIXELS);
			clusterButtonLayout.setPixelSizeY(BUTTON_HEIGHT_PIXELS);
			clusterButtonLayout
					.setRenderer(new ButtonRenderer.Builder(brick.getStratomex(), clusterButton)
							.textureManager(brick.getTextureManager()).zCoordinate(DefaultBrickLayoutTemplate.BUTTON_Z)
							.build());
			toolBar.append(clusterButtonLayout);
			toolBar.append(spacingLayoutX);
			brick.getStratomex().removeAllIDPickingListeners(EPickingType.DIMENSION_GROUP_CLUSTER_BUTTON.name(),
					brick.getID());
			brick.getStratomex().addIDPickingListener(new APickingListener() {
				@Override
				public void clicked(Pick pick) {
					Display.getDefault().asyncExec(new Runnable() {
						@Override
						public void run() {
							ClusterConfiguration clusterConfiguration = new ClusterConfiguration();
							TablePerspective oldTablePerspective = brick.getBrickColumn().getTablePerspective();
							clusterConfiguration.setSourceDimensionPerspective(oldTablePerspective
									.getDimensionPerspective());
							clusterConfiguration.setSourceRecordPerspective(oldTablePerspective.getRecordPerspective());
							ATableBasedDataDomain dataDomain = oldTablePerspective.getDataDomain();
							Perspective newRecordPerspective = new Perspective(dataDomain, dataDomain.getRecordIDType());
							newRecordPerspective.setVirtualArray(oldTablePerspective.getRecordPerspective()
									.getVirtualArray());
							clusterConfiguration.setOptionalTargetRecordPerspective(newRecordPerspective);
							ClusterDialog dialog = new ClusterDialog(new Shell(), brick.getDataDomain(),
									clusterConfiguration);
							if (dialog.open() == Window.OK) {
								dataDomain.getTable().registerRecordPerspective(newRecordPerspective);
								TablePerspective newTablePerspective = dataDomain.getTablePerspective(
										newRecordPerspective.getPerspectiveID(), oldTablePerspective
												.getDimensionPerspective().getPerspectiveID());
								ReplaceTablePerspectiveEvent rEvent = new ReplaceTablePerspectiveEvent(brick
										.getBrickColumn().getStratomexView().getID(), newTablePerspective,
										oldTablePerspective);
								GeneralManager.get().getEventPublisher().triggerEvent(rEvent);
							}
						}
					});
				}
			}, EPickingType.DIMENSION_GROUP_CLUSTER_BUTTON.name(), brick.getID());
		}
		brick.getStratomex().addIDPickingTooltipListener("Cluster", EPickingType.DIMENSION_GROUP_CLUSTER_BUTTON.name(),
				brick.getID());
		Button removeColumnButton = new Button(EPickingType.REMOVE_COLUMN_BUTTON.name(), brick.getID(),
				EIconTextures.REMOVE);
		ElementLayout removeColumnButtonLayout = new ElementLayout("removeColumnButton");
		removeColumnButtonLayout.setPixelSizeX(BUTTON_WIDTH_PIXELS);
		removeColumnButtonLayout.setPixelSizeY(BUTTON_HEIGHT_PIXELS);
		removeColumnButtonLayout.setRenderer(new ButtonRenderer.Builder(brick.getStratomex(), removeColumnButton)
				.textureManager(brick.getTextureManager()).zCoordinate(DefaultBrickLayoutTemplate.BUTTON_Z).build());
		toolBar.append(removeColumnButtonLayout);
		toolBar.append(spacingLayoutX);
		brick.getStratomex().removeAllIDPickingListeners(EPickingType.REMOVE_COLUMN_BUTTON.name(), brick.getID());
		brick.getStratomex().addIDPickingListener(new APickingListener() {
			@Override
			public void clicked(Pick pick) {
				Display.getDefault().asyncExec(new Runnable() {
					@Override
					public void run() {
						RemoveTablePerspectiveEvent event = new RemoveTablePerspectiveEvent(brick.getBrickColumn()
								.getTablePerspective(), brick.getStratomex());
						event.setSender(this);
						GeneralManager.get().getEventPublisher().triggerEvent(event);
					}
				});
			}
		}, EPickingType.REMOVE_COLUMN_BUTTON.name(), brick.getID());
		brick.getStratomex().addIDPickingTooltipListener("Remove column", EPickingType.REMOVE_COLUMN_BUTTON.name(),
				brick.getID());
		return toolBar;
	}

	protected ToolBar createToolBar() {
		if (this.toolBar != null) {
			this.toolBar.clear();
			this.toolBar.destroy(GLContext.getCurrentGL().getGL2());
		}
		ToolBar toolBar = new ToolBar("ToolBarRow", brick);
		toolBar.setPixelSizeY(0);
		ElementLayout spacingLayoutX = new ElementLayout("spacingLayoutX");
		spacingLayoutX.setPixelSizeX(SPACING_PIXELS);
		spacingLayoutX.setRatioSizeY(0);
		toolBar.append(spacingLayoutX);
		for (ElementLayout element : toolBarElements) {
			toolBar.append(element);
		}
		ElementLayout greedyXLayout = new ElementLayout("greedy");
		greedyXLayout.setGrabX(true);
		greedyXLayout.setRatioSizeY(0);
		toolBar.append(greedyXLayout);
		if (showClusterButton) {
			Button clusterButton = new Button(EPickingType.DIMENSION_GROUP_CLUSTER_BUTTON.name(), brick.getID(),
					EIconTextures.CLUSTER_ICON);
			ElementLayout clusterButtonLayout = new ElementLayout("clusterButton");
			clusterButtonLayout.setPixelSizeX(BUTTON_WIDTH_PIXELS);
			clusterButtonLayout.setPixelSizeY(BUTTON_HEIGHT_PIXELS);
			clusterButtonLayout
					.setRenderer(new ButtonRenderer.Builder(brick.getStratomex(), clusterButton)
							.textureManager(brick.getTextureManager()).zCoordinate(DefaultBrickLayoutTemplate.BUTTON_Z)
							.build());
			toolBar.append(clusterButtonLayout);
			toolBar.append(spacingLayoutX);
			brick.getStratomex().removeAllIDPickingListeners(EPickingType.DIMENSION_GROUP_CLUSTER_BUTTON.name(),
					brick.getID());
			brick.getStratomex().addIDPickingListener(new APickingListener() {
				@Override
				public void clicked(Pick pick) {
					Display.getDefault().asyncExec(new Runnable() {
						@Override
						public void run() {
							ClusterConfiguration clusterConfiguration = new ClusterConfiguration();
							TablePerspective oldTablePerspective = brick.getBrickColumn().getTablePerspective();
							clusterConfiguration.setSourceDimensionPerspective(oldTablePerspective
									.getDimensionPerspective());
							clusterConfiguration.setSourceRecordPerspective(oldTablePerspective.getRecordPerspective());
							ATableBasedDataDomain dataDomain = oldTablePerspective.getDataDomain();
							Perspective newRecordPerspective = new Perspective(dataDomain, dataDomain.getRecordIDType());
							newRecordPerspective.setLabel("Currently clustering...", false);
							newRecordPerspective.setVirtualArray(oldTablePerspective.getRecordPerspective()
									.getVirtualArray());
							clusterConfiguration.setOptionalTargetRecordPerspective(newRecordPerspective);
							ClusterDialog dialog = new ClusterDialog(new Shell(), brick.getDataDomain(),
									clusterConfiguration);
							if (dialog.open() == Window.OK) {
								dataDomain.getTable().registerRecordPerspective(newRecordPerspective);
								TablePerspective newTablePerspective = dataDomain.getTablePerspective(
										newRecordPerspective.getPerspectiveID(), oldTablePerspective
												.getDimensionPerspective().getPerspectiveID());
								ReplaceTablePerspectiveEvent rEvent = new ReplaceTablePerspectiveEvent(brick
										.getBrickColumn().getStratomexView().getID(), newTablePerspective,
										oldTablePerspective);
								GeneralManager.get().getEventPublisher().triggerEvent(rEvent);
							}
						}
					});
				}
			}, EPickingType.DIMENSION_GROUP_CLUSTER_BUTTON.name(), brick.getID());
		}
		brick.getStratomex().addIDPickingTooltipListener("Cluster", EPickingType.DIMENSION_GROUP_CLUSTER_BUTTON.name(),
				brick.getID());
		Button removeColumnButton = new Button(EPickingType.REMOVE_COLUMN_BUTTON.name(), brick.getID(),
				EIconTextures.REMOVE);
		ElementLayout removeColumnButtonLayout = new ElementLayout("removeColumnButton");
		removeColumnButtonLayout.setPixelSizeX(BUTTON_WIDTH_PIXELS);
		removeColumnButtonLayout.setPixelSizeY(BUTTON_HEIGHT_PIXELS);
		removeColumnButtonLayout.setRenderer(new ButtonRenderer.Builder(brick.getStratomex(), removeColumnButton)
				.textureManager(brick.getTextureManager()).zCoordinate(DefaultBrickLayoutTemplate.BUTTON_Z).build());
		toolBar.append(removeColumnButtonLayout);
		toolBar.append(spacingLayoutX);
		brick.getStratomex().removeAllIDPickingListeners(EPickingType.REMOVE_COLUMN_BUTTON.name(), brick.getID());
		brick.getStratomex().addIDPickingListener(new APickingListener() {
			@Override
			public void clicked(Pick pick) {
				Display.getDefault().asyncExec(new Runnable() {
					@Override
					public void run() {
						RemoveTablePerspectiveEvent event = new RemoveTablePerspectiveEvent(brick.getBrickColumn()
								.getTablePerspective(), brick.getStratomex());
						event.setSender(this);
						GeneralManager.get().getEventPublisher().triggerEvent(event);
					}
				});
			}
		}, EPickingType.REMOVE_COLUMN_BUTTON.name(), brick.getID());
		brick.getStratomex().addIDPickingTooltipListener("Remove column", EPickingType.REMOVE_COLUMN_BUTTON.name(),
				brick.getID());
		return toolBar;
	}
