voji.report
Class ReportImage

java.lang.Object
  |
  +--voji.report.ReportComponent
        |
        +--voji.report.ReportImage
All Implemented Interfaces:
javax.swing.SwingConstants

public class ReportImage
extends ReportComponent

This report component draws an image


Field Summary
 double height
          The height where to scale the image to
 java.awt.Image image
          The current image
 double width
          The width where to scale the image to
 double x
          The X-coordinate of the upper left of the image
 double y
          The Y-coordinate of the upper left of the image
 
Fields inherited from class voji.report.ReportComponent
position
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
ReportImage(java.awt.Image image, double x, double y, double width, double height)
          Constructs a new ReportImage instance representing the given image
ReportImage(javax.swing.ImageIcon icon, double x, double y, double width, double height)
          Constructs a new ReportImage instance representing the given icon
 
Method Summary
 void draw(PageGraphics g)
          Draws this component
protected  int getOwnHeight(PageGraphics g)
          Returns the local height of this component
 
Methods inherited from class voji.report.ReportComponent
add, add, draw, getHeight, iterator, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

public java.awt.Image image
The current image


x

public double x
The X-coordinate of the upper left of the image


y

public double y
The Y-coordinate of the upper left of the image


width

public double width
The width where to scale the image to


height

public double height
The height where to scale the image to

Constructor Detail

ReportImage

public ReportImage(java.awt.Image image,
                   double x,
                   double y,
                   double width,
                   double height)
Constructs a new ReportImage instance representing the given image

Parameters:
image - the image to draw
x - the X-coordinate of the upper left of the image
y - the Y-coordinate of the upper left of the image
width - the width where to scale the image to
height - the height where to scale the image to

ReportImage

public ReportImage(javax.swing.ImageIcon icon,
                   double x,
                   double y,
                   double width,
                   double height)
Constructs a new ReportImage instance representing the given icon

Parameters:
icon - the ImageIcon to draw
x - the X-coordinate of the upper left of the image
y - the Y-coordinate of the upper left of the image
width - the width where to scale the image to
height - the height where to scale the image to
Method Detail

getOwnHeight

protected int getOwnHeight(PageGraphics g)
Returns the local height of this component

Overrides:
getOwnHeight in class ReportComponent
Parameters:
g - a graphical context to determine font sizes etc.
See Also:
ReportComponent.getHeight(PageGraphics)

draw

public void draw(PageGraphics g)
Draws this component

Overrides:
draw in class ReportComponent
Parameters:
g - the graphical context where to draw to
See Also:
ReportComponent.getHeight(PageGraphics)