|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.object.AbstractSPObject
ca.sqlpower.wabit.AbstractWabitObject
ca.sqlpower.wabit.report.ChartRenderer
public class ChartRenderer
This class will render a chart from a query's result set in a chart format defined by the user.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface ca.sqlpower.wabit.report.ReportContentRenderer |
|---|
ReportContentRenderer.BackgroundColours |
| Field Summary |
|---|
| Fields inherited from class ca.sqlpower.object.AbstractSPObject |
|---|
uuid |
| Constructor Summary | |
|---|---|
ChartRenderer(Chart chart)
|
|
ChartRenderer(ChartRenderer renderer)
|
|
| Method Summary | |
|---|---|
boolean |
allowsChildren()
|
int |
childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)
|
ca.sqlpower.object.CleanupExceptions |
cleanup()
Default cleanup method that does nothing. |
java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> |
getAllowedChildTypes()
|
java.awt.Color |
getBackgroundColour()
|
java.util.List<? extends WabitObject> |
getChildren()
|
Chart |
getContent()
Returns the WabitObject that this is rendering |
java.util.List<WabitObject> |
getDependencies()
|
ContentBox |
getParent()
Returns the parent of this WabitObject. |
void |
refresh()
Refreshes the data being rendered by this ReportContentRenderer so that it has the most recent data. |
protected boolean |
removeChildImpl(ca.sqlpower.object.SPObject child)
|
void |
removeDependency(ca.sqlpower.object.SPObject dependency)
|
boolean |
renderReportContent(java.awt.Graphics2D g,
ContentBox contentBox,
double scaleFactor,
int pageIndex,
boolean printing)
Renders as much report content as will fit within the bounds of the given content box. |
void |
resetToFirstPage()
Tells this content renderer that the next call to #renderReportContent(Graphics2D, ContentBox, double) should
produce the first page of output again. |
| Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject |
|---|
commit, equals, generateNewUUID, getSession, isForegroundThread, removeChild, rollback, runInBackground, runInForeground, toString |
| Methods inherited from class ca.sqlpower.object.AbstractSPObject |
|---|
addChild, addChildImpl, addSPListener, begin, fireChildAdded, fireChildRemoved, firePropertyChange, firePropertyChange, firePropertyChange, fireTransactionEnded, fireTransactionRollback, fireTransactionStarted, getChildren, getName, getUUID, removeSPListener, setName, setParent, setUUID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ca.sqlpower.object.SPObject |
|---|
addChild, addSPListener, begin, commit, generateNewUUID, getChildren, getName, getSession, getUUID, removeChild, removeSPListener, rollback, setName, setParent, setUUID |
| Constructor Detail |
|---|
public ChartRenderer(@Nonnull
ChartRenderer renderer)
public ChartRenderer(@Nonnull
Chart chart)
| Method Detail |
|---|
public java.awt.Color getBackgroundColour()
getBackgroundColour in interface ReportContentRenderer@Nonnull public Chart getContent()
WabitObjectReportRendererWabitObject that this is rendering
getContent in interface WabitObjectReportRenderer
public boolean renderReportContent(java.awt.Graphics2D g,
ContentBox contentBox,
double scaleFactor,
int pageIndex,
boolean printing)
ReportContentRendererReport content renderers can be implemented in two different ways:
renderReportContent in interface ReportContentRendererg - The graphics to render into. The origin (top left corner or
(0,0)) of this graphics is translated to the top-left corner
of the content box.contentBox - The box that determines the size and shape that the rendered
data must fit within. You can ignore the X and Y coordinates
of the box because the given graphics object's origin is
already set to this box's origin.scaleFactor - The amount of scaling currently in effect. The nominal size of
a unit when displayed via the given graphics is scaleFactor/72
inches.pageIndex - The zero-based page number for which the corresponding report
content will be rendered.printing - This tells the renderer if the report is being printed. If
set to true the full report will be built, otherwise a cached
result will be used. Set this to true if the report is being
printed.
public void resetToFirstPage()
ReportContentRenderer#renderReportContent(Graphics2D, ContentBox, double) should
produce the first page of output again.
resetToFirstPage in interface ReportContentRendererpublic boolean allowsChildren()
allowsChildren in interface ca.sqlpower.object.SPObjectpublic int childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)
childPositionOffset in interface ca.sqlpower.object.SPObjectpublic java.util.List<? extends WabitObject> getChildren()
getChildren in interface ca.sqlpower.object.SPObjectpublic java.util.List<WabitObject> getDependencies()
getDependencies in interface ca.sqlpower.object.SPObjectpublic void removeDependency(ca.sqlpower.object.SPObject dependency)
removeDependency in interface ca.sqlpower.object.SPObjectpublic ca.sqlpower.object.CleanupExceptions cleanup()
AbstractWabitObject
cleanup in interface ca.sqlpower.object.SPObjectcleanup in class AbstractWabitObjectpublic void refresh()
ReportContentRenderer
refresh in interface ReportContentRendererprotected boolean removeChildImpl(ca.sqlpower.object.SPObject child)
removeChildImpl in class ca.sqlpower.object.AbstractSPObjectpublic ContentBox getParent()
WabitObjectWabitObject
tree.
getParent in interface ca.sqlpower.object.SPObjectgetParent in interface WabitObjectgetParent in class AbstractWabitObjectpublic java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> getAllowedChildTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||