componentorientation.html
来自「API資料大全」· HTML 代码 · 共 385 行 · 第 1/2 页
HTML
385 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:32:27 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class ComponentOrientation</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ComponentOrientation.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/awt/Component.AccessibleAWTComponent.AccessibleAWTFocusHandler.html"><B>PREV CLASS</B></A> <A HREF="../../java/awt/Container.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="ComponentOrientation.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt</FONT><BR>Class ComponentOrientation</H2><PRE><A HREF="../../java/lang/Object.html">java.lang.Object</A> | +--<B>java.awt.ComponentOrientation</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../java/io/Serializable.html">Serializable</A></DD></DL><HR><DL><DT>public final class <B>ComponentOrientation</B><DT>extends <A HREF="../../java/lang/Object.html">Object</A><DT>implements <A HREF="../../java/io/Serializable.html">Serializable</A></DL><P>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). <p> 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. <p> There are four different orientations used in modern languages as in the following table.<br> <pre> 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 </pre><br> (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", BL means "items bottom-to-top, lines bottom-to-top", and so on.) <p> The orientations are: <ul> <li>LT - Western Europe (optional for Japanese, Chinese, Korean) <li>RT - Middle East (Arabic, Hebrew) <li>TR - Japanese, Chinese, Korean <li>TL - Mongolian </ul> Components whose view and controller code depends on orientation should use the <code>isLeftToRight()</code> and <code>isHorizontal()</code> methods to determine their behavior. They should not include switch-like code that keys off of the constants, such as: <pre> if (orientation == LEFT_TO_RIGHT) { ... } else if (orientation == RIGHT_TO_LEFT) { ... } else { // Oops } </pre> This is unsafe, since more constants may be added in the future and since it is not guaranteed that orientation objects will be unique.<P><DL><DT><B>See Also: </B><DD><A HREF="../../serialized-form.html#java.awt.ComponentOrientation">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/awt/ComponentOrientation.html">ComponentOrientation</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/ComponentOrientation.html#LEFT_TO_RIGHT">LEFT_TO_RIGHT</A></B></CODE><BR> Items run left to right and lines flow top to bottom Examples: English, French.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/awt/ComponentOrientation.html">ComponentOrientation</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/ComponentOrientation.html#RIGHT_TO_LEFT">RIGHT_TO_LEFT</A></B></CODE><BR> Items run right to left and lines flow top to bottom Examples: Arabic, Hebrew.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/awt/ComponentOrientation.html">ComponentOrientation</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/ComponentOrientation.html#UNKNOWN">UNKNOWN</A></B></CODE><BR> Indicates that a component's orientation has not been set.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/awt/ComponentOrientation.html">ComponentOrientation</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/ComponentOrientation.html#getOrientation(java.util.Locale)">getOrientation</A></B>(<A HREF="../../java/util/Locale.html">Locale</A> locale)</CODE><BR> Return the orientation that is appropriate for the given locale</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/awt/ComponentOrientation.html">ComponentOrientation</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/ComponentOrientation.html#getOrientation(java.util.ResourceBundle)">getOrientation</A></B>(<A HREF="../../java/util/ResourceBundle.html">ResourceBundle</A> bdl)</CODE><BR> Return the orientation appropriate for the given ResourceBundle's localization.</TD></TR>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?