📄 paragraph.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_04) on Sun Aug 15 09:34:50 CST 2004 -->
<TITLE>
Paragraph
</TITLE>
<META NAME="keywords" CONTENT="jexi.core.Paragraph class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Paragraph";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<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/Paragraph.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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../jexi/core/Page.html" title="class in jexi.core"><B>PREV CLASS</B></A>
<A HREF="../../jexi/core/ParagraphCompositor.html" title="class in jexi.core"><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="Paragraph.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
jexi.core</FONT>
<BR>
Class Paragraph</H2>
<PRE>
java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by"><B>jexi.core.Paragraph</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../jexi/core/Composition.html" title="interface in jexi.core">Composition</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>Paragraph</B><DT>extends java.lang.Object<DT>implements <A HREF="../../jexi/core/Composition.html" title="interface in jexi.core">Composition</A></DL>
<P>
Paragraph represent a paragraph of a document. <b>NOTE</b>: It is a basic glyph structure that do NOT contains physical structure. <br> It must contains at least 1 Characters that is the end flag: '\r'. Once a paragraph object is created, the end flag '\r' is added automatically, and take care to operate the paragraph to make sure the end flag will never be deleted.
<P>
<P>
<DL>
<DT><B>Author:</B></DT> <DD>Xuefeng</DD></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#Paragraph(jexi.core.Document)">Paragraph</A></B>(<A HREF="../../jexi/core/Document.html" title="class in jexi.core">Document</A> document)</CODE>
<BR>
Create a new Paragraph object. </TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<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> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#add(char)">add</A></B>(char c)</CODE>
<BR>
Append a character at the end of the paragraph.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#add(jexi.core.Glyph)">add</A></B>(<A HREF="../../jexi/core/Glyph.html" title="interface in jexi.core">Glyph</A> g)</CODE>
<BR>
Append a glyph to its child list to the last position. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#add(int, char)">add</A></B>(int index, char c)</CODE>
<BR>
Insert a character at the specified position of the paragraph.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#add(int, jexi.core.Glyph)">add</A></B>(int index, <A HREF="../../jexi/core/Glyph.html" title="interface in jexi.core">Glyph</A> g)</CODE>
<BR>
Add a glyph to its child list, must be "leaf" glyph such as Char or Picture.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#appendRow(jexi.core.Row)">appendRow</A></B>(<A HREF="../../jexi/core/Row.html" title="class in jexi.core">Row</A> row)</CODE>
<BR>
This method is called by ParagraphCompositor to append a Row.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jexi/core/Glyph.html" title="interface in jexi.core">Glyph</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#child(int)">child</A></B>(int index)</CODE>
<BR>
Get the specified child glyph.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#clearAllRows()">clearAllRows</A></B>()</CODE>
<BR>
This method is called by ParagraphCompositor to reset all rows. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#combine(jexi.core.Paragraph)">combine</A></B>(<A HREF="../../jexi/core/Paragraph.html" title="class in jexi.core">Paragraph</A> next)</CODE>
<BR>
Combine the two paragraphs into one, the second paragraph (which passed as a parameter) should be removed from the document after combination.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#debug()">debug</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#draw(jexi.ui.Graphics)">draw</A></B>(<A HREF="../../jexi/ui/Graphics.html" title="interface in jexi.ui">Graphics</A> g)</CODE>
<BR>
Unsupported operation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#format(int, int, java.lang.String, java.lang.Integer, java.lang.Boolean, java.lang.Boolean, java.lang.Boolean, jexi.ui.Color)">format</A></B>(int startIndex, int endIndex, java.lang.String fontName, java.lang.Integer fontSize, java.lang.Boolean bold, java.lang.Boolean italic, java.lang.Boolean underlined, <A HREF="../../jexi/ui/Color.html" title="interface in jexi.ui">Color</A> color)</CODE>
<BR>
To use new Font to format the string which is part of the paragraph. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#getFormatted()">getFormatted</A></B>()</CODE>
<BR>
The paragraph is formatted or not. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#getGlyphsCount()">getGlyphsCount</A></B>()</CODE>
<BR>
Get the count of the child glyphs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jexi/core/format/ParagraphFormat.html" title="class in jexi.core.format">ParagraphFormat</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#getParagraphFormat()">getParagraphFormat</A></B>()</CODE>
<BR>
Get the paragraph format.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jexi/core/Row.html" title="class in jexi.core">Row</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#getRow(int)">getRow</A></B>(int index)</CODE>
<BR>
Get the specified row.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#getRowIndex(jexi.core.Row)">getRowIndex</A></B>(<A HREF="../../jexi/core/Row.html" title="class in jexi.core">Row</A> row)</CODE>
<BR>
Get the index of the row.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.ArrayList</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#getRows()">getRows</A></B>()</CODE>
<BR>
Once the paragraph was formatted by a compositor, view can get the formatted rows to display.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#getRowsCount()">getRowsCount</A></B>()</CODE>
<BR>
Get the count of the rows.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#getRowSpace()">getRowSpace</A></B>()</CODE>
<BR>
Get the row space.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jexi/core/format/StringFormat.html" title="class in jexi.core.format">StringFormat</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#getStringFormat(int)">getStringFormat</A></B>(int index)</CODE>
<BR>
Get the string format of the glyph specified by the index. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#intersects(int, int)">intersects</A></B>(int x, int y)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#isFirstRow(jexi.core.Row)">isFirstRow</A></B>(<A HREF="../../jexi/core/Row.html" title="class in jexi.core">Row</A> row)</CODE>
<BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -