protected ArrayList<ElementLayout> createToolBarElements(
      HeaderBrickLayoutTemplate layoutTemplate) {

    final GLBrick brick = layoutTemplate.getBrick();
    MultiFormViewSwitchingBar viewSwitchingBar = brick.getViewSwitchingBar();
    ArrayList<ElementLayout> toolBarElements = new ArrayList<ElementLayout>();

    toolBarElements.add(viewSwitchingBar);

    return toolBarElements;
  }
  protected ArrayList<ElementLayout> createToolBarElements(
      ABrickLayoutConfiguration layoutTemplate) {

    final GLBrick brick = layoutTemplate.getBrick();
    MultiFormViewSwitchingBar viewSwitchingBar = brick.getViewSwitchingBar();
    ArrayList<ElementLayout> toolBarElements = new ArrayList<ElementLayout>();

    toolBarElements.add(viewSwitchingBar);

    ElementLayout ratioSpacingLayoutX = new ElementLayout("ratioSpacingLayoutX");
    ratioSpacingLayoutX.setRatioSizeX(1);
    ratioSpacingLayoutX.setGrabX(true);
    ratioSpacingLayoutX.setRatioSizeY(0);

    toolBarElements.add(ratioSpacingLayoutX);

    return toolBarElements;
  }
  private ArrayList<ElementLayout> createSummaryFooterBarElements(
      ABrickLayoutConfiguration layoutTemplate) {

    ArrayList<ElementLayout> footerBarElements = new ArrayList<ElementLayout>();

    GLBrick brick = layoutTemplate.getBrick();

    ElementLayout dimensionBarLaylout = new ElementLayout("dimensionBar");
    dimensionBarLaylout.setPixelSizeY(DIMENSION_BAR_HEIGHT_PIXELS);
    dimensionBarLaylout.setRatioSizeX(1);
    dimensionBarLaylout.setRenderer(
        new DimensionBarRenderer(
            brick.getDataDomain().getTable().getDefaultDimensionPerspective(true).getVirtualArray(),
            brick.getTablePerspective().getDimensionPerspective().getVirtualArray()));

    footerBarElements.add(dimensionBarLaylout);

    return footerBarElements;
  }
  @Override
  public void renderContent(GL2 gl) {

    ElementLayout leftLayout = leftBrick.getLayout();
    ElementLayout rightLayout = rightBrick.getLayout();
    BrickColumn dimensionGroup = leftBrick.getBrickColumn();
    Column groupColumn = dimensionGroup.getGroupColumn();

    float leftX = leftLayout.getTranslateX() + leftLayout.getSizeScaledX();
    float leftTopY = leftLayout.getTranslateY() + leftLayout.getSizeScaledY();
    float leftBottomY = leftLayout.getTranslateY();

    float[] leftTopPos = new float[] {leftX, leftTopY};
    float[] leftBottomPos = new float[] {leftX, leftBottomY};

    float rightX = rightLayout.getTranslateX();
    float rightTopY = rightLayout.getTranslateY() + rightLayout.getSizeScaledY();
    float rightBottomY = rightLayout.getTranslateY();

    float[] rightTopPos = new float[] {rightX, rightTopY};
    float[] rightBottomPos = new float[] {rightX, rightBottomY};

    float offsetX = x * 0.4f;

    float middleAnchorX = 0;
    float[] middleAnchorTopPos = null;
    float[] middleAnchorBottomPos = null;

    gl.glTranslatef(-elementLayout.getTranslateX(), -elementLayout.getTranslateY(), 0);

    float[] bandColor = new float[] {0, 0, 0, 0.15f}; // Color.GREEN.getRGBA();

    bandRenderer.init(gl);

    if (isOverviewLeft) {
      middleAnchorX = groupColumn.getTranslateX() + groupColumn.getSizeScaledX();
      middleAnchorTopPos = new float[] {middleAnchorX, leftTopY};
      middleAnchorBottomPos = new float[] {middleAnchorX, leftBottomY};

      bandRenderer.renderSingleBand(
          gl,
          middleAnchorTopPos,
          middleAnchorBottomPos,
          rightTopPos,
          rightBottomPos,
          false,
          offsetX,
          0,
          bandColor);

      bandRenderer.renderStraightBand(
          gl,
          leftTopPos,
          leftBottomPos,
          middleAnchorTopPos,
          middleAnchorBottomPos,
          false,
          0,
          bandColor,
          1f);
    } else {
      middleAnchorX = groupColumn.getTranslateX();
      if (middleAnchorX > rightX - offsetX) {
        middleAnchorX = rightX - offsetX;
      }

      middleAnchorTopPos = new float[] {middleAnchorX, rightTopY};
      middleAnchorBottomPos = new float[] {middleAnchorX, rightBottomY};

      bandRenderer.renderSingleBand(
          gl,
          leftTopPos,
          leftBottomPos,
          middleAnchorTopPos,
          middleAnchorBottomPos,
          false,
          offsetX,
          0,
          bandColor);

      bandRenderer.renderStraightBand(
          gl,
          middleAnchorTopPos,
          middleAnchorBottomPos,
          rightTopPos,
          rightBottomPos,
          false,
          0,
          bandColor,
          bandColor[3]);
    }

    // gl.glBegin(GL2.GL_QUADS);
    //
    // gl.glVertex3f(leftX, leftBottomY, 2);
    // gl.glVertex3f(rightX, rightBottomY, 2);
    // gl.glVertex3f(rightX, rightTopY, 2);
    // gl.glVertex3f(leftX, leftTopY, 2);
    //
    // gl.glEnd();
    gl.glTranslatef(elementLayout.getTranslateX(), elementLayout.getTranslateY(), 0);
  }
 @Override
 public void addDataSpecificContextMenuEntries(ContextMenuCreator creator, GLBrick brick) {
   TablePerspectiveActions.add(creator, brick.getTablePerspective(), this, true);
 }