public interface IStructuredDocumentTag
| Property Getters/Setters Summary | ||
|---|---|---|
abstract int | getAppearance() | |
abstract void | setAppearance(int value) | |
| Gets or sets the appearance of the structured document tag. The value of the property is SdtAppearance integer constant. | ||
abstract java.awt.Color | getColor() | |
abstract void | setColor(java.awt.Color value) | |
| Gets or sets the color of the structured document tag. | ||
abstract int | getId() | |
| Specifies a unique read-only persistent numerical Id for this SDT. |
||
abstract boolean | isMultiSection() | |
| Returns true if this instance is a ranged (multi-section) structured document tag. | ||
abstract boolean | isShowingPlaceholderText() | |
abstract void | isShowingPlaceholderText(boolean value) | |
| Specifies whether the content of this SDT shall be interpreted to contain placeholder text (as opposed to regular text contents within the SDT). if set to true, this state shall be resumed (showing placeholder text) upon opening this document. |
||
abstract int | getLevel() | |
| Gets the level at which this SDT occurs in the document tree. The value of the property is MarkupLevel integer constant. | ||
abstract boolean | getLockContentControl() | |
abstract void | setLockContentControl(boolean value) | |
| When set to true, this property will prohibit a user from deleting this SDT. | ||
abstract boolean | getLockContents() | |
abstract void | setLockContents(boolean value) | |
| When set to true, this property will prohibit a user from editing the contents of this SDT. | ||
abstract Node | getNode() | |
| Returns Node object that implements this interface. | ||
abstract BuildingBlock | getPlaceholder() | |
|
Gets the |
||
abstract java.lang.String | getPlaceholderName() | |
abstract void | setPlaceholderName(java.lang.String value) | |
| Gets or sets Name of the |
||
abstract int | getSdtType() | |
| Gets type of this Structured document tag. The value of the property is SdtType integer constant. | ||
abstract java.lang.String | getTag() | |
abstract void | setTag(java.lang.String value) | |
| Specifies a tag associated with the current SDT node. Can not be null. | ||
abstract java.lang.String | getTitle() | |
abstract void | setTitle(java.lang.String value) | |
| Specifies the friendly name associated with this SDT. Can not be null. | ||
abstract java.lang.String | getWordOpenXML() | |
|
Gets a string that represents the XML contained within the node in the |
||
abstract XmlMapping | getXmlMapping() | |
| Gets an object that represents the mapping of this structured document tag to XML data in a custom XML part of the current document. | ||
| Method Summary | ||
|---|---|---|
abstract NodeCollection | getChildNodes(int nodeType, boolean isDeep) | |
| Returns a live collection of child nodes that match the specified types. | ||
abstract boolean | isRanged() | |
| |
||
abstract void | removeSelfOnly() | |
| Removes just this SDT node itself, but keeps the content of it inside the document tree. | ||
abstract Node | structuredDocumentTagNode() | |
| |
||
| Property Getters/Setters Detail |
|---|
getAppearance/setAppearance | |
public abstract int getAppearance() / public abstract void setAppearance(int value) | |
getColor/setColor | |
public abstract java.awt.Color getColor() / public abstract void setColor(java.awt.Color value) | |
getId | |
public abstract int getId() | |
Specifies a unique read-only persistent numerical Id for this SDT.
isMultiSection | |
public abstract boolean isMultiSection() | |
Example:
Shows how to get structured document tag.
Document doc = new Document(getMyDir() + "Structured document tags by id.docx");
// Get the structured document tag by Id.
IStructuredDocumentTag sdt = doc.getRange().getStructuredDocumentTags().getById(1160505028);
System.out.println(sdt.isMultiSection());
System.out.println(sdt.getTitle());
// Get the structured document tag or ranged tag by Title.
sdt = doc.getRange().getStructuredDocumentTags().getByTitle("Alias4");
System.out.println(sdt.getId());isShowingPlaceholderText/isShowingPlaceholderText | |
public abstract boolean isShowingPlaceholderText() / public abstract void isShowingPlaceholderText(boolean value) | |
Specifies whether the content of this SDT shall be interpreted to contain placeholder text (as opposed to regular text contents within the SDT).
if set to true, this state shall be resumed (showing placeholder text) upon opening this document.
getLevel | |
public abstract int getLevel() | |
getLockContentControl/setLockContentControl | |
public abstract boolean getLockContentControl() / public abstract void setLockContentControl(boolean value) | |
getLockContents/setLockContents | |
public abstract boolean getLockContents() / public abstract void setLockContents(boolean value) | |
getNode | |
public abstract Node getNode() | |
getPlaceholder | |
public abstract BuildingBlock getPlaceholder() | |
getPlaceholderName/setPlaceholderName | |
public abstract java.lang.String getPlaceholderName() / public abstract void setPlaceholderName(java.lang.String value) | |
Gets or sets Name of the
getSdtType | |
public abstract int getSdtType() | |
getTag/setTag | |
public abstract java.lang.String getTag() / public abstract void setTag(java.lang.String value) | |
getTitle/setTitle | |
public abstract java.lang.String getTitle() / public abstract void setTitle(java.lang.String value) | |
Example:
Shows how to get structured document tag.
Document doc = new Document(getMyDir() + "Structured document tags by id.docx");
// Get the structured document tag by Id.
IStructuredDocumentTag sdt = doc.getRange().getStructuredDocumentTags().getById(1160505028);
System.out.println(sdt.isMultiSection());
System.out.println(sdt.getTitle());
// Get the structured document tag or ranged tag by Title.
sdt = doc.getRange().getStructuredDocumentTags().getByTitle("Alias4");
System.out.println(sdt.getId());getWordOpenXML | |
public abstract java.lang.String getWordOpenXML() | |
getXmlMapping | |
public abstract XmlMapping getXmlMapping() | |
| Method Detail |
|---|
getChildNodes | |
public abstract NodeCollection getChildNodes(int nodeType, boolean isDeep) | |
nodeType - A NodeType value.Example:
Shows how to remove structured document tag, but keeps content inside.
Document doc = new Document(getMyDir() + "Structured document tags.docx");
// This collection provides a unified interface for accessing ranged and non-ranged structured tags.
StructuredDocumentTagCollection sdts = doc.getRange().getStructuredDocumentTags();
Assert.assertEquals(5, sdts.getCount());
// Here we can get child nodes from the common interface of ranged and non-ranged structured tags.
for (IStructuredDocumentTag sdt : sdts)
if (sdt.getChildNodes(NodeType.ANY, false).getCount() > 0)
sdt.removeSelfOnly();
sdts = doc.getRange().getStructuredDocumentTags();
Assert.assertEquals(0, sdts.getCount());isRanged | |
@Deprecated public abstract boolean isRanged() | |
removeSelfOnly | |
public abstract void removeSelfOnly()
throws java.lang.Exception | |
Example:
Shows how to remove structured document tag, but keeps content inside.
Document doc = new Document(getMyDir() + "Structured document tags.docx");
// This collection provides a unified interface for accessing ranged and non-ranged structured tags.
StructuredDocumentTagCollection sdts = doc.getRange().getStructuredDocumentTags();
Assert.assertEquals(5, sdts.getCount());
// Here we can get child nodes from the common interface of ranged and non-ranged structured tags.
for (IStructuredDocumentTag sdt : sdts)
if (sdt.getChildNodes(NodeType.ANY, false).getCount() > 0)
sdt.removeSelfOnly();
sdts = doc.getRange().getStructuredDocumentTags();
Assert.assertEquals(0, sdts.getCount());structuredDocumentTagNode | |
@Deprecated public abstract Node structuredDocumentTagNode() | |