📄 caret.html
字号:
<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="Caret(jexi.core.Document, int, int, int)"><!-- --></A><H3>
Caret</H3>
<PRE>
public <B>Caret</B>(<A HREF="../../jexi/core/Document.html" title="class in jexi.core">Document</A> document, int pageIndex, int rowIndex, int columnIndex)</PRE>
<DL>
<DD>Create a caret. Called by Document because only the document know the caret's location and it's height.
<P>
<DT><B>Parameters:</B><DD><CODE>document</CODE> - The document object.<DD><CODE>pageIndex</CODE> - The paragraph index.<DD><CODE>rowIndex</CODE> - The row index.<DD><CODE>columnIndex</CODE> - The column index.</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="moveRight()"><!-- --></A><H3>
moveRight</H3>
<PRE>
public boolean <B>moveRight</B>()</PRE>
<DL>
<DD>Move the caret to the next position. (User pressed "->" key).
<P>
<DD><DL>
<DT><B>Returns:</B><DD>True if it moved.</DL>
</DD>
</DL>
<HR>
<A NAME="moveLeft()"><!-- --></A><H3>
moveLeft</H3>
<PRE>
public boolean <B>moveLeft</B>()</PRE>
<DL>
<DD>Move the caret to the previous position. (User pressed "<-" key) <br> If it can move, then it will move and return TRUE, else no action is done and FALSE will returned.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>True if it moved.</DL>
</DD>
</DL>
<HR>
<A NAME="moveTo(jexi.core.Position)"><!-- --></A><H3>
moveTo</H3>
<PRE>
public void <B>moveTo</B>(<A HREF="../../jexi/core/Position.html" title="class in jexi.core">Position</A> position)</PRE>
<DL>
<DD>Move caret to the specified position.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>position</CODE> - The position to move to.</DL>
</DD>
</DL>
<HR>
<A NAME="getHeight()"><!-- --></A><H3>
getHeight</H3>
<PRE>
public int <B>getHeight</B>()</PRE>
<DL>
<DD>Get the height of the caret. So that the View can set it's bound to {x, y, 2, height}. <br> <b>NOTE</b>: The height is the right glyph's height, in fact is it's StringFormat.getFont().height() even if the glyph is not a Char.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The current height of the caret.</DL>
</DD>
</DL>
<HR>
<A NAME="getLocation()"><!-- --></A><H3>
getLocation</H3>
<PRE>
public <A HREF="../../jexi/core/Point.html" title="class in jexi.core">Point</A> <B>getLocation</B>()</PRE>
<DL>
<DD>Get the point of the caret. So that the View can locate the caret at (Point.x, Point.y). <br> <b>NOTE</b>: The point is relative to document, not View, so View must transform the returned point.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The point of the caret.</DL>
</DD>
</DL>
<HR>
<A NAME="setLocation(int, int)"><!-- --></A><H3>
setLocation</H3>
<PRE>
public void <B>setLocation</B>(int x, int y)</PRE>
<DL>
<DD>Set the new location of the caret. The (x, y) of the document is the hit point clicked by user. We must calculate the nearest location of the document, and reset the paragraph and index.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The point x.<DD><CODE>y</CODE> - The point y.</DL>
</DD>
</DL>
<HR>
<A NAME="getRow()"><!-- --></A><H3>
getRow</H3>
<PRE>
public <A HREF="../../jexi/core/Row.html" title="class in jexi.core">Row</A> <B>getRow</B>()</PRE>
<DL>
<DD>Get the row where the caret is.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The row.</DL>
</DD>
</DL>
<HR>
<A NAME="getPargraph()"><!-- --></A><H3>
getPargraph</H3>
<PRE>
public <A HREF="../../jexi/core/Paragraph.html" title="class in jexi.core">Paragraph</A> <B>getPargraph</B>()</PRE>
<DL>
<DD>Get the paragraph where the caret is.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The paragraph.</DL>
</DD>
</DL>
<HR>
<A NAME="getPosition()"><!-- --></A><H3>
getPosition</H3>
<PRE>
public <A HREF="../../jexi/core/Position.html" title="class in jexi.core">Position</A> <B>getPosition</B>()</PRE>
<DL>
<DD>Get the position of the caret.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The position of the caret.</DL>
</DD>
</DL>
<HR>
<A NAME="getInsertIndex()"><!-- --></A><H3>
getInsertIndex</H3>
<PRE>
public int <B>getInsertIndex</B>()</PRE>
<DL>
<DD>Get the insert index of the paragraph.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The insert index.</DL>
</DD>
</DL>
<HR>
<A NAME="debug()"><!-- --></A><H3>
debug</H3>
<PRE>
public void <B>debug</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" 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_bottom_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/Caret.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/AbsPosition.html" title="class in jexi.core"><B>PREV CLASS</B></A>
<A HREF="../../jexi/core/Char.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="Caret.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_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -