Java Doc for Range.java in  » Collaboration » poi-3.0.2-beta2 » org » apache » poi » hwpf » usermodel » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Collaboration » poi 3.0.2 beta2 » org.apache.poi.hwpf.usermodel 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.poi.hwpf.usermodel.Range

All known Subclasses:   org.apache.poi.hwpf.usermodel.TableCell,  org.apache.poi.hwpf.usermodel.Section,  org.apache.poi.hwpf.usermodel.DocumentPosition,  org.apache.poi.hwpf.usermodel.Paragraph,  org.apache.poi.hwpf.usermodel.CharacterRun,  org.apache.poi.hwpf.usermodel.Table,
Range
public class Range (Code)
This class is the central class of the HWPF object model. All properties that apply to a range of characters in a Word document extend this class. It is possible to insert text and/or properties at the beginning or end of a range. Ranges are only valid if there hasn't been an insert in a prior Range since the Range's creation. Once an element (text, paragraph, etc.) has been inserted into a Range, subsequent Ranges become unstable.
author:
   Ryan Ackley


Field Summary
final public static  intTYPE_CHARACTER
    
final public static  intTYPE_LISTENTRY
    
final public static  intTYPE_PARAGRAPH
    
final public static  intTYPE_SECTION
    
final public static  intTYPE_TABLE
    
final public static  intTYPE_TEXT
    
final public static  intTYPE_UNDEFINED
    
protected  int_charEnd
     The end index in the characterRuns list for this Range.
protected  boolean_charRangeFound
     Have we loaded the characterRun indexes yet.
protected  int_charStart
    
protected  List_characters
     All CharacterRuns that belong to the document this Range belongs to.
protected  HWPFDocument_doc
     The document this range blongs to.
protected  int_end
     The ending character offset of this range.
protected  int_parEnd
     The end index in the paragraphs list for this Range.
protected  boolean_parRangeFound
     Have we loaded the paragraph indexes yet.
protected  int_parStart
    
protected  List_paragraphs
     All paragraphs that belong to the document this Range belongs to.
protected  int_sectionEnd
     The end index in the sections list for this Range.
 boolean_sectionRangeFound
    
protected  int_sectionStart
    
protected  List_sections
     All sections that belong to the document this Range belongs to.
protected  int_start
     The starting character offset of this range.
protected  List_text
     All text pieces that belong to the document this Range belongs to.
protected  int_textEnd
     The end index in the text list for this Range.
protected  boolean_textRangeFound
    
protected  int_textStart
     The start index in the text list for this Range.

Constructor Summary
public  Range(int start, int end, HWPFDocument doc)
     Used to construct a Range from a document.
protected  Range(int start, int end, Range parent)
     Used to create Ranges that are children of other Ranges.
protected  Range(int startIdx, int endIdx, int idxType, Range parent)
     Constructor used to build a Range from indexes in one of its internal lists.

Method Summary
public  voiddelete()
    
public  CharacterRungetCharacterRun(int index)
     Gets the character run at index.
public  ParagraphgetParagraph(int index)
     Gets the paragraph at index.
public  SectiongetSection(int index)
     Gets the section at index.
public  TablegetTable(Paragraph paragraph)
     Gets the table that starts with paragraph.
protected  voidinitAll()
     loads all of the list indexes.
public  CharacterRuninsertAfter(String text)
    
public  CharacterRuninsertAfter(String text, CharacterProperties props)
     Inserts text onto the end of this range and gives that text the CharacterProperties specified in props.
Parameters:
  text - The text to insert.
Parameters:
  props - The CharacterProperties to give the text.
public  ParagraphinsertAfter(ParagraphProperties props, int styleIndex)
     Inserts and empty paragraph into the end of this range.
Parameters:
  props - The properties that the new paragraph will have.
Parameters:
  styleIndex - The index into the stylesheet for the new paragraph.
protected  ParagraphinsertAfter(ParagraphProperties props, int styleIndex, String text)
     Inserts a paragraph into the end of this range.
public  ListEntryinsertAfter(ParagraphProperties props, int listID, int level, int styleIndex)
     Inserts a list into the beginning of this range.
Parameters:
  props - The properties of the list entry.
public  CharacterRuninsertBefore(String text)
     Inserts text into the front of this range.
public  CharacterRuninsertBefore(String text, CharacterProperties props)
     Inserts text into the front of this range and it gives that text the CharacterProperties specified in props.
Parameters:
  text - The text to insert.
Parameters:
  props - The CharacterProperties to give the text.
public  ParagraphinsertBefore(ParagraphProperties props, int styleIndex)
     Inserts and empty paragraph into the front of this range.
Parameters:
  props - The properties that the new paragraph will have.
Parameters:
  styleIndex - The index into the stylesheet for the new paragraph.
protected  ParagraphinsertBefore(ParagraphProperties props, int styleIndex, String text)
     Inserts a paragraph into the front of this range.
public  TableinsertBefore(TableProperties props, int rows)
     Inserts a simple table into the beginning of this range.
public  ListEntryinsertBefore(ParagraphProperties props, int listID, int level, int styleIndex)
     Inserts a list into the beginning of this range.
Parameters:
  props - The properties of the list entry.
public  intnumCharacterRuns()
    
public  intnumParagraphs()
     Used to get the number of paragraphs in a range.
public  intnumSections()
     Used to get the number of sections in a range.
public  Stringtext()
     Gets the text that this Range contains.
public  inttype()
     This method is used to determine the type.

Field Detail
TYPE_CHARACTER
final public static int TYPE_CHARACTER(Code)



TYPE_LISTENTRY
final public static int TYPE_LISTENTRY(Code)



TYPE_PARAGRAPH
final public static int TYPE_PARAGRAPH(Code)



TYPE_SECTION
final public static int TYPE_SECTION(Code)



TYPE_TABLE
final public static int TYPE_TABLE(Code)



TYPE_TEXT
final public static int TYPE_TEXT(Code)



TYPE_UNDEFINED
final public static int TYPE_UNDEFINED(Code)



_charEnd
protected int _charEnd(Code)
The end index in the characterRuns list for this Range.



_charRangeFound
protected boolean _charRangeFound(Code)
Have we loaded the characterRun indexes yet.



_charStart
protected int _charStart(Code)
The start index in the characterRuns list for this Range



_characters
protected List _characters(Code)
All CharacterRuns that belong to the document this Range belongs to.



_doc
protected HWPFDocument _doc(Code)
The document this range blongs to.



_end
protected int _end(Code)
The ending character offset of this range.



_parEnd
protected int _parEnd(Code)
The end index in the paragraphs list for this Range.



_parRangeFound
protected boolean _parRangeFound(Code)
Have we loaded the paragraph indexes yet.



_parStart
protected int _parStart(Code)
The start index in the paragraphs list for this Range



_paragraphs
protected List _paragraphs(Code)
All paragraphs that belong to the document this Range belongs to.



_sectionEnd
protected int _sectionEnd(Code)
The end index in the sections list for this Range.



_sectionRangeFound
boolean _sectionRangeFound(Code)
Have we loaded the section indexes yet



_sectionStart
protected int _sectionStart(Code)
The start index in the sections list for this Range



_sections
protected List _sections(Code)
All sections that belong to the document this Range belongs to.



_start
protected int _start(Code)
The starting character offset of this range.



_text
protected List _text(Code)
All text pieces that belong to the document this Range belongs to.



_textEnd
protected int _textEnd(Code)
The end index in the text list for this Range.



_textRangeFound
protected boolean _textRangeFound(Code)
Have we loaded the Text indexes yet



_textStart
protected int _textStart(Code)
The start index in the text list for this Range.




Constructor Detail
Range
public Range(int start, int end, HWPFDocument doc)(Code)
Used to construct a Range from a document. This is generally used to create a Range that spans the whole document.
Parameters:
  start - Starting character offset of the range.
Parameters:
  end - Ending character offset of the range.
Parameters:
  doc - The HWPFDocument the range is based on.



Range
protected Range(int start, int end, Range parent)(Code)
Used to create Ranges that are children of other Ranges.
Parameters:
  start - Starting character offset of the range.
Parameters:
  end - Ending character offset of the range.
Parameters:
  parent - The parent this range belongs to.



Range
protected Range(int startIdx, int endIdx, int idxType, Range parent)(Code)
Constructor used to build a Range from indexes in one of its internal lists.
Parameters:
  startIdx - The starting index in the list.
Parameters:
  endIdx - The ending index in the list.
Parameters:
  idxType - The list type.
Parameters:
  parent - The parent Range this range belongs to.




Method Detail
delete
public void delete()(Code)



getCharacterRun
public CharacterRun getCharacterRun(int index)(Code)
Gets the character run at index. The index is relative to this range.
Parameters:
  index - The index of the character run to get. The character run at the specified index in this range.



getParagraph
public Paragraph getParagraph(int index)(Code)
Gets the paragraph at index. The index is relative to this range.
Parameters:
  index - The index of the paragraph to get. The paragraph at the specified index in this range.



getSection
public Section getSection(int index)(Code)
Gets the section at index. The index is relative to this range.
Parameters:
  index - The index of the section to get. The section at the specified index in this range.



getTable
public Table getTable(Paragraph paragraph)(Code)
Gets the table that starts with paragraph. In a Word file, a table consists of a group of paragraphs with certain flags set.
Parameters:
  paragraph - The paragraph that is the first paragraph in the table. The table that starts with paragraph



initAll
protected void initAll()(Code)
loads all of the list indexes.



insertAfter
public CharacterRun insertAfter(String text)(Code)
Inserts text onto the end of this range
Parameters:
  text - The text to insert The character run the text was inserted into.



insertAfter
public CharacterRun insertAfter(String text, CharacterProperties props)(Code)
Inserts text onto the end of this range and gives that text the CharacterProperties specified in props.
Parameters:
  text - The text to insert.
Parameters:
  props - The CharacterProperties to give the text. A new CharacterRun that has the given text and properties and is now a part of the document.



insertAfter
public Paragraph insertAfter(ParagraphProperties props, int styleIndex)(Code)
Inserts and empty paragraph into the end of this range.
Parameters:
  props - The properties that the new paragraph will have.
Parameters:
  styleIndex - The index into the stylesheet for the new paragraph. The newly inserted paragraph.



insertAfter
protected Paragraph insertAfter(ParagraphProperties props, int styleIndex, String text)(Code)
Inserts a paragraph into the end of this range. The paragraph will contain one character run that has the default properties for the paragraph's style. It is necessary for the text to end with the character '\r'
Parameters:
  props - The paragraph's properties.
Parameters:
  styleIndex - The index of the paragraph's style in the style sheet.
Parameters:
  text - The text to insert. A newly inserted paragraph.



insertAfter
public ListEntry insertAfter(ParagraphProperties props, int listID, int level, int styleIndex)(Code)
Inserts a list into the beginning of this range.
Parameters:
  props - The properties of the list entry. All list entries areparagraphs.
Parameters:
  listID - The id of the list that contains the properties.
Parameters:
  level - The indentation level of the list.
Parameters:
  styleIndex - The base style's index in the stylesheet. The empty ListEntry that is now part of the document.



insertBefore
public CharacterRun insertBefore(String text)(Code)
Inserts text into the front of this range.
Parameters:
  text - The text to insert The character run that text was inserted into.



insertBefore
public CharacterRun insertBefore(String text, CharacterProperties props)(Code)
Inserts text into the front of this range and it gives that text the CharacterProperties specified in props.
Parameters:
  text - The text to insert.
Parameters:
  props - The CharacterProperties to give the text. A new CharacterRun that has the given text and properties and is now a part of the document.



insertBefore
public Paragraph insertBefore(ParagraphProperties props, int styleIndex)(Code)
Inserts and empty paragraph into the front of this range.
Parameters:
  props - The properties that the new paragraph will have.
Parameters:
  styleIndex - The index into the stylesheet for the new paragraph. The newly inserted paragraph.



insertBefore
protected Paragraph insertBefore(ParagraphProperties props, int styleIndex, String text)(Code)
Inserts a paragraph into the front of this range. The paragraph will contain one character run that has the default properties for the paragraph's style. It is necessary for the text to end with the character '\r'
Parameters:
  props - The paragraph's properties.
Parameters:
  styleIndex - The index of the paragraph's style in the style sheet.
Parameters:
  text - The text to insert. A newly inserted paragraph.



insertBefore
public Table insertBefore(TableProperties props, int rows)(Code)
Inserts a simple table into the beginning of this range. The number of columns is determined by the TableProperties passed into this function.
Parameters:
  props - The table properties for the table.
Parameters:
  rows - The number of rows. The empty Table that is now part of the document.



insertBefore
public ListEntry insertBefore(ParagraphProperties props, int listID, int level, int styleIndex)(Code)
Inserts a list into the beginning of this range.
Parameters:
  props - The properties of the list entry. All list entries areparagraphs.
Parameters:
  listID - The id of the list that contains the properties.
Parameters:
  level - The indentation level of the list.
Parameters:
  styleIndex - The base style's index in the stylesheet. The empty ListEntry that is now part of the document.



numCharacterRuns
public int numCharacterRuns()(Code)
The number of characterRuns in this range.



numParagraphs
public int numParagraphs()(Code)
Used to get the number of paragraphs in a range. If this range is smaller than a paragraph, it will return 1 for its containing paragraph. The number of paragraphs in this range.



numSections
public int numSections()(Code)
Used to get the number of sections in a range. If this range is smaller than a section, it will return 1 for its containing section. The number of sections in this range.



text
public String text()(Code)
Gets the text that this Range contains. The text for this range.



type
public int type()(Code)
This method is used to determine the type. Handy for switch statements compared to the instanceof operator. A TYPE constant.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.