|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.storm.print.AbstractPageDecoration
An implementation of the PageDecoration interface to serve as a basis for
implementing various kinds of page decorations.
This class introduces a basic naming system for the placement of page
decorations on the page and an associated name, which is used by the
PageSetupDialog. The placement positions are only references
and must be implemented in the paint method.
| Field Summary | |
static int |
BOTTOM
Box-orientation constant used to specify the bottom of a box. |
static int |
CENTER
The central position in an area. |
protected int |
horizontalAlignment
|
static int |
LEFT
Box-orientation constant used to specify the left side of a box. |
protected String |
name
|
static int |
OTHER
Constant used to specify a non box-orientation. |
static int |
RIGHT
Box-orientation constant used to specify the right side of a box. |
static int |
TOP
ox-orientation constant used to specify the top of a box. |
protected int |
verticalAlignment
|
| Constructor Summary | |
AbstractPageDecoration(String name,
int verticalAlignment,
int horizontalAlignment)
Constructs a new AbstractPageDecoration instance. |
|
| Method Summary | |
int |
getHorizontalAlignment()
Get the horizontal alignment associated with the page decoration. |
String |
getName()
Get the descriptive name of the page decorations. |
int |
getVerticalAlignment()
Get the vertical alignment associated with the page decoration. |
abstract void |
paint(Graphics g,
int currentPageIndex,
int pageCount,
StormPageFormat pageFormat)
Paint the page decoration. |
void |
setName(String name)
Set the descriptive name of the page decoration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int CENTER
public static int LEFT
public static int RIGHT
public static int TOP
public static int BOTTOM
public static int OTHER
protected int verticalAlignment
protected int horizontalAlignment
protected String name
| Constructor Detail |
public AbstractPageDecoration(String name,
int verticalAlignment,
int horizontalAlignment)
AbstractPageDecoration instance.
name - Descriptive name of decoration being createdverticalAlignment - vertical alignment constant, LEFT, RIGHT or CENTERhorizontalAlignment - horizontal alignment constant, TOP OR BOTTOM| Method Detail |
public void setName(String name)
name - desciptive name fo the page decorationpublic String getName()
public int getHorizontalAlignment()
public int getVerticalAlignment()
public abstract void paint(Graphics g,
int currentPageIndex,
int pageCount,
StormPageFormat pageFormat)
paint in interface PageDecorationg - graphics context in which the decoration will be painted to.currentPageIndex - page number of the page being printed. This is
useful as some page decoration that should only be printed on
specific page or need to paint page numbers.pageCount - the total number of pages being printed in the
print jobpageFormat - the StormPageFormat associated with the StormPrinter.
The pageFormat is essential for retrieving the page
dimensions and coordinates for painting the decoration .
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||