public class Image extends Component
| Modifier and Type | Method and Description |
|---|---|
static URI |
configureInsertedImage(OdfSchemaDocument mOdfSchemaDoc,
DrawImageElement imageElement,
String packagePath,
boolean isResetSize) |
String |
getDesciption()
Get the description of this image
|
Frame |
getFrame()
Return the frame who contains this image.
|
StyleTypeDefinitions.FrameHorizontalPosition |
getHorizontalPosition()
Return the horizontal position
|
URI |
getHyperlink()
Return the URI of hypertext reference if exists, or else, return null.
|
InputStream |
getImageInputStream()
Get the image resource as an input stream.
|
static Image |
getInstanceof(DrawImageElement imageElement)
Get a image instance by an instance of
DrawImageElement. |
String |
getInternalPath()
Get the internal path within the package of the image resource as a string.
|
String |
getMediaTypeString()
Get the media type of the image resource
|
String |
getName()
Get the name of this image.
|
DrawImageElement |
getOdfElement()
Return the instance of "draw:image" element
|
Document |
getOwnerDocument()
Get the owner document of this image
|
static String |
getPackagePath(OdfSchemaDocument mOdfSchemaDoc,
String imageRef) |
FrameRectangle |
getRectangle()
Return the rectangle used by this image
|
FrameStyleHandler |
getStyleHandler()
Return style handler for this frame
|
String |
getTitle()
Get the title of this image
|
StyleTypeDefinitions.FrameVerticalPosition |
getVerticalPosition()
Return the vertical position
|
static Iterator<Image> |
imageIterator(FrameContainer container)
Return an iterator of image.
|
static Image |
newImage(FrameContainer container,
URI uri)
Create an image and append it at the end of a container element.
|
static Image |
newImage(Frame frame,
URI uri)
Create an image and add it to a frame.
|
boolean |
remove()
Remove the image from the document.
|
void |
setDescription(String description)
Set the description of this image.
|
void |
setHorizontalPosition(StyleTypeDefinitions.FrameHorizontalPosition horizontalPos)
Set the horizontal position
|
void |
setHyperlink(URI linkto)
Add a hypertext reference to this image.
|
void |
setName(String name)
Set the name of this image.
|
void |
setRectangle(FrameRectangle rectangle)
Set the rectangle used by this image
|
void |
setTitle(String title)
Set the title of this image
|
void |
setVerticalPosition(StyleTypeDefinitions.FrameVerticalPosition verticalPos)
Set the vertical position
|
void |
updateImage(URI imageUri)
Update the image file with another resource.
|
getComponentByElement, registerComponent, unregisterComponentpublic static Image getInstanceof(DrawImageElement imageElement)
DrawImageElement.imageElement - - the instance of DrawImageElementpublic void setHyperlink(URI linkto)
linkto - the hyperlinkpublic URI getHyperlink()
public Document getOwnerDocument()
getOwnerDocument in class Componentpublic FrameStyleHandler getStyleHandler()
public DrawImageElement getOdfElement()
getOdfElement in class Componentpublic Frame getFrame()
public static Image newImage(FrameContainer container, URI uri)
container - - the frame container elementuri - - the URI of the imagepublic static Image newImage(Frame frame, URI uri)
frame - - the frame which contains this imageuri - - the URI of the imagepublic static String getPackagePath(OdfSchemaDocument mOdfSchemaDoc, String imageRef)
public static URI configureInsertedImage(OdfSchemaDocument mOdfSchemaDoc, DrawImageElement imageElement, String packagePath, boolean isResetSize) throws Exception
Exceptionpublic static Iterator<Image> imageIterator(FrameContainer container)
container - the frame container.public boolean remove()
The resource is removed if it's only used by this object.
public void updateImage(URI imageUri)
imageUri - - the URI of the new image resourcepublic InputStream getImageInputStream()
public String getInternalPath()
public String getMediaTypeString()
public void setName(String name)
name - - the name of the imagepublic String getName()
public void setRectangle(FrameRectangle rectangle)
rectangle - - the rectangle used by this imagepublic FrameRectangle getRectangle()
public void setTitle(String title)
title - - the title of this imagepublic String getTitle()
public String getDesciption()
public void setDescription(String description)
description - - the description of this imagepublic void setHorizontalPosition(StyleTypeDefinitions.FrameHorizontalPosition horizontalPos)
horizontalPos - - the horizontal positionpublic void setVerticalPosition(StyleTypeDefinitions.FrameVerticalPosition verticalPos)
verticalPos - - the vertical positionpublic StyleTypeDefinitions.FrameHorizontalPosition getHorizontalPosition()
public StyleTypeDefinitions.FrameVerticalPosition getVerticalPosition()
Copyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.