Package com.independentsoft.office.odf.fields

# Class Placeholder

java.lang.Object
com.independentsoft.office.odf.fields.Field
com.independentsoft.office.odf.fields.Placeholder

All Implemented Interfaces:
  `IContentElement`, `IParagraphContent`

public class Placeholder extends Field
Represents a placeholder field to indicate locations in a document where the user may insert content of a certain type.

- ## Field Summary

  ### Fields inherited from class com.independentsoft.office.odf.fields.Field

  `parent`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Placeholder()`
  Initializes a new instance of the Placeholder class.
  `Placeholder​(InternalXMLStreamReader reader)`
  Instantiates a new placeholder.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Placeholder`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `List<IContentElement>`
  `getContentElements()`
  Returns all content elements.
  `String`
  `getDescription()`
  Gets the message that is displayed when users are prompted for input.
  `IContentElement`
  `getParent()`
  Returns the parent content element.
  `PlaceholderType`
  `getType()`
  Gets the content type of a placeholder.
  `String`
  `getValue()`
  Gets the placeholder.
  `void`
  `setDescription​(String description)`
  Sets the message that is displayed when users are prompted for input.
  `void`
  `setParent​(IContentElement parent)`
  Sets the parent content element.
  `void`
  `setType​(PlaceholderType type)`
  Sets the content type of a placeholder.
  `void`
  `setValue​(String value)`
  Sets the placeholder.
  `String`
  `toString()`
  Converts the value of the current Placeholder object to its equivalent string representation.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Placeholder

    public Placeholder()
    Initializes a new instance of the Placeholder class.

  - ### Placeholder

    public Placeholder​(InternalXMLStreamReader reader) throws XMLStreamException
    Instantiates a new placeholder.
    Parameters:
      `reader` - the reader
    Throws:
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### getContentElements

    public List<IContentElement> getContentElements()
    Returns all content elements.
    Specified by:
      `getContentElements` in interface `IContentElement`
    Specified by:
      `getContentElements` in class `Field`
    Returns:
      A collection of content elements.

  - ### getParent

    public IContentElement getParent()
    Returns the parent content element.
    Specified by:
      `getParent` in interface `IContentElement`
    Overrides:
      `getParent` in class `Field`
    Returns:
      the parent

  - ### setParent

    public void setParent​(IContentElement parent)
    Sets the parent content element.
    Specified by:
      `setParent` in interface `IContentElement`
    Overrides:
      `setParent` in class `Field`
    Parameters:
      `parent` - the new parent

  - ### clone

    public Placeholder clone()
    Creates a new object that is a deep copy of the current instance.
    Specified by:
      `clone` in interface `IContentElement`
    Specified by:
      `clone` in interface `IParagraphContent`
    Specified by:
      `clone` in class `Field`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current Placeholder object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getDescription

    public String getDescription()
    Gets the message that is displayed when users are prompted for input.
    Returns:
      the description

  - ### setDescription

    public void setDescription​(String description)
    Sets the message that is displayed when users are prompted for input.
    Parameters:
      `description` - the new description

  - ### getType

    public PlaceholderType getType()
    Gets the content type of a placeholder. This attribute is mandatory.
    Returns:
      the type

  - ### setType

    public void setType​(PlaceholderType type)
    Sets the content type of a placeholder. This attribute is mandatory.
    Parameters:
      `type` - the new type

  - ### getValue

    public String getValue()
    Gets the placeholder.
    Returns:
      the value

  - ### setValue

    public void setValue​(String value)
    Sets the placeholder.
    Parameters:
      `value` - the new value