Image extends Component { public void setRectangle(FrameRectangle rectangle) { mFrame.setRectangle(rectangle); } private  Image(DrawImageElement drawElement); static Image getInstanceof(DrawImageElement imageElement); void setHyperlink(URI linkto); URI getHyperlink(); Document getOwnerDocument(); FrameStyleHandler getStyleHandler(); DrawImageElement getOdfElement(); Frame getFrame(); static Image newImage(FrameContainer container, URI uri); static Image newImage(Frame frame, URI uri); static String getPackagePath(OdfSchemaDocument mOdfSchemaDoc, String imageRef); static URI configureInsertedImage(OdfSchemaDocument mOdfSchemaDoc, DrawImageElement imageElement,
			String packagePath, boolean isResetSize); static Iterator<Image> imageIterator(FrameContainer container); boolean remove(); void updateImage(URI imageUri); InputStream getImageInputStream(); String getInternalPath(); String getMediaTypeString(); void setName(String name); String getName(); void setRectangle(FrameRectangle rectangle); FrameRectangle getRectangle(); void setTitle(String title); String getTitle(); String getDesciption(); void setDescription(String description); void setHorizontalPosition(FrameHorizontalPosition horizontalPos); void setVerticalPosition(FrameVerticalPosition verticalPos); FrameHorizontalPosition getHorizontalPosition(); FrameVerticalPosition getVerticalPosition();  }
@Test public void testSetRectangle() { try { TextDocument doc = TextDocument.newTextDocument(); Paragraph para = doc.addParagraph("updateImage test"); Image image = Image.newImage(para, ResourceUtilities.getURI("image_list_item.png")); FrameRectangle rectangle = new FrameRectangle(5.13, 4.21, 3.76, 3.51, StyleTypeDefinitions.SupportedLinearMeasure.CM); image.setRectangle(rectangle); FrameRectangle rectangle2 = image.getRectangle(); Assert.assertEquals(3.51, rectangle2.getHeight()); Assert.assertEquals(3.76, rectangle2.getWidth()); Assert.assertEquals(5.13, rectangle2.getX()); Assert.assertEquals(4.21, rectangle2.getY()); Assert.assertEquals(StyleTypeDefinitions.SupportedLinearMeasure.CM, rectangle2.getLinearMeasure()); } catch (Exception e) { Logger.getLogger(ImageTest.class.getName()).log(Level.SEVERE, null, e); Assert.fail(); } }