Style Intelligence v12.0

inetsoft.report.painter
Class ImagePainter

java.lang.Object
  extended by inetsoft.report.painter.ImagePainter
All Implemented Interfaces:
Painter, Serializable

public class ImagePainter
extends Object
implements Painter

The ImagePainter paints an image. It's used internally to handling the painting of images in documents.

See Also:
Serialized Form

Constructor Summary
ImagePainter(Image image)
          Create a painter for the specified image.
ImagePainter(Image image, boolean fit)
          Create a painter for the specified image.
 
Method Summary
 Color getBackground()
          Get background Color
 Image getImage()
          Get the image in the painter.
 Dimension getPreferredSize()
          Return the preferred size of this painter.
 boolean isFit()
          If fit is true, the image is resized to the area assigned to it.
 boolean isScalable()
          Image can be scaled.
 boolean isSVGImage()
          Is the painting image an svg image.
 void paint(Graphics g, int x, int y, int w, int h)
          Paint contents at the specified location.
 void setBackground(Color bg)
          Set background Color
 void setImage(Image image)
          Set the image in the painter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImagePainter

public ImagePainter(Image image)
Create a painter for the specified image.

Parameters:
image - image to paint.

ImagePainter

public ImagePainter(Image image,
                    boolean fit)
Create a painter for the specified image.

Parameters:
image - image to paint.
fit - true to resize the image to the paint area, false to paint image as is.
Method Detail

getPreferredSize

public Dimension getPreferredSize()
Return the preferred size of this painter.

Specified by:
getPreferredSize in interface Painter
Returns:
size.

setBackground

public void setBackground(Color bg)
Set background Color


getBackground

public Color getBackground()
Get background Color


paint

public void paint(Graphics g,
                  int x,
                  int y,
                  int w,
                  int h)
Paint contents at the specified location.

Specified by:
paint in interface Painter
Parameters:
g - graphical context.
x - x coordinate of the left edge of the paint area.
y - y coordinate of the upper edge of the paint area.
w - area width.
h - area height.

isScalable

public boolean isScalable()
Image can be scaled.

Specified by:
isScalable in interface Painter
Returns:
scalable option.

getImage

public Image getImage()
Get the image in the painter.

Returns:
image.

setImage

public void setImage(Image image)
Set the image in the painter.

Parameters:
image - image icon.

isFit

public boolean isFit()
If fit is true, the image is resized to the area assigned to it. Otherwise it is drawn as is.


isSVGImage

public boolean isSVGImage()
Is the painting image an svg image.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.