FormattedText

FormattedText

ภาพรวม

FormattedText เป็นคลาสใน Aspose.PDF FOSS สําหรับ Java.

แสดงข้อความที่จัดรูปแบบด้วยตัวอักษร สี และคุณสมบัติการโคด ใช้เป็นหลักสําหรับตราใน API หน้าผิวหน้า.

หมวดนี้ให้ 22 วิธีในการทํางานกับวัตถุ FormattedText ในโปรแกรม Java. วิธีการที่ใช้ได้แก่: FormattedText, addNewLineText, getBackColor, getEncoding, getFirstLine, getFontName, getFontSize, getFontStyle, getLineSpacing, getText, getTextColor, isEmbedded,และ 1 วิธีการเพิ่มเติม. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Java ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Java. คุณสมบัติ: backColor, embedded, encoding, firstLine, fontName, fontSize,และอีก 4 คน.

คุณสมบัติ

ชื่อประเภทAccessคําอธิบาย
firstLineStringอ่านกลับบรรทัดแรกของข้อความ หรือเส้นว่างถ้าไม่มีข้อเขียนที่กําหนดไว้.
textStringอ่านกลับข้อความทุกแถวที่เข้ากับตัวอักษรใหม่.
textColorColorอ่านส่งสีพื้นหน้า (ข้อความ) กลับ.
backColorColorอ่านส่งสีพื้นหลังกลับ.
fontNameStringอ่านส่งชื่อตัวอักษรกลับ.
fontSizefloatอ่านส่งผลขนาดตัวอักษรในจุด.
embeddedbooleanอ่านกลับความต้องการให้มีตัวอักษรใน PDF.
fontStyleFontStyleอ่านกลับรูปแบบตัวอักษรที่กําหนดไว้ก่อน.
encodingEncodingTypeอ่านกลับชนิดการรหัส.
lineSpacingfloatอ่านกลับความห่างของเส้นในจุด.

วิธีการ

Signatureคําอธิบาย
FormattedText()สร้างตัวอย่าง {@code FormattedText} ที่ว่างเปล่า.
FormattedText(text: String)สร้าง {@code FormattedText} กับข้อความที่ให้.
FormattedText(text: String, foregroundColor: Color, backgroundColor: Color)สร้าง {@code FormattedText} ด้วยสีพื้นหน้าและหลัง.
FormattedText(text: String, color: Color, fontStyle: FontStyle, encoding: EncodingType, embedded: boolean, fontSize: float)สร้าง {@code FormattedText} ด้วยสี, รูปแบบตัวอักษร, การโค้ดและขนาด.
FormattedText(text: String, color: Color, fontName: String, encoding: EncodingType, embedded: boolean, fontSize: float)สร้าง {@code FormattedText} ด้วยสี, ชื่อตัวอักษร, การโค้ดและขนาด.
FormattedText(text: String, foregroundColor: Color, backgroundColor: Color, fontStyle: FontStyle, encoding: EncodingType, embedded: boolean, fontSize: float)สร้าง {@code FormattedText} ด้วยสีหน้า / หลัง, รูปแบบตัวอักษร, การโค้ดและขนาด.
FormattedText(text: String, foregroundColor: Color, backgroundColor: Color, fontName: String, encoding: EncodingType, embedded: boolean, fontSize: float)สร้าง {@code FormattedText} ด้วยสีหน้า / หลัง, ชื่อตัวอักษร, การโค้ดและขนาด.
FormattedText(text: String, color: Color, fontStyle: FontStyle, encoding: EncodingType, embedded: boolean, fontSize: float, lineSpacing: float)สร้าง {@code FormattedText} ด้วยสี, รูปแบบตัวอักษร, การโค้ด, ขนาด และระยะทางเส้น.
FormattedText(text: String, foregroundColor: Color, backgroundColor: Color, fontStyle: FontStyle, encoding: EncodingType, embedded: boolean, fontSize: float, lineSpacing: float)สร้าง {@code FormattedText} ด้วยสีหน้า / หลัง, รูปแบบตัวอักษร, การโค้ด, ขนาดและระยะทางเส้น.
addNewLineText(text: String)เพิ่มบรรทัดใหม่ของข้อความ.
addNewLineText(text: String, lineSpacing: float)เพิ่มบรรทัดใหม่ของข้อความกับการระยะสายที่กําหนดเอง.
getFirstLine()Stringกลับบรรทัดแรกของข้อความ หรือเส้นว่างถ้าไม่มีข้อเขียนที่กําหนดไว้.
getText()Stringกลับข้อความทุกแถวที่เข้ากับตัวอักษรใหม่.
getTextColor()Colorส่งสีพื้นหน้า (ข้อความ) กลับ.
getBackColor()Colorส่งสีพื้นหลังกลับ.
getFontName()Stringส่งชื่อตัวอักษรกลับ.
getFontSize()floatส่งผลขนาดตัวอักษรในจุด.
isEmbedded()booleanกลับความต้องการให้มีตัวอักษรใน PDF.
getFontStyle()FontStyleกลับรูปแบบตัวอักษรที่กําหนดไว้ก่อน.
getEncoding()EncodingTypeกลับชนิดการรหัส.
getLineSpacing()floatกลับความห่างของเส้นในจุด.
toString()String

ดูเช่นกัน

 ภาษาไทย