public class

BidiUtils

extends Object
java.lang.Object
   ↳ com.google.gwt.i18n.client.BidiUtils

Class Overview

A set of bidi-related utility methods.

Summary

Constants
String DIR_PROPERTY_NAME The name of the element property which controls element directionality.
Public Constructors
BidiUtils()
Public Methods
static HasDirection.Direction getDirectionOnElement(Element elem)
Gets the directionality of an element.
static void setDirectionOnElement(Element elem, HasDirection.Direction direction)
Sets the directionality property for an element.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String DIR_PROPERTY_NAME

The name of the element property which controls element directionality.

Constant Value: "dir"

Public Constructors

public BidiUtils ()

Public Methods

public static HasDirection.Direction getDirectionOnElement (Element elem)

Gets the directionality of an element.

Parameters
elem the element on which to check the directionality property
Returns
  • RTL if the directionality is right-to-left, LTR if the directionality is left-to-right, or DEFAULT if the directionality is not explicitly set

public static void setDirectionOnElement (Element elem, HasDirection.Direction direction)

Sets the directionality property for an element.

Parameters
elem the element on which to set the property
direction RTL if the directionality should be set to right-to-left, LTR if the directionality should be set to left-to-right DEFAULT if the directionality should be removed from the element