ca.sqlpower.wabit.report
Class Layout
java.lang.Object
ca.sqlpower.object.AbstractSPObject
ca.sqlpower.wabit.AbstractWabitObject
ca.sqlpower.wabit.report.Layout
- All Implemented Interfaces:
- ca.sqlpower.object.SPObject, WabitObject, java.awt.print.Pageable, java.awt.print.Printable
- Direct Known Subclasses:
- Report, Template
public abstract class Layout
- extends AbstractWabitObject
- implements java.awt.print.Pageable, java.awt.print.Printable
| Fields inherited from class ca.sqlpower.object.AbstractSPObject |
uuid |
| Fields inherited from interface java.awt.print.Pageable |
UNKNOWN_NUMBER_OF_PAGES |
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject |
cleanup, commit, equals, generateNewUUID, getParent, getSession, isForegroundThread, removeChild, rollback, runInBackground, runInForeground |
| Methods inherited from class ca.sqlpower.object.AbstractSPObject |
addChild, 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, getChildren, getName, getUUID, removeSPListener, setName, setParent, setUUID |
PROPERTY_ZOOM
public static final java.lang.String PROPERTY_ZOOM
- See Also:
- Constant Field Values
PAGE_NUMBER
public static final java.lang.String PAGE_NUMBER
- A property that defines which page is currently being printed.
- See Also:
- Constant Field Values
varContext
public Layout.LayoutVarContext varContext
page
protected Page page
- The page size and margin info.
TODO: In future versions, a Layout can have many pages so you can accomplish
left and right masters, cover pages, and so on. For now, a Layout can only
have one arrangement of page content, and this is it.
Layout
public Layout(java.lang.String uuid)
Layout
public Layout(Page page)
Layout
public Layout(java.lang.String uuid,
Page page)
getVarContext
public Layout.LayoutVarContext getVarContext()
updateBuiltinVariables
protected void updateBuiltinVariables()
getPage
public Page getPage()
setPage
public void setPage(Page page)
setVariable
public void setVariable(java.lang.String name,
java.lang.Object value)
childPositionOffset
public int childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)
- Specified by:
childPositionOffset in interface ca.sqlpower.object.SPObject
getChildren
public java.util.List<Page> getChildren()
- Specified by:
getChildren in interface ca.sqlpower.object.SPObject
removeChildImpl
protected boolean removeChildImpl(ca.sqlpower.object.SPObject child)
- Specified by:
removeChildImpl in class ca.sqlpower.object.AbstractSPObject
addChildImpl
protected void addChildImpl(ca.sqlpower.object.SPObject child,
int index)
- Overrides:
addChildImpl in class ca.sqlpower.object.AbstractSPObject
allowsChildren
public boolean allowsChildren()
- Specified by:
allowsChildren in interface ca.sqlpower.object.SPObject
print
public int print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
throws java.awt.print.PrinterException
- Prints a page of this report to the given graphics context. Before printing
the currentlyPrinting flag should be set.
- Specified by:
print in interface java.awt.print.Printable
- Parameters:
pageIndex - the zero-based page number to print
- Throws:
java.awt.print.PrinterException
getNumberOfPages
public int getNumberOfPages()
- Before getting the page count the currentlyPrinting flag should be set.
- Specified by:
getNumberOfPages in interface java.awt.print.Pageable
getPageFormat
public java.awt.print.PageFormat getPageFormat(int pageIndex)
throws java.lang.IndexOutOfBoundsException
- Specified by:
getPageFormat in interface java.awt.print.Pageable
- Throws:
java.lang.IndexOutOfBoundsException
getPrintable
public java.awt.print.Printable getPrintable(int pageIndex)
throws java.lang.IndexOutOfBoundsException
- Specified by:
getPrintable in interface java.awt.print.Pageable
- Throws:
java.lang.IndexOutOfBoundsException
setZoomLevel
public void setZoomLevel(int zoomLevel)
getZoomLevel
public int getZoomLevel()
compareAndSetCurrentlyPrinting
public boolean compareAndSetCurrentlyPrinting(boolean expected,
boolean updateValue)
isCurrentlyPrinting
public boolean isCurrentlyPrinting()
getDependencies
public java.util.List<WabitObject> getDependencies()
- Specified by:
getDependencies in interface ca.sqlpower.object.SPObject
removeDependency
public void removeDependency(ca.sqlpower.object.SPObject dependency)
- Specified by:
removeDependency in interface ca.sqlpower.object.SPObject
toString
public java.lang.String toString()
- Overrides:
toString in class AbstractWabitObject
getAllowedChildTypes
public java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> getAllowedChildTypes()
Copyright © 2009. All Rights Reserved.