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
Class WordCount

    java.lang.Object
      application.workbooks.workbook.documents.document.WordCount

public class WordCount
extends java.lang.Object

此类封装了当前文档的字符统计信息。

Constructor Summary
`WordCount(boolean isCountHN)` 创建当前文档的字符统计信息对象。

Method Summary
`long` | `getCharacterCount()` 获得文档的字符数（包含空格）。
`long` | `getCharacterCountNoSpe()` 获得文档的字符数（不包含空格）。
`int` | `getLineCount()` 获得文档的行数。
`int` | `getPageCount()` 获得文档的页数。
`int` | `getParagraphCount()` 获得文档的段落数。
`int` | `getWordCount()` 获得文档的单词数。
`void` | `setState(boolean isState)` 设置字符统计对话框是否包含显示脚注和尾注的字符统计数据。

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

Constructor Detail

### WordCount

    public WordCount(boolean isCountHN)

  创建当前文档的字符统计信息对象。

Method Detail

### getCharacterCount

    public long getCharacterCount()

  获得文档的字符数（包含空格）。

  Returns:
    long 文档的字符数

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WordCount wordCount = doc.getWordCount(false);
         System.out.println(wordCount.getCharacterCount());

### getCharacterCountNoSpe

    public long getCharacterCountNoSpe()

  获得文档的字符数（不包含空格）。

  Returns:
    long 文档的字符数

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WordCount wordCount = doc.getWordCount(false);
         System.out.println(wordCount.getCharacterCountNoSpe());

### getLineCount

    public int getLineCount()

  获得文档的行数。

  Returns:
    int 文档的行数

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WordCount wordCount = doc.getWordCount(false);
         System.out.println(wordCount.getLineCount());

### getPageCount

    public int getPageCount()

  获得文档的页数。

  Returns:
    int 文档的页数

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WordCount wordCount = doc.getWordCount(false);
         System.out.println(wordCount.getPageCount());

### getParagraphCount

    public int getParagraphCount()

  获得文档的段落数。

  Returns:
    int 文档的段落数

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WordCount wordCount = doc.getWordCount(false);
         System.out.println(wordCount.getParagraphCount());

### getWordCount

    public int getWordCount()

  获得文档的单词数。

  Returns:
    int 文档的单词数

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WordCount wordCount = doc.getWordCount(false);
         System.out.println(wordCount.getWordCount());

### setState

    public void setState(boolean isState)

  设置字符统计对话框是否包含显示脚注和尾注的字符统计数据。

  Parameters:
    `isState` - true表示字符统计对话框的包含脚注和尾注复选框被选中，false表示字符统计对话框的包含脚注和尾注复选框不被选中

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WordCount wordCount = doc.getWordCount(false);
         wordCount.setState(true);

Overview | Package | Class | Tree | Index | Help

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

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