private int getCharWidth(String text, Align align)
    {
        final int width;
        if (align == Align.RIGHT)
        {
            width = getTextWidth(text);
        }
        else if (align == Align.CENTER)
        {
            width = getTextWidth(text) / 2;
        }
        else
        {
            width = 0;
        }
        return width;
    }
private int getCharWidth ( String text , Align align ) { final int width ; if ( align == Align . RIGHT ) { width = getTextWidth ( text ) ; } else if ( align == Align . CENTER ) { width = getTextWidth ( text ) / 2 ; } else { width = 0 ; } return width ; }
Get character width depending of alignment.

@param text The text reference.
@param align The align.
@return The char width.