Class UICSSUtils

java.lang.Object
com.orchestranetworks.ui.UICSSUtils

public final class UICSSUtils extends Object
This class defines server-side CSS utilities.
Since:
5.2.0
  • Method Details

    • getFieldWidth

      public static String getFieldWidth(int oldSizeValue)
      This method computes the CSS inline style width of an input element.

      The attribute size="integer" in input elements is deprecated, it is recommended to use CSS instead. As no equivalence exists in CSS units for the "average width of letter", this function proposes an equivalent in x-height.

      Example uiBodyWriter.add("<input type=\"text\" name=\"year\" style=\"").add(UICSSUtils.getFieldWidth(4)).add("\" value=\"year\"/>");