Style Intelligence v12.0

inetsoft.report
Class PageArea

java.lang.Object
  extended by inetsoft.report.PageArea
All Implemented Interfaces:
Serializable, Cloneable

public class PageArea
extends Object
implements Serializable, Cloneable

A page area defines a printable region on a page. It can have borders. The main purpose of page areas is to divide a page into multiple sections. Report contents are printed in each section. The printing advances from one page area to the next until all page areas are full. It then advances to the next page. Page areas have fixed position and size on a page.

A page area may be declared as a non-flow area. In this case the page area does not participate in the main report flow. It contains a fixed set of elements. The elements in a non-flow area have fixed positions and sizes.

See Also:
Serialized Form

Field Summary
 double height
          The area location and size.
 double width
          The area location and size.
 double x
          The area location and size.
 double y
          The area location and size.
 
Constructor Summary
PageArea(double x, double y, double w, double h)
          Create an area at specified location and size.
PageArea(double x, double y, double w, double h, boolean rel)
          Create an area.
PageArea(Rectangle rect)
          Create an area in pixel size.
 
Method Summary
 Object clone()
           
 int getBorder()
          Get the area border.
 Color getBorderColor()
          Get the area border color.
 Rectangle getBounds(Rectangle parea)
          Get the location and size of this area inside a parent area.
 FixedContainer getElements()
          Get the page area elements.
 double getHeight()
          Get the page area height (in inches or relative to page).
 Insets getInsets()
          Get the area padding space.
 Rectangle getPrintArea(Rectangle parea)
          Get the printable area.
 double getWidth()
          Get the page area width (in inches or relative to page).
 double getX()
          Get the page area x position (in inches or relative to page).
 double getY()
          Get the page area y position (in inches or relative to page).
 boolean isFlow()
          Check if this area is a flow area.
 boolean isRelative()
          Check if this area is relative.
 boolean isRepeat()
          Check the repeat flag.
 void setBorder(int border)
          Set the area border.
 void setBorderColor(Color c)
          Set the border color.
 void setBounds(Rectangle frame, Rectangle parea)
          Set the location and size of the area.
 void setElements(FixedContainer elems)
          Set the elements in this area.
 void setFlow(boolean flow)
          Set the flow property.
 void setInsets(Insets insets)
          Set the area insets.
 void setRelative(boolean rel)
          Set relative flag.
 void setRepeat(boolean repeat)
          Set the repeat flag.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x
The area location and size.


y

public double y
The area location and size.


width

public double width
The area location and size.


height

public double height
The area location and size.

Constructor Detail

PageArea

public PageArea(Rectangle rect)
Create an area in pixel size. The resolution for converting pixels to inches is fixed at 72 dpi.

Parameters:
rect - area location and size.

PageArea

public PageArea(double x,
                double y,
                double w,
                double h)
Create an area at specified location and size. The parameters are in inches.

Parameters:
x - area x coordinate.
y - area y coordinate.
w - area width.
h - area height.

PageArea

public PageArea(double x,
                double y,
                double w,
                double h,
                boolean rel)
Create an area. If the relative flag is true, the location and size is percentage of the page width and height, where 1.0 is 100% of page width and height. The page width and height are the printable areas (paper size minus the margins).

Parameters:
x - area x location.
y - area y location.
w - area width.
h - area height.
rel - true to create a relative area.
Method Detail

setBorder

public void setBorder(int border)
Set the area border. Area border is drawn around the area. By default no border is drawn. If border is set, a padding space of two pixels is created automatically.

Parameters:
border - border line style defined in StyleConstants.

getBorder

public int getBorder()
Get the area border.

Returns:
border line style.

setBorderColor

public void setBorderColor(Color c)
Set the border color. The default is black.

Parameters:
c - area border color.

getBorderColor

public Color getBorderColor()
Get the area border color.

Returns:
border color.

setInsets

public void setInsets(Insets insets)
Set the area insets. The printable size of this area is the area size minus the insets.

Parameters:
insets - area padding space.

getInsets

public Insets getInsets()
Get the area padding space.

Returns:
padding space.

setRelative

public void setRelative(boolean rel)
Set relative flag. If relative is true, the x, y, width, and height are percentage of page printable area (0 to 1.0).

Parameters:
rel - relative flag.

isRelative

public boolean isRelative()
Check if this area is relative.

Returns:
true if this is a relative area.

setElements

public void setElements(FixedContainer elems)
Set the elements in this area. If a page area has child elements explicitly supplied using this method, it automatically becomes a non-flow area, and always prints the specified elements.

Parameters:
elems - page area elements.

getElements

public FixedContainer getElements()
Get the page area elements.


setFlow

public void setFlow(boolean flow)
Set the flow property. If an area is a flow area, it is used to contain page contents. If flow is set to false, the area is only used to print explicitly specified page area elements, and does not affect the main document flow.


isFlow

public boolean isFlow()
Check if this area is a flow area.


setRepeat

public void setRepeat(boolean repeat)
Set the repeat flag. This affects how non-flow area is drawn. If repeat is set to true (default), the contents in a non-flow area is always printed from beginning on every page. Otherwise, the contents are printed as if they flow from one page to another. For example, if a text element in a non-flow area does not completely print its contents on the first page, it will continue at the point where it stoped on the second page, instead of printing from the beginning of the text string.


isRepeat

public boolean isRepeat()
Check the repeat flag.


getX

public double getX()
Get the page area x position (in inches or relative to page).


getY

public double getY()
Get the page area y position (in inches or relative to page).


getWidth

public double getWidth()
Get the page area width (in inches or relative to page).


getHeight

public double getHeight()
Get the page area height (in inches or relative to page).


setBounds

public void setBounds(Rectangle frame,
                      Rectangle parea)
Set the location and size of the area.

Parameters:
frame - the parent area.
parea - location and size of this area inside the parent area.

getBounds

public Rectangle getBounds(Rectangle parea)
Get the location and size of this area inside a parent area.

Parameters:
parea - parent area.
Returns:
location and size.

getPrintArea

public Rectangle getPrintArea(Rectangle parea)
Get the printable area. This is the area minus the padding spaces.

Parameters:
parea - parent area.
Returns:
location and size.

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
Overrides:
clone in class Object

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