|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--voji.report.ReportComponent
This is the common base class of all components which can be part of a report.
| Field Summary | |
int |
position
The vertical position of the component. |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
ReportComponent()
Constructs a new empty ReportComponent instance |
|
| Method Summary | |
void |
add(ReportComponent component)
Adds a new component |
void |
add(ReportComponent component,
int position)
Adds a new component and sets its vertical position |
protected void |
draw(PageGraphics g)
Draws this component. |
void |
draw(PageGraphics g,
int height)
Draws this component |
int |
getHeight(PageGraphics g)
Returns the total height of this component. |
protected int |
getOwnHeight(PageGraphics g)
Returns the local height of this component. |
java.util.Iterator |
iterator()
Returns an iterator of all sub components |
void |
remove(ReportComponent component)
Removes a component |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int position
TOP,
BOTTOM or
CENTER.
Default is TOP.
| Constructor Detail |
public ReportComponent()
ReportComponent instance
| Method Detail |
public void add(ReportComponent component)
component - the component to add
public void add(ReportComponent component,
int position)
component - the component to addposition - the vertical position
of componentpublic void remove(ReportComponent component)
component - the component to remove from this containerpublic java.util.Iterator iterator()
public int getHeight(PageGraphics g)
g - the graphical context where the height has to refer togetOwnHeight(PageGraphics),
draw(PageGraphics)protected int getOwnHeight(PageGraphics g)
g - a graphical context for you to determine font sizes etc.getHeight(PageGraphics)
public void draw(PageGraphics g,
int height)
g - the graphical context where to draw toheight - the height of the surrounding componentprotected void draw(PageGraphics g)
g - the graphical context where to draw togetHeight(PageGraphics)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||