Class Placeholder
java.lang.Object
com.independentsoft.office.odf.fields.Field
com.independentsoft.office.odf.fields.Placeholder
- All Implemented Interfaces:
IContentElement,IParagraphContent
Represents a placeholder field to indicate locations in a document where the user may insert content of a certain type.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the Placeholder class.Placeholder(InternalXMLStreamReader reader)Instantiates a new placeholder. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Returns all content elements.Gets the message that is displayed when users are prompted for input.Returns the parent content element.getType()Gets the content type of a placeholder.getValue()Gets the placeholder.voidsetDescription(String description)Sets the message that is displayed when users are prompted for input.voidsetParent(IContentElement parent)Sets the parent content element.voidsetType(PlaceholderType type)Sets the content type of a placeholder.voidSets the placeholder.toString()Converts the value of the current Placeholder object to its equivalent string representation.
-
Constructor Details
-
Placeholder
public Placeholder()Initializes a new instance of the Placeholder class. -
Placeholder
Instantiates a new placeholder.- Parameters:
reader- the reader- Throws:
XMLStreamException- the xML stream exception
-
-
Method Details
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Specified by:
getContentElementsin classField- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Overrides:
getParentin classField- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Overrides:
setParentin classField- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceIContentElement- Specified by:
clonein interfaceIParagraphContent- Specified by:
clonein classField- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current Placeholder object to its equivalent string representation. -
getDescription
Gets the message that is displayed when users are prompted for input.- Returns:
- the description
-
setDescription
Sets the message that is displayed when users are prompted for input.- Parameters:
description- the new description
-
getType
Gets the content type of a placeholder. This attribute is mandatory.- Returns:
- the type
-
setType
Sets the content type of a placeholder. This attribute is mandatory.- Parameters:
type- the new type
-
getValue
Gets the placeholder.- Returns:
- the value
-
setValue
Sets the placeholder.- Parameters:
value- the new value
-