protected void setArrays() {

    float[] vertices = new float[vertexLength * 2];

    for (int i = 0; i < vertexLength; i++) {
      vertices[i] = start[0];
      vertices[i + vertexLength] = end[i];
    }

    mVertexBuffer = RenderUtils.buildFloatBuffer(vertices);
    mColorBuffer = RenderUtils.buildFloatBuffer(color);
  }
 public void testStripControlCharactersWithNull() {
   try {
     RenderUtils.stripControlCharacters(null);
     fail("Expected exception with null input");
   } catch (NullPointerException e) {
     // Suceeded, do nothing
   }
 }
  private void renderPassInventory(
      int pass, BlockBuildCraft block, int meta, RenderBlocks renderer) {
    if (block.isRotatable()) {
      renderer.uvRotateTop = Y_ROTATE[block.getFrontSide(meta) - 2];
      renderer.uvRotateBottom = Y_ROTATE[block.getFrontSide(meta) - 2];
    }

    RenderUtils.drawBlockItem(renderer, Tessellator.instance, block, meta);

    renderer.uvRotateTop = 0;
    renderer.uvRotateBottom = 0;
  }
  public void renderMaxLength(final HtmlInputComponent component, final ResponseWriter writer)
      throws IOException {
    final UIInput uiComponent = (UIInput) component;
    final String outerComponentId = component.getClientId();

    if (isMaxLengthNecessary(component)) {
      renderMaxLengthElement(writer, uiComponent);

      final String maxLengthText =
          new WebXmlParameters(FacesContext.getCurrentInstance().getExternalContext())
              .getMaxLengthText();
      final Integer maxLength = ((MaxLength) component).getMaxLength();

      RenderUtils.renderJQueryPluginCall(
          outerComponentId,
          "butterMaxLength('" + maxLength + "', '" + maxLengthText + "')",
          writer,
          uiComponent);
    }
  }
 public void testStripControlCharactersWithOnlyControlCharacters() {
   final String strippedContent = RenderUtils.stripControlCharacters(ONLY_CONTROL_CHARS);
   assertEquals("", strippedContent);
 }
 public void testStripControlCharactersWithControlCharacters() {
   final String strippedContent = RenderUtils.stripControlCharacters(WITH_CONTROL_CHARS);
   assertEquals(WITHOUT_CONTROL_CHARS, strippedContent);
 }