Fields Summary |
---|
private static final long | serialVersionUIDThe Constant serialVersionUID. |
public static final ComponentOrientation | LEFT_TO_RIGHTThe Constant LEFT_TO_RIGHT indicates that items run left to right. |
public static final ComponentOrientation | RIGHT_TO_LEFTThe Constant RIGHT_TO_LEFT indicates that items run right to left. |
public static final ComponentOrientation | UNKNOWNThe Constant UNKNOWN indicates that a component's orientation is not set. |
private static final Set | rlLangsThe Constant rlLangs. |
private final boolean | horizontalThe horizontal. |
private final boolean | left2rightThe left2right. |
Methods Summary |
---|
public static java.awt.ComponentOrientation | getOrientation(java.util.ResourceBundle bdl)Gets the orientation for the given ResourceBundle's localization.
rlLangs.add("ar"); //$NON-NLS-1$
rlLangs.add("fa"); //$NON-NLS-1$
rlLangs.add("iw"); //$NON-NLS-1$
rlLangs.add("ur"); //$NON-NLS-1$
Object obj = null;
try {
obj = bdl.getObject("Orientation"); //$NON-NLS-1$
} catch (MissingResourceException mre) {
obj = null;
}
if (obj instanceof ComponentOrientation) {
return (ComponentOrientation)obj;
}
Locale locale = bdl.getLocale();
if (locale == null) {
locale = Locale.getDefault();
}
return getOrientation(locale);
|
public static java.awt.ComponentOrientation | getOrientation(java.util.Locale locale)Gets the orientation for the specified locale.
String lang = locale.getLanguage();
return rlLangs.contains(lang) ? RIGHT_TO_LEFT : LEFT_TO_RIGHT;
|
public boolean | isHorizontal()Returns true if the text of the of writing systems arranged horizontally.
return horizontal;
|
public boolean | isLeftToRight()Returns true if the text is arranged from left to right.
return left2right;
|