|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.report.StylePage
public class StylePage
A StylePage is created for each page to be printed. The StylePage object contains the information on how to print a page. It is used to provide an abstraction of a page, and allows more sophisticated printing and better effeciency.
| Constructor Summary | |
|---|---|
StylePage(Dimension size)
Create a page with the specified size and resolution. |
|
StylePage(Dimension size,
int resolution)
Deprecated. 4.4, resolution in Java is fixed at 72. |
|
| Method Summary | |
|---|---|
void |
addInfo(String info)
Add a warning information to this style page. |
void |
addPaintable(Paintable pt)
Add a paintable area to the page. |
void |
clearCache()
Clear cache. |
Object |
clone()
Make a copy of this page. |
void |
complete()
This method is called after a page is fully printed. |
void |
completeInfo()
Complete all the warning informations. |
Object |
getBackground()
Get the page background. |
int |
getBackgroundLayout()
Get the page background layout. |
Dimension |
getBackgroundSize()
Get the page background layout. |
Map |
getBoundsMap()
Get the map contains warning information and its bounds. |
Font |
getFont()
Get the page default font. |
Color |
getForeground()
Get the page default foreground color. |
Margin |
getMargin()
Get the page margin. |
int |
getOrientation()
Get the orientation of current page. |
Dimension |
getPageDimension()
Returns the dimensions of the page in pixels. |
PageLayout |
getPageLayout()
Get the page layout defined for this page. |
Paintable |
getPaintable(int idx)
Get the specified paintable object. |
int |
getPaintableCount()
Get the number of paintable objects in this style page. |
Object |
getProperty(String name)
Get a property value. |
void |
insertPaintable(int idx,
Paintable pt)
Insert a paintable at the specified location. |
boolean |
isBatchWaiting()
Check if the paintable on this page needs to wait for report to finish processing before printed. |
boolean |
isSwapped()
Tell if swap file has already been outputed |
protected void |
load(ObjectInputStream s,
boolean full,
boolean swap)
Loaded page contents from a file. |
void |
paintBg(Graphics g,
double xratio,
double yratio)
Paint the page background on to the graphics. |
void |
parseXML(Element elem)
read the xml file and generate a style page |
void |
print(Graphics g)
Print the page on to the graphics. |
void |
removeAllPaintables()
Remove all paintables. |
void |
removePaintable(int idx)
Remove the specified paintable object. |
void |
reset()
Clear all the paintable areas in the page. |
void |
reset(boolean removal)
Clear all the paintable areas in the page. |
boolean |
restore(ObjectInputStream inp,
boolean removal)
Restore a swapped page. |
protected boolean |
save(ObjectOutputStream stream,
boolean completed,
boolean swap)
Write the page to a file. |
void |
setBackground(Object bg)
Set the background of this page. |
void |
setBackgroundLayout(int lay)
Set the background layout of this page. |
void |
setBackgroundSize(Dimension d)
Set the background layout of this page. |
void |
setFont(Font font)
Set the default font of this page. |
void |
setForeground(Color color)
Set the page default foreground color. |
void |
setMargin(Margin margin)
Set the page margin. |
void |
setOrientation(int orient)
Set the orientation of the report page. |
void |
setPageDimension(Dimension size)
Set the page dimension in pixels. |
void |
setPageLayout(PageLayout layout)
Set the page layout for this page. |
void |
setPaintable(int idx,
Paintable pt)
Set a paintable at the specified location. |
void |
setProperties(Map props)
Set the page properties. |
void |
setProperty(String name,
Object val)
Set a property. |
boolean |
swap(ObjectOutputStream output,
boolean completed)
Write the page to a file. |
void |
writeXML(PrintWriter writer)
write the style page into xml |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StylePage(Dimension size)
size - page size in pixels.
public StylePage(Dimension size,
int resolution)
size - page size in pixels.resolution - dots per inch.| Method Detail |
|---|
public void print(Graphics g)
public void paintBg(Graphics g,
double xratio,
double yratio)
public void addInfo(String info)
public void completeInfo()
public void addPaintable(Paintable pt)
public void insertPaintable(int idx,
Paintable pt)
public void setPaintable(int idx,
Paintable pt)
public void removeAllPaintables()
public int getPaintableCount()
public Paintable getPaintable(int idx)
idx - paintable index.
public void removePaintable(int idx)
idx - paintable index.public void reset()
public void reset(boolean removal)
public void clearCache()
public boolean isSwapped()
public void complete()
public Dimension getPageDimension()
public void setPageDimension(Dimension size)
size - page size.public int getOrientation()
public void setOrientation(int orient)
public Margin getMargin()
public void setMargin(Margin margin)
public Font getFont()
public void setFont(Font font)
font - default font.public Color getForeground()
public void setForeground(Color color)
color - foreground color.public Object getBackground()
public void setBackground(Object bg)
bg - page background.public int getBackgroundLayout()
public void setBackgroundLayout(int lay)
lay - page background layout.public Dimension getBackgroundSize()
public void setBackgroundSize(Dimension d)
d - page background layout.public PageLayout getPageLayout()
public void setPageLayout(PageLayout layout)
public Object getProperty(String name)
name - property name.
public void setProperty(String name,
Object val)
name - property name.val - property value.public void setProperties(Map props)
public void writeXML(PrintWriter writer)
public void parseXML(Element elem)
throws Exception
Exception
public boolean swap(ObjectOutputStream output,
boolean completed)
throws IOException
output - output stream to save the page.completed - true if the processing of report has completed.
IOException
public boolean restore(ObjectInputStream inp,
boolean removal)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundExceptionpublic boolean isBatchWaiting()
protected boolean save(ObjectOutputStream stream,
boolean completed,
boolean swap)
throws IOException
stream - output stream to save the page.completed - true if the processing of report has completed.swap - if true, free the objects that have been saved.
IOExceptionpublic Map getBoundsMap()
protected void load(ObjectInputStream s,
boolean full,
boolean swap)
throws IOException,
ClassNotFoundException
s - saved data file.full - true if restoring from a fully (not partial) swapped file.swap - true if the saved file is swapped.
IOException
ClassNotFoundExceptionpublic Object clone()
clone in class Object
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||