Class TextRotation
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การหมุนข้อความ
เข้าถึงการตั้งค่าการหมุนข้อความของเซลล์
เมธอด
วิธีการ | ประเภทการแสดงผล | รายละเอียดแบบย่อ |
getDegrees() | Integer | รับมุมระหว่างการวางแนวข้อความมาตรฐานกับการวางแนวข้อความปัจจุบัน |
isVertical() | Boolean | แสดงผลเป็น true หากข้อความซ้อนกันแนวตั้ง และแสดงผลเป็น false ในกรณีอื่นๆ |
เอกสารประกอบโดยละเอียด
getDegrees()
รับมุมระหว่างการวางแนวข้อความมาตรฐานกับการวางแนวข้อความปัจจุบัน สำหรับข้อความจากซ้ายไปขวา มุมบวกจะเป็นทิศทางทวนเข็มนาฬิกา หากตั้งค่าข้อความให้ซ้อนในแนวตั้ง เมธอดนี้จะแสดงผล 0
รีเทิร์น
Integer
— องศาระหว่างการหมุนข้อความมาตรฐานกับการหมุนข้อความปัจจุบัน
isVertical()
แสดงผลเป็น true
หากข้อความซ้อนกันแนวตั้ง และแสดงผลเป็น false
ในกรณีอื่นๆ
รีเทิร์น
Boolean
— ข้อความซ้อนกันหรือไม่
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eTextRotation\u003c/code\u003e allows you to control the rotation settings of text within a cell.\u003c/p\u003e\n"],["\u003cp\u003eYou can access the angle of rotation using \u003ccode\u003egetDegrees()\u003c/code\u003e and check for vertical stacking using \u003ccode\u003eisVertical()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetDegrees()\u003c/code\u003e returns an integer representing the angle, while \u003ccode\u003eisVertical()\u003c/code\u003e returns a boolean indicating vertical or horizontal orientation.\u003c/p\u003e\n"]]],[],null,["# Class TextRotation\n\nTextRotation\n\nAccess the text rotation settings for a cell. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------|-------------|------------------------------------------------------------------------------------|\n| [getDegrees()](#getDegrees()) | `Integer` | Gets the angle between standard text orientation and the current text orientation. |\n| [isVertical()](#isVertical()) | `Boolean` | Returns `true` if the text is stacked vertically; returns `false` otherwise. |\n\nDetailed documentation\n----------------------\n\n### `get``Degrees()`\n\nGets the angle between standard text orientation and the current text orientation. For\nleft-to-right text, positive angles are in the counterclockwise direction. If the text is set\nto stack vertically, this method returns `0`.\n\n#### Return\n\n\n`Integer` --- The degrees between standard text rotation and the current text rotation.\n\n*** ** * ** ***\n\n### `is``Vertical()`\n\nReturns `true` if the text is stacked vertically; returns `false` otherwise.\n\n#### Return\n\n\n`Boolean` --- Whether or not the text is stacked vertically."]]