Class BackgroundImage
java.lang.Object
com.independentsoft.office.odf.styles.BackgroundImage
- All Implemented Interfaces:
IContentElement
Specifies an image as a background.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates 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 TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Default value for this attribute is onLoad.byte[]Gets the byte array.Returns all content elements.Gets the file name.Gets the implementation specific filter name that has been used to load an image into the document.Gets the input stream.Gets the image.intGets the opacity for an image or graphic object.Returns the parent content element.Gets the position of the background image.Specifies if an image can be repeated or stretched over an area.getShow()Default value for this attribute is embed.getType()Always has the value simple.voidLoad.voidLoad.voidload(String fileName, InputStream inputStream)Load.voidsave(OutputStream outputStream)Save.voidSave.voidSave.voidsetActuate(String actuate)Default value for this attribute is onLoad.voidsetBuffer(byte[] buffer)Sets the byte array.voidsetFileName(String fileName)Sets the file name.voidSets the implementation specific filter name that has been used to load an image into the document.voidsetLocation(String location)Sets the image.voidsetOpacity(int opacity)Sets the opacity for an image or graphic object.voidsetParent(IContentElement parent)Sets the parent content element.voidsetPosition(String position)Sets the position of the background image.voidsetRepetition(Repetition repetition)Specifies if an image can be repeated or stretched over an area.voidDefault value for this attribute is embed.voidAlways has the value simple.toString()Converts the value of the current BackgroundImage object to its equivalent string representation.
-
Constructor Details
-
BackgroundImage
public BackgroundImage()Instantiates a new background image. -
BackgroundImage
Instantiates a new background image.- Parameters:
reader- the reader- Throws:
XMLStreamException- the xML stream exception
-
BackgroundImage
Instantiates a new background image.- Parameters:
filePath- the file path- Throws:
IOException- Signals that an I/O exception has occurred.
-
BackgroundImage
Instantiates a new background image.- Parameters:
fileName- the file nameinputStream- the input stream- Throws:
IOException- Signals that an I/O exception has occurred.
-
BackgroundImage
Instantiates a new background image.- Parameters:
fileName- the file namebuffer- the buffer
-
-
Method Details
-
load
Load.- Parameters:
filePath- the file path- Throws:
IOException- Signals that an I/O exception has occurred.
-
load
Load.- Parameters:
fileName- the file nameinputStream- the input stream- Throws:
IOException- Signals that an I/O exception has occurred.
-
load
Load.- Parameters:
fileName- the file namebuffer- the buffer
-
save
Save.- Parameters:
filePath- the file path- Throws:
IOException- Signals that an I/O exception has occurred.
-
save
Save.- Parameters:
filePath- the file pathoverwrite- the overwrite- Throws:
IOException- Signals that an I/O exception has occurred.
-
save
Save.- Parameters:
outputStream- the output stream- Throws:
IOException- Signals that an I/O exception has occurred.
-
getInputStream
Gets the input stream.- Returns:
- the input stream
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceIContentElement- Overrides:
clonein classObject- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current BackgroundImage object to its equivalent string representation. -
getLocation
Gets the image.- Returns:
- the location
-
setLocation
Sets the image.- Parameters:
location- the new location
-
getType
Always has the value simple.- Returns:
- the type
-
setType
Always has the value simple.- Parameters:
type- the new type
-
getShow
Default value for this attribute is embed.- Returns:
- the show
-
setShow
Default value for this attribute is embed.- Parameters:
show- the new show
-
getActuate
Default value for this attribute is onLoad.- Returns:
- the actuate
-
setActuate
Default value for this attribute is onLoad.- Parameters:
actuate- the new actuate
-
getRepetition
Specifies if an image can be repeated or stretched over an area.- Returns:
- the repetition
-
setRepetition
Specifies if an image can be repeated or stretched over an area.- Parameters:
repetition- the new repetition
-
getPosition
Gets the position of the background image.- Returns:
- the position
-
setPosition
Sets the position of the background image.- Parameters:
position- the new position
-
getFilter
Gets the implementation specific filter name that has been used to load an image into the document.- Returns:
- the filter
-
setFilter
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
Gets the file name.- Returns:
- the file name
-
setFileName
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
-