ReportCat 1.1

li.netcat.print.util
Class XYPainter

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

public class XYPainter
extends FixSizePainter

Implementation of a Painter that contains an arbitrary number of painters positioned at individual offsets.

Author:
Arthur Marxer

Constructor Summary
XYPainter()
          Constructs a new and empty XYPainter with a size of 100x100 pixel.
XYPainter(int width, int height)
          Constructs a new and empty XYPainter with the given size.
 
Method Summary
 void addPainter(Painter painter, int x, int y)
          Adds a Painter to the list of painters.
 Painter getPainter(int index)
          Returns the Painter at the specified index.
 int getPainterCount()
          Returns the number of painters added to this XYPainter.
 void paint(java.awt.Graphics g, int x, int y)
          Paints the target on the given Graphics.
 void setClip(boolean clip)
          This property specifies, whether or not to use clipping.
 
Methods inherited from class li.netcat.print.util.FixSizePainter
getHeight, getSize, getWidth, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XYPainter

public XYPainter()
Constructs a new and empty XYPainter with a size of 100x100 pixel.


XYPainter

public XYPainter(int width,
                 int height)
Constructs a new and empty XYPainter with the given size.

Parameters:
width - The width of the XYPainter.
height - The height of the XYPainter.
Method Detail

addPainter

public void addPainter(Painter painter,
                       int x,
                       int y)
Adds a Painter to the list of painters.

Parameters:
painter - The Painter to be added.
x - The x offset associated with the Painter.
y - The y offset associated with the Painter.

getPainter

public Painter getPainter(int index)
Returns the Painter at the specified index.

Parameters:
index - The index of the Painter, it must be >= 0 and < getPainterCount().
Returns:
The Painter at the specified index.

getPainterCount

public int getPainterCount()
Returns the number of painters added to this XYPainter.

Returns:
The number of painters added to this XYPainter.

setClip

public void setClip(boolean clip)
This property specifies, whether or not to use clipping.

Parameters:
clip - Specify false to turn off clipping. The default is true.

paint

public 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
Specified by:
paint in class FixSizePainter

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