Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
java.awt

Class ComponentOrientation

  • All Implemented Interfaces:
    Serializable

    public final class ComponentOrientation
    extends Object
    implements Serializable
    The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text. It is used to reflect the differences in this ordering between Western alphabets, Middle Eastern (such as Hebrew), and Far Eastern (such as Japanese).

    Fundamentally, this governs items (such as characters) which are laid out in lines, with the lines then laid out in a block. This also applies to items in a widget: for example, in a check box where the box is positioned relative to the text.

    There are four different orientations used in modern languages as in the following table.

     LT          RT          TL          TR
     A B C       C B A       A D G       G D A
     D E F       F E D       B E H       H E B
     G H I       I H G       C F I       I F C
     

    (In the header, the two-letter abbreviation represents the item direction in the first letter, and the line direction in the second. For example, LT means "items left-to-right, lines top-to-bottom", TL means "items top-to-bottom, lines left-to-right", and so on.)

    The orientations are:

    • LT - Western Europe (optional for Japanese, Chinese, Korean)
    • RT - Middle East (Arabic, Hebrew)
    • TR - Japanese, Chinese, Korean
    • TL - Mongolian
    Components whose view and controller code depends on orientation should use the isLeftToRight() and isHorizontal() methods to determine their behavior. They should not include switch-like code that keys off of the constants, such as:
     if (orientation == LEFT_TO_RIGHT) {
       ...
     } else if (orientation == RIGHT_TO_LEFT) {
       ...
     } else {
       // Oops
     }
     
    This is unsafe, since more constants may be added in the future and since it is not guaranteed that orientation objects will be unique.
    See Also:
    Serialized Form
    • Field Detail

      • LEFT_TO_RIGHT

        public static final ComponentOrientation LEFT_TO_RIGHT
        Items run left to right and lines flow top to bottom Examples: English, French.
      • RIGHT_TO_LEFT

        public static final ComponentOrientation RIGHT_TO_LEFT
        Items run right to left and lines flow top to bottom Examples: Arabic, Hebrew.
      • UNKNOWN

        public static final ComponentOrientation UNKNOWN
        Indicates that a component's orientation has not been set. To preserve the behavior of existing applications, isLeftToRight will return true for this value.
    • Method Detail

      • isHorizontal

        public boolean isHorizontal()
        Are lines horizontal? This will return true for horizontal, left-to-right writing systems such as Roman.
      • isLeftToRight

        public boolean isLeftToRight()
        HorizontalLines: Do items run left-to-right?
        Vertical Lines: Do lines run left-to-right?
        This will return true for horizontal, left-to-right writing systems such as Roman.
      • getOrientation

        public static ComponentOrientation getOrientation(Locale locale)
        Returns the orientation that is appropriate for the given locale.
        Parameters:
        locale - the specified locale
      • getOrientation

        @Deprecated
        public static ComponentOrientation getOrientation(ResourceBundle bdl)
        Deprecated. As of J2SE 1.4, use getOrientation(java.util.Locale).
        Returns the orientation appropriate for the given ResourceBundle's localization. Three approaches are tried, in the following order:
        1. Retrieve a ComponentOrientation object from the ResourceBundle using the string "Orientation" as the key.
        2. Use the ResourceBundle.getLocale to determine the bundle's locale, then return the orientation for that locale.
        3. Return the default locale's orientation.

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-java/awt/componentorientation.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut