ReportCat 1.1

li.netcat.print.util
Class FixSizePainter

java.lang.Object
  extended byli.netcat.print.util.FixSizePainter
All Implemented Interfaces:
Painter
Direct Known Subclasses:
XYPainter

public abstract class FixSizePainter
extends java.lang.Object
implements Painter

Abstract Painter implementation that has a fixed size, i.e. independent of the Graphics context.

Author:
Arthur Marxer

Constructor Summary
FixSizePainter()
          Constructs a new FixSizePainter with a width and a height of 0.
FixSizePainter(int width, int height)
          Constructs a new FixSizePainter with the given width and height.
 
Method Summary
 int getHeight()
          Returns the height of the painter.
 java.awt.Dimension getSize(java.awt.Graphics g)
          Returns the size of the Painter.
 int getWidth()
          Returns the width of the painter.
abstract  void paint(java.awt.Graphics g, int x, int y)
          Paints the target on the given Graphics.
 void setSize(int width, int height)
          Sets the size of the painer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixSizePainter

public FixSizePainter()
Constructs a new FixSizePainter with a width and a height of 0.


FixSizePainter

public FixSizePainter(int width,
                      int height)
Constructs a new FixSizePainter with the given width and height.

Parameters:
width - The width of the painer.
height - The height of the paint.
Method Detail

setSize

public void setSize(int width,
                    int height)
Sets the size of the painer.

Parameters:
width - The width of the painer.
height - The height of the paint.

getWidth

public int getWidth()
Returns the width of the painter.

Returns:
The width of the painter.

getHeight

public int getHeight()
Returns the height of the painter.

Returns:
The height of the painter.

getSize

public java.awt.Dimension getSize(java.awt.Graphics g)
Description copied from interface: Painter
Returns the size of the Painter.

Specified by:
getSize in interface Painter
Parameters:
g - The relevant Graphics context.
Returns:
The size of the Painter.

paint

public abstract void paint(java.awt.Graphics g,
                           int x,
                           int y)
Description copied from interface: Painter
Paints the target on the given Graphics.

Specified by:
paint in interface Painter
Parameters:
g - The Graphics object that is used to paint.
x - The x coordinate of the upper left corner of the target.
y - The y coordinate of the upper left corner of the target.

ReportCat 1.1

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation, Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation, Print,Printing,Printer,Java,Java Print,SDK,Java Printing,Printing Java,Print Java,Library,Java Library,Print Library,Report,Reports,Java Report,Java Programming,Java Output,Layout,Page,API,Preview,Print Preview,Content,A4,Free,Output,Header,Footer,Download,Package,Jar,Evaluation