Package com.independentsoft.office.odf.styles

# Class BackgroundImage

java.lang.Object
com.independentsoft.office.odf.styles.BackgroundImage

All Implemented Interfaces:
  `IContentElement`

public class BackgroundImage extends Object implements IContentElement
Specifies an image as a background.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BackgroundImage()`
  Instantiates a new background image.
  `BackgroundImage​(InternalXMLStreamReader reader)`
  Instantiates a new background image.
  `BackgroundImage​(String filePath)`
  Instantiates a new background image.
  `BackgroundImage​(String fileName, byte[] buffer)`
  Instantiates a new background image.
  `BackgroundImage​(String fileName, InputStream inputStream)`
  Instantiates a new background image.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BackgroundImage`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `String`
  `getActuate()`
  Default value for this attribute is onLoad.
  `byte[]`
  `getBuffer()`
  Gets the byte array.
  `List<IContentElement>`
  `getContentElements()`
  Returns all content elements.
  `String`
  `getFileName()`
  Gets the file name.
  `String`
  `getFilter()`
  Gets the implementation specific filter name that has been used to load an image into the document.
  `InputStream`
  `getInputStream()`
  Gets the input stream.
  `String`
  `getLocation()`
  Gets the image.
  `int`
  `getOpacity()`
  Gets the opacity for an image or graphic object.
  `IContentElement`
  `getParent()`
  Returns the parent content element.
  `String`
  `getPosition()`
  Gets the position of the background image.
  `Repetition`
  `getRepetition()`
  Specifies if an image can be repeated or stretched over an area.
  `String`
  `getShow()`
  Default value for this attribute is embed.
  `String`
  `getType()`
  Always has the value simple.
  `void`
  `load​(String filePath)`
  Load.
  `void`
  `load​(String fileName, byte[] buffer)`
  Load.
  `void`
  `load​(String fileName, InputStream inputStream)`
  Load.
  `void`
  `save​(OutputStream outputStream)`
  Save.
  `void`
  `save​(String filePath)`
  Save.
  `void`
  `save​(String filePath, boolean overwrite)`
  Save.
  `void`
  `setActuate​(String actuate)`
  Default value for this attribute is onLoad.
  `void`
  `setBuffer​(byte[] buffer)`
  Sets the byte array.
  `void`
  `setFileName​(String fileName)`
  Sets the file name.
  `void`
  `setFilter​(String filter)`
  Sets the implementation specific filter name that has been used to load an image into the document.
  `void`
  `setLocation​(String location)`
  Sets the image.
  `void`
  `setOpacity​(int opacity)`
  Sets the opacity for an image or graphic object.
  `void`
  `setParent​(IContentElement parent)`
  Sets the parent content element.
  `void`
  `setPosition​(String position)`
  Sets the position of the background image.
  `void`
  `setRepetition​(Repetition repetition)`
  Specifies if an image can be repeated or stretched over an area.
  `void`
  `setShow​(String show)`
  Default value for this attribute is embed.
  `void`
  `setType​(String type)`
  Always has the value simple.
  `String`
  `toString()`
  Converts the value of the current BackgroundImage object to its equivalent string representation.

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

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

- ## Constructor Details

  - ### BackgroundImage

    public BackgroundImage()
    Instantiates a new background image.

  - ### BackgroundImage

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

  - ### BackgroundImage

    public BackgroundImage​(String filePath) throws IOException
    Instantiates a new background image.
    Parameters:
      `filePath` - the file path
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### BackgroundImage

    public BackgroundImage​(String fileName, InputStream inputStream) throws IOException
    Instantiates a new background image.
    Parameters:
      `fileName` - the file name
      `inputStream` - the input stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### BackgroundImage

    public BackgroundImage​(String fileName, byte[] buffer)
    Instantiates a new background image.
    Parameters:
      `fileName` - the file name
      `buffer` - the buffer

- ## Method Details

  - ### load

    public void load​(String filePath) throws IOException
    Load.
    Parameters:
      `filePath` - the file path
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### load

    public void load​(String fileName, InputStream inputStream) throws IOException
    Load.
    Parameters:
      `fileName` - the file name
      `inputStream` - the input stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### load

    public void load​(String fileName, byte[] buffer)
    Load.
    Parameters:
      `fileName` - the file name
      `buffer` - the buffer

  - ### save

    public void save​(String filePath) throws IOException
    Save.
    Parameters:
      `filePath` - the file path
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### save

    public void save​(String filePath, boolean overwrite) throws IOException
    Save.
    Parameters:
      `filePath` - the file path
      `overwrite` - the overwrite
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### save

    public void save​(OutputStream outputStream) throws IOException
    Save.
    Parameters:
      `outputStream` - the output stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### getInputStream

    public InputStream getInputStream()
    Gets the input stream.
    Returns:
      the input stream

  - ### getContentElements

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

  - ### getParent

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

  - ### setParent

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

  - ### clone

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

  - ### toString

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

  - ### getLocation

    public String getLocation()
    Gets the image.
    Returns:
      the location

  - ### setLocation

    public void setLocation​(String location)
    Sets the image.
    Parameters:
      `location` - the new location

  - ### getType

    public String getType()
    Always has the value simple.
    Returns:
      the type

  - ### setType

    public void setType​(String type)
    Always has the value simple.
    Parameters:
      `type` - the new type

  - ### getShow

    public String getShow()
    Default value for this attribute is embed.
    Returns:
      the show

  - ### setShow

    public void setShow​(String show)
    Default value for this attribute is embed.
    Parameters:
      `show` - the new show

  - ### getActuate

    public String getActuate()
    Default value for this attribute is onLoad.
    Returns:
      the actuate

  - ### setActuate

    public void setActuate​(String actuate)
    Default value for this attribute is onLoad.
    Parameters:
      `actuate` - the new actuate

  - ### getRepetition

    public Repetition getRepetition()
    Specifies if an image can be repeated or stretched over an area.
    Returns:
      the repetition

  - ### setRepetition

    public void setRepetition​(Repetition repetition)
    Specifies if an image can be repeated or stretched over an area.
    Parameters:
      `repetition` - the new repetition

  - ### getPosition

    public String getPosition()
    Gets the position of the background image.
    Returns:
      the position

  - ### setPosition

    public void setPosition​(String position)
    Sets the position of the background image.
    Parameters:
      `position` - the new position

  - ### getFilter

    public String getFilter()
    Gets the implementation specific filter name that has been used to load an image into the document.
    Returns:
      the filter

  - ### setFilter

    public void setFilter​(String filter)
    Sets the implementation specific filter name that has been used to load an image into the document.
    Parameters:
      `filter` - the new filter

  - ### getOpacity

    public int getOpacity()
    Gets the opacity for an image or graphic object.
    Returns:
      the opacity

  - ### setOpacity

    public void setOpacity​(int opacity)
    Sets the opacity for an image or graphic object.
    Parameters:
      `opacity` - the new opacity

  - ### getFileName

    public String getFileName()
    Gets the file name.
    Returns:
      the file name

  - ### setFileName

    public void setFileName​(String fileName)
    Sets the file name.
    Parameters:
      `fileName` - the new file name

  - ### getBuffer

    public byte[] getBuffer()
    Gets the byte array.
    Returns:
      the buffer

  - ### setBuffer

    public void setBuffer​(byte[] buffer)
    Sets the byte array.
    Parameters:
      `buffer` - the new buffer