Overview | Package | Class | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## application.workbooks.workbook.documents.document.section
Class FootNote

    java.lang.Object
      application.workbooks.workbook.documents.document.section.AbstractText
          application.workbooks.workbook.documents.document.section.FootNote

public class FootNote
extends AbstractText

这个类是文本脚注类，它继承了AbstractText类。

Method Summary
`FontAttribute` | `getFontAttribute(long offset)` 获得指定位置的字体属性。
`long` | `getOriginPosition()` 得到当前脚注的起始位置。
`int` | `getParagraphCount()` 得到当前脚注的段落个数。
`long` | `getParagraphEndOffset(int paragraphIndex)` 在当前脚注得到指定段落的结束位置。
`long` | `getParagraphStartOffset(int paragraphIndex)` 在当前脚注得到指定段落的起始位置。
`java.lang.String` | `getText(long offset, long length)` 返回当前脚注指定范围的文本。
`long` | `getTextLength()` 得到指定脚注的长度。

Methods inherited from class application.workbooks.workbook.documents.document.section.AbstractText
`addBookMark, autoFormat, autoFormatPara, autoFormatPara, changeCase, changeCasePara, checkOffset, clearFormats, clearFormatsPara, clearFormatsPara, copy, copyFormat, createNewSummary, cut, delete, deleteParagraph, deleteParagraph, formatFont, formatPara, formatParagraph, formatParagraph, formatStyle, formatStylePara, formatStylePara, getHyperlink, getPageIndex, getPhoneticAttribute, getTables, getTabStops, highLight, highLight, insert, insert, insertAudio, insertAudio, insertAutoText, insertAutoText, insertAutoTextPara, insertAutoTextPara, insertDate, insertDate, insertField, insertField, insertNumber, insertNumber, insertParagraph, insertPicture, insertPicture, insertSummaryHead, insertTemplateField, insertTime, insertTime, insertVideo, insertVideo, paste, paste, pasteFormat, protectedDoc, selectAll, setBorder, setBorderPara, setBorderPara, setShading, setShadingPara, setShadingPara, TCSCConverter, TCSCConverter, TCSCConverterPara, TCSCConverterPara`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getFontAttribute

    public FontAttribute getFontAttribute(long offset)

  获得指定位置的字体属性。

  Specified by:
    `getFontAttribute` in class `AbstractText`
  Parameters:
    `offset` - 指定位置.
  Returns:
    字体属性。

### getOriginPosition

    public long getOriginPosition()

  得到当前脚注的起始位置。

  Specified by:
    `getOriginPosition` in class `AbstractText`
  Returns:
    当前脚注的起始位置（注：正文、页眉、页脚、脚注、尾注的起始位置不同）

    例子:

         //请先插入脚注并在脚注中输入一些文字
         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         FootNote footNote = section.getFootNote(0);
         long originPos = footNote.getOriginPosition();
         System.out.println("当前脚注的起始位置是：" + originPos);

### getParagraphCount

    public int getParagraphCount()

  得到当前脚注的段落个数。

  Specified by:
    `getParagraphCount` in class `AbstractText`
  Returns:
    当前脚注的段落个数

    例子:

         //请先插入脚注并在脚注中输入一些文字
         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         FootNote footNote = section.getFootNote(0);
         int countPara = footNote.getParagraphCount();
         System.out.println("当前脚注的段落个数是：" + countPara);

### getParagraphEndOffset

    public long getParagraphEndOffset(int paragraphIndex)

  在当前脚注得到指定段落的结束位置。

  Specified by:
    `getParagraphEndOffset` in class `AbstractText`
  Parameters:
    `paragraphIndex` - 指定段落的段落索引号
  Returns:
    指定段落的结束位置

    例子:

         //请先插入尾注并在当前脚注中输入一些文字
         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         FootNote footNote = section.getFootNote(0);
         long endOffest = footNote.getParagraphEndOffset(1);
         System.out.println("指定段落1的结束位置是：" + endOffest);

  See Also:
    `AbstractText.getParagraphStartOffset(int)`

### getParagraphStartOffset

    public long getParagraphStartOffset(int paragraphIndex)

  在当前脚注得到指定段落的起始位置。

  Specified by:
    `getParagraphStartOffset` in class `AbstractText`
  Parameters:
    `paragraphIndex` - 指定段落的段落索引号
  Returns:
    指定段落的起始位置

    例子:

         //请先插入尾注并在当前脚注中输入一些文字
         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         FootNote footNote = section.getFootNote(0);
         long startOffest = footNote.getParagraphStartOffset(1);
         System.out.println("指定段落1的起始位置是：" + startOffest);

  See Also:
    `AbstractText.getParagraphEndOffset(int)`

### getText

    public java.lang.String getText(long offset,
                                    long length)

  返回当前脚注指定范围的文本。

  Specified by:
    `getText` in class `AbstractText`
  Parameters:
    `offset` - 指定范围的起始位置
    `length` - 指定范围的长度
  Returns:
    当前脚注指定范围的文本

    例子:

         //请先插入脚注并在当前脚注中输入一些文字
         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         FootNote footNote = section.getFootNote(0);
         String str = footNote.getText(2,10);
         System.out.println("当前脚注文本是："+str);

### getTextLength

    public long getTextLength()

  得到指定脚注的长度。

  Specified by:
    `getTextLength` in class `AbstractText`
  Returns:
    指定脚注的长度

    例子:

         //请先插入脚注并在脚注中输入一些文字
         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         FootNote footNote = section.getFootNote(0);
         long len = footNote.getTextLength();
         System.out.println("当前脚注的长度是：" + len);

Overview | Package | Class | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

版权所有 2001-2004 无锡永中科技有限公司