Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

oracle.portal.utils
Class BiDiUtils

java.lang.Object
  extended by 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. rendered RTL).
static boolean isBiDi(java.lang.String language)
          Method to check whether a language is a BiDi language (i.e. rendered RTL).
 
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
See Also:
Constant Field Values

LEFT

public static final java.lang.String LEFT
See Also:
Constant Field Values

BIDI_DIR_ATTRIBUTE

public static final java.lang.String BIDI_DIR_ATTRIBUTE
See Also:
Constant Field Values

NO_DIR_ATTRIBUTE

public static final java.lang.String NO_DIR_ATTRIBUTE
See Also:
Constant Field Values

ARABIC

public static final java.lang.String ARABIC
Constant representing the language code for RTL language Arabic.

See Also:
Constant Field Values

HEBREW

public static final java.lang.String HEBREW
Constant representing the language code for RTL language Hebrew.

See Also:
Constant Field Values
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

Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.