Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.utils
Class BiDiUtils

    java.lang.Object
      |
      +--oracle.portal.utils.BiDiUtils

public class BiDiUtils
extends java.lang.Object

Utility class containing methods useful when rendering content that can be displayed in multiple languages that may be Bi-Directional, i.e. some should be rendered from left to right (LTR) and others from right to left (RTL).

Field Summary
`static java.lang.String` | `ARABIC` Constant representing the language code for RTL language Arabic.
`static java.lang.String` | `BIDI_DIR_ATTRIBUTE`
`static java.lang.String` | `HEBREW` Constant representing the language code for RTL language Hebrew.
`static java.lang.String` | `LEFT`
`static java.lang.String` | `NO_DIR_ATTRIBUTE`
`static java.lang.String` | `RIGHT`

Constructor Summary
`BiDiUtils()`

Method Summary
`static java.lang.String` | `getAlignment(java.util.Locale l, java.lang.String alignment)` Method to return a left or right alignment value depending on whether the portal is being viewed in a BiDi language or not.
`static java.lang.String` | `getAlignment(java.lang.String language, java.lang.String alignment)` Method to return a left or right alignment value depending on whether the portal is being viewed in a BiDi language or not.
`static java.lang.String` | `getDirAttribute(java.util.Locale l)` Method to return the HTML attribute DIR=RTL when the language being used is a BiDi language.
`static java.lang.String` | `getDirAttribute(java.lang.String language)` Method to return the HTML attribute DIR=RTL when the language being used is a BiDi language.
`static boolean` | `isBiDi(java.util.Locale l)` Method to check whether a language is a BiDi language (i.e.
`static boolean` | `isBiDi(java.lang.String language)` Method to check whether a language is a BiDi language (i.e.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RIGHT

    public static final java.lang.String RIGHT

### LEFT

    public static final java.lang.String LEFT

### BIDI_DIR_ATTRIBUTE

    public static final java.lang.String BIDI_DIR_ATTRIBUTE

### NO_DIR_ATTRIBUTE

    public static final java.lang.String NO_DIR_ATTRIBUTE

### ARABIC

    public static final java.lang.String ARABIC

  Constant representing the language code for RTL language Arabic.

### HEBREW

    public static final java.lang.String HEBREW

  Constant representing the language code for RTL language Hebrew.

Constructor Detail

### BiDiUtils

    public BiDiUtils()

Method Detail

### isBiDi

    public static boolean isBiDi(java.util.Locale l)

  Method to check whether a language is a BiDi language (i.e. rendered RTL).
  Parameters:
    `l` - The locale object containing the current language setting.
  Returns:
    boolean

### isBiDi

    public static boolean isBiDi(java.lang.String language)

  Method to check whether a language is a BiDi language (i.e. rendered RTL).
  Parameters:
    `language` - A String representation of the current language setting.
  Returns:
    boolean

### getDirAttribute

    public static java.lang.String getDirAttribute(java.util.Locale l)

  Method to return the HTML attribute DIR=RTL when the language being used is a BiDi language.
  Parameters:
    `l` - The locale object containing the current language setting.
  Returns:
    String

### getDirAttribute

    public static java.lang.String getDirAttribute(java.lang.String language)

  Method to return the HTML attribute DIR=RTL when the language being used is a BiDi language.
  Parameters:
    `language` - A String representation of the current language setting.
  Returns:
    String

### getAlignment

    public static java.lang.String getAlignment(java.util.Locale l,
                                                java.lang.String alignment)

  Method to return a left or right alignment value depending on whether the portal is being viewed in a BiDi language or not.
  Parameters:
    `l` - The locale object containing the current language setting.
    `alignment` - String to specify whether the alignment should be right or left if HTML was viewed in a LTR language.
  Returns:
    String

### getAlignment

    public static java.lang.String getAlignment(java.lang.String language,
                                                java.lang.String alignment)

  Method to return a left or right alignment value depending on whether the portal is being viewed in a BiDi language or not.
  Parameters:
    `l` - The locale object containing the current language setting.
    `alignment` - String to specify whether the alignment should be right or left if HTML was viewed in a LTR language.
  Returns:
    String

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD