📄 paragraph.html
字号:
Check if this row is the first row.</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#remove(int)">remove</A></B>(int index)</CODE>
<BR>
Remove a glyph from 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#removeGlyphs(int, int)">removeGlyphs</A></B>(int startIndex, int endIndex)</CODE>
<BR>
Remove a range of glyphs specified by [startIndex, endIndex].</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#scaleWidth(boolean)">scaleWidth</A></B>(boolean firstRow)</CODE>
<BR>
Get the available width for layout 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#scaleWidth(jexi.core.Row)">scaleWidth</A></B>(<A HREF="../../jexi/core/Row.html" title="class in jexi.core">Row</A> row)</CODE>
<BR>
Get the available width for layout 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#setFormatted(boolean)">setFormatted</A></B>(boolean formatted)</CODE>
<BR>
Set this paragraph formatted or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jexi/core/Paragraph.html" title="class in jexi.core">Paragraph</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jexi/core/Paragraph.html#split(int)">split</A></B>(int index_of_from)</CODE>
<BR>
Break this paragraph into 2 paragraphs. </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#width()">width</A></B>()</CODE>
<BR>
Get the total width of the paragraph.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="Paragraph(jexi.core.Document)"><!-- --></A><H3>
Paragraph</H3>
<PRE>
public <B>Paragraph</B>(<A HREF="../../jexi/core/Document.html" title="class in jexi.core">Document</A> document)</PRE>
<DL>
<DD>Create a new Paragraph object. It will compose later.
<P>
<DT><B>Parameters:</B><DD><CODE>document</CODE> - The top structure of the data.</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getParagraphFormat()"><!-- --></A><H3>
getParagraphFormat</H3>
<PRE>
public <A HREF="../../jexi/core/format/ParagraphFormat.html" title="class in jexi.core.format">ParagraphFormat</A> <B>getParagraphFormat</B>()</PRE>
<DL>
<DD>Get the paragraph format.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The paragraph format.</DL>
</DD>
</DL>
<HR>
<A NAME="getStringFormat(int)"><!-- --></A><H3>
getStringFormat</H3>
<PRE>
public <A HREF="../../jexi/core/format/StringFormat.html" title="class in jexi.core.format">StringFormat</A> <B>getStringFormat</B>(int index)</PRE>
<DL>
<DD>Get the string format of the glyph specified by the index. <br> <b>NOTE</b>: Even if this glyph is not a Char type, it will still return a valid string format object. Just ignore the result returned.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The index of the glyph.<DT><B>Returns:</B><DD>The string format of the glyph.</DL>
</DD>
</DL>
<HR>
<A NAME="format(int, int, java.lang.String, java.lang.Integer, java.lang.Boolean, java.lang.Boolean, java.lang.Boolean, jexi.ui.Color)"><!-- --></A><H3>
format</H3>
<PRE>
public void <B>format</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)</PRE>
<DL>
<DD>To use new Font to format the string which is part of the paragraph. This method may create new StringFormat or break the existing StringFormat.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>startIndex</CODE> - The start index of the string.<DD><CODE>endIndex</CODE> - The end index of the string.<DD><CODE>fontName</CODE> - The font name, or null if ignore.<DD><CODE>fontSize</CODE> - The font size, or null if ignore.<DD><CODE>bold</CODE> - The bold attribute, or null if ignore.<DD><CODE>italic</CODE> - The italic attribute, or null if ignore.<DD><CODE>underlined</CODE> - The underlined attribute, or null if ignore.<DD><CODE>color</CODE> - The color, or null if ignore.</DL>
</DD>
</DL>
<HR>
<A NAME="getFormatted()"><!-- --></A><H3>
getFormatted</H3>
<PRE>
public boolean <B>getFormatted</B>()</PRE>
<DL>
<DD>The paragraph is formatted or not. If it returns "false", the paragraph will not layout properly on the screen before invoking ParagraphCompositor.compose() method.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setFormatted(boolean)"><!-- --></A><H3>
setFormatted</H3>
<PRE>
public void <B>setFormatted</B>(boolean formatted)</PRE>
<DL>
<DD>Set this paragraph formatted or not.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="combine(jexi.core.Paragraph)"><!-- --></A><H3>
combine</H3>
<PRE>
public void <B>combine</B>(<A HREF="../../jexi/core/Paragraph.html" title="class in jexi.core">Paragraph</A> next)</PRE>
<DL>
<DD>Combine the two paragraphs into one, the second paragraph (which passed as a parameter) should be removed from the document after combination.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>next</CODE> - The paragraph to be combined with.</DL>
</DD>
</DL>
<HR>
<A NAME="add(int, jexi.core.Glyph)"><!-- --></A><H3>
add</H3>
<PRE>
public void <B>add</B>(int index, <A HREF="../../jexi/core/Glyph.html" title="interface in jexi.core">Glyph</A> g)</PRE>
<DL>
<DD>Add a glyph to its child list, must be "leaf" glyph such as Char or Picture.<br> Usually a ParagraphCompositor.compose() should be called after one or more times of calling add() or remove().
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The position to be added.<DD><CODE>g</CODE> - The glyph object to be added.</DL>
</DD>
</DL>
<HR>
<A NAME="add(jexi.core.Glyph)"><!-- --></A><H3>
add</H3>
<PRE>
public void <B>add</B>(<A HREF="../../jexi/core/Glyph.html" title="interface in jexi.core">Glyph</A> g)</PRE>
<DL>
<DD>Append a glyph to its child list to the last position. In fact it will inserted before '\r'.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>g</CODE> - The glyph object to be added.</DL>
</DD>
</DL>
<HR>
<A NAME="add(int, char)"><!-- --></A><H3>
add</H3>
<PRE>
public void <B>add</B>(int index, char c)</PRE>
<DL>
<DD>Insert a character at the specified position of the paragraph.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The position of the paragraph.<DD><CODE>c</CODE> - The char code.</DL>
</DD>
</DL>
<HR>
<A NAME="add(char)"><!-- --></A><H3>
add</H3>
<PRE>
public void <B>add</B>(char c)</PRE>
<DL>
<DD>Append a character at the end of the paragraph.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - The char code.</DL>
</DD>
</DL>
<HR>
<A NAME="child(int)"><!-- --></A><H3>
child</H3>
<PRE>
public <A HREF="../../jexi/core/Glyph.html" title="interface in jexi.core">Glyph</A> <B>child</B>(int index)</PRE>
<DL>
<DD>Get the specified child glyph.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The child position.<DT><B>Returns:</B><DD>The specified child glyph.<DT><B>See Also:</B><DD><CODE>jexi.core.Glyph#child(int)</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="remove(int)"><!-- --></A><H3>
remove</H3>
<PRE>
public void <B>remove</B>(int index)</PRE>
<DL>
<DD>Remove a glyph from the paragraph.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The index of the glyph.</DL>
</DD>
</DL>
<HR>
<A NAME="removeGlyphs(int, int)"><!-- --></A><H3>
removeGlyphs</H3>
<PRE>
public void <B>removeGlyphs</B>(int startIndex, int endIndex)</PRE>
<DL>
<DD>Remove a range of glyphs specified by [startIndex, endIndex].
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>startIndex</CODE> - The start index.<DD><CODE>endIndex</CODE> - The end index.</DL>
</DD>
</DL>
<HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -