|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.acesoft.aceoffix.wordwriter.DataRegion
public class DataRegion
DataRegion class represents a DataRegion.
Representing a DataRegion, DataRegion class is used to fill data into DataRegion and control behavior of DataRegion. You can only call the WordDocument.openDataRegion method or the WordDocument.createDataRegion method to get the DataRegion object.
What is the DataRegion? In Word document, developer can define any range of selection as a DataRegion object by inserting a bookmark with the prefix name "ACE_". In other words, the DataRegion is a bookmark object whose name begins with "ACE_" in Word document. DataRegion is an important object of Aceoffix. And in many cases, you need to call it to perform your operations in Word document.
The bookmark name of a DataRegion is "ACE_" + DataRegionName. For example, if you want to define a specified range as a DataRegion whose DataRegionName is "ProductName" in a Word document, you should manually insert a bookmark whose name is "ACE_ProductName" for the range before you OpenDocument this document. Write code doc.openDataRegion("ProductName").setValue("Aceoffix"); you can generate what you want in this DataRegion.
Method Summary | |
---|---|
Table |
createTable(int numRows,
int numColumns,
WdAutoFitBehavior autoFitBehavior)
Creates a new Table in the current DataRegion. |
boolean |
getEditing()
Gets a value that indicates whether the DataRegion is editable. |
Font |
getFont()
Gets the font object. |
java.lang.String |
getName()
Gets the name of the DataRegion. |
ParagraphFormat |
getParagraphFormat()
Gets the ParagraphFormat object. |
Shading |
getShading()
Gets the Shading object. |
boolean |
getSubmitAsFile()
Gets a value that indicates whether the DataRegion is submitted as a Word file when saving. |
Table |
openTable(int index)
Opens the specified table. |
void |
selectEnd()
Moves the cursor to the end of the current DataRegion. |
void |
selectStart()
Moves the cursor to the start of the current DataRegion. |
void |
setEditing(boolean value)
Sets a value that indicates whether the DataRegion is editable. |
void |
setSubmitAsFile(boolean value)
Sets a value that indicates whether the DataRegion is submitted as a Word file when saving. |
void |
setValue(java.lang.String value)
Sets the value of the DataRegion. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.String getName() throws java.io.IOException
java.io.IOException
public boolean getEditing()
public void setEditing(boolean value)
After opening the Word document in Aceoffix.OpenModeType.docSubmitForm mode, only the DataRegions with Editing=true are editable. Besides those editable DataRegions, the document is read-only.
This function is used to control the editable regions in Word document or to make Word document as an input Form for users.
WordDocument.openDataRegion() to learn how to make the DataRegion editable.
public boolean getSubmitAsFile()
public void setSubmitAsFile(boolean value)
After opening Word document in Aceoffix.OpenModeType.docSubmitForm mode, if SubmitAsFile=true, the Word fragment contained in the current DataRegion can be got when saving. This fragment is a binary stream file in Word format and can be saved as a separate word file.
public void setValue(java.lang.String value) throws java.lang.Exception, java.io.IOException
java.lang.Exception
java.io.IOException
WordDocument.openDataRegion() to learn how to set the value of the DataRegion.
public Font getFont()
public ParagraphFormat getParagraphFormat()
public Shading getShading()
public Table openTable(int index) throws java.lang.Exception
index
- The index of the Table. It is the same as the Table index defined in Microsoft Word. Both of them start from "1".
java.lang.Exception
public Table createTable(int numRows, int numColumns, WdAutoFitBehavior autoFitBehavior) throws java.lang.Exception
numRows
- The row number of the new table.numColumns
- The column number of the new table.autoFitBehavior
- It is used to automatically resize the table in Microsoft Word.
java.lang.Exception
public void selectStart()
public void selectEnd()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |