Package oracle.i18n.servlet.localesource
Class LocaleSource.Alignment
- java.lang.Object
-
- oracle.i18n.servlet.localesource.LocaleSource.Alignment
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- LocaleSource
public static class LocaleSource.Alignment extends Object implements Serializable
TheLocaleSource.Alignmentclass represents the alignment of text elements.To set the text alignment in HTML, specify the attribute
align="left"oralign="right"in HTML tags. The value is effective, even if you switch the writing direction in HTML fromLTRtoRTL. As a result, you see text elements in opposite alignment inRTLmode. To avoid this issue, use this parameter value class to specify eitherLocaleSource.Alignment.STARTorLocaleSource.Alignment.ENDin place of theleftorrightattributes. GDK automatically detects the writing direction to return the appropriate alignment value.Note this class is a constant value class, so this will not determine the alignment.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static LocaleSource.AlignmentENDTheLocaleSource.Alignmentobject that represents the ending alignment.static LocaleSource.AlignmentSTARTTheLocaleSource.Alignmentobject that represents the starting alignment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocaleSource.AlignmentgetAlignment(String name)ReturnsLocaleSource.Alignmentobject from the input string that is eitherSTARTorEND.inthashCode()Returns the hash value.StringtoString()ReturnsSTARTorENDrepresenting a display writing direction.
-
-
-
Field Detail
-
START
public static final LocaleSource.Alignment START
TheLocaleSource.Alignmentobject that represents the starting alignment. If the mode is left-to-right writing direction,leftis returned; otherwiserightis returned.
-
END
public static final LocaleSource.Alignment END
TheLocaleSource.Alignmentobject that represents the ending alignment. If the mode is left-to-right writing direction,rightis returned; otherwiseleftis returned.
-
-
Method Detail
-
getAlignment
public LocaleSource.Alignment getAlignment(String name)
ReturnsLocaleSource.Alignmentobject from the input string that is eitherSTARTorEND.- Parameters:
name- aStringobject representing the alignment- Returns:
- a
LocaleSource.Alignmentobject representing the text alignment
-
toString
public String toString()
ReturnsSTARTorENDrepresenting a display writing direction.
-
-