Style Intelligence v12.0

inetsoft.report
Interface Painter

All Superinterfaces:
Serializable
All Known Subinterfaces:
LinkedShapePainter, ScaledPainter
All Known Implementing Classes:
BulletPainter, ComponentPainter, HTMLSource, ImagePainter, JAIImagePainter, PresenterPainter, RotatedPainter

public interface Painter
extends Serializable

The Painter interface defines the API of a graphical representation of an object. A painter is a self contained object that is capable of drawing its own graphical representation, and calculating its own size. A Painter can be thought of a combination of a Presenter and an object presented by the Presenter.


Method Summary
 Dimension getPreferredSize()
          Return the preferred size of this painter.
 boolean isScalable()
          If scalable is false, the painter is always sized to the preferred size.
 void paint(Graphics g, int x, int y, int w, int h)
          Paint contents at the specified location.
 

Method Detail

paint

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

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.

getPreferredSize

Dimension getPreferredSize()
Return the preferred size of this painter. If the width and height are negative, the preferred size is specified as 1/1000 of the available page width (minus margins). For example, (-900, -500) generates a size of 90% of the page width as the preferred width, and 1/2 of the page width as the preferred height.

Returns:
size.

isScalable

boolean isScalable()
If scalable is false, the painter is always sized to the preferred size. If the size on the page is different from the preferred size, the painter image is scaled(by pixels) to fit the page area. If scalable is true, the painter will be printed in the actual size on page, which may or may not be the same as the preferred size. The painter needs to check the width and height in the paint() method to know the actual size, and do the scaling by itself in paint().

Returns:
scalable option.

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