|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.wabit.AbstractWabitObject
ca.sqlpower.wabit.report.Layout
public abstract class Layout
| Nested Class Summary | |
|---|---|
class |
Layout.LayoutVarContext
|
| Field Summary | |
|---|---|
protected Page |
page
The page size and margin info. |
static java.lang.String |
PAGE_NUMBER
A property that defines which page is currently being printed. |
static java.lang.String |
PROPERTY_ZOOM
|
Layout.LayoutVarContext |
varContext
|
| 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 |
| Constructor Summary | |
|---|---|
Layout(Page page)
|
|
Layout(java.lang.String uuid)
|
|
Layout(java.lang.String uuid,
Page page)
|
|
| Method Summary | |
|---|---|
protected void |
addChildImpl(WabitObject child,
int index)
This is the object specific implementation of #addChild(WabitObject). |
boolean |
allowsChildren()
Returns true if this object may contain children. |
int |
childPositionOffset(java.lang.Class<? extends WabitObject> childType)
Returns the position in the list that would be returned by getChildren() that the first object of type childClass is, or where it would be if there were any children of that type. |
boolean |
compareAndSetCurrentlyPrinting(boolean expected,
boolean updateValue)
|
java.util.List<Page> |
getChildren()
Returns an unmodifiable list of the children in this WabitObject. |
java.util.List<WabitObject> |
getDependencies()
Returns a list of all WabitObjects that this Wabit object is
dependent on. |
int |
getNumberOfPages()
Before getting the page count the currentlyPrinting flag should be set. |
Page |
getPage()
|
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
|
java.awt.print.Printable |
getPrintable(int pageIndex)
|
Layout.LayoutVarContext |
getVarContext()
|
int |
getZoomLevel()
|
boolean |
isCurrentlyPrinting()
|
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
Prints a page of this report to the given graphics context. |
protected boolean |
removeChildImpl(WabitObject child)
This is the object specific implementation of removeChild. |
void |
removeDependency(WabitObject dependency)
Removes the given object as a dependency of this object. |
void |
setPage(Page page)
|
void |
setVariable(java.lang.String name,
java.lang.Object value)
|
void |
setZoomLevel(int zoomLevel)
|
java.lang.String |
toString()
|
protected void |
updateBuiltinVariables()
|
| Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject |
|---|
addChild, addWabitListener, begin, beginTransaction, cleanup, commit, commitTransaction, equals, fireChildAdded, fireChildRemoved, firePropertyChange, firePropertyChange, firePropertyChange, fireTransactionEnded, fireTransactionRollback, fireTransactionStarted, generateNewUUID, getChildren, getName, getParent, getSession, getUUID, isForegroundThread, removeChild, removeWabitListener, rollback, rollbackTransaction, runInBackground, runInForeground, setName, setParent, setUUID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROPERTY_ZOOM
public static final java.lang.String PAGE_NUMBER
public Layout.LayoutVarContext varContext
protected Page page
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.
| Constructor Detail |
|---|
public Layout(java.lang.String uuid)
public Layout(Page page)
public Layout(java.lang.String uuid,
Page page)
| Method Detail |
|---|
public Layout.LayoutVarContext getVarContext()
protected void updateBuiltinVariables()
public Page getPage()
public void setPage(Page page)
public void setVariable(java.lang.String name,
java.lang.Object value)
public int childPositionOffset(java.lang.Class<? extends WabitObject> childType)
WabitObject
childPositionOffset in interface WabitObjectpublic java.util.List<Page> getChildren()
WabitObject
getChildren in interface WabitObjectprotected boolean removeChildImpl(WabitObject child)
AbstractWabitObject
removeChildImpl in class AbstractWabitObjectAbstractWabitObject.removeChild(WabitObject)
protected void addChildImpl(WabitObject child,
int index)
AbstractWabitObject#addChild(WabitObject). There are checks in the
#addChild(WabitObject) method to ensure that the object given
here is a valid child type of this object.
This method should be overwritten if children are allowed.
addChildImpl in class AbstractWabitObjectchild - The child to add to this object.index - The index to add the child at.public boolean allowsChildren()
WabitObject
allowsChildren in interface WabitObjectWabitObject.childPositionOffset(Class)
public int print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
throws java.awt.print.PrinterException
print in interface java.awt.print.PrintablepageIndex - the zero-based page number to print
java.awt.print.PrinterExceptionpublic int getNumberOfPages()
getNumberOfPages in interface java.awt.print.Pageable
public java.awt.print.PageFormat getPageFormat(int pageIndex)
throws java.lang.IndexOutOfBoundsException
getPageFormat in interface java.awt.print.Pageablejava.lang.IndexOutOfBoundsException
public java.awt.print.Printable getPrintable(int pageIndex)
throws java.lang.IndexOutOfBoundsException
getPrintable in interface java.awt.print.Pageablejava.lang.IndexOutOfBoundsExceptionpublic void setZoomLevel(int zoomLevel)
public int getZoomLevel()
public boolean compareAndSetCurrentlyPrinting(boolean expected,
boolean updateValue)
public boolean isCurrentlyPrinting()
public java.util.List<WabitObject> getDependencies()
WabitObjectWabitObjects that this Wabit object is
dependent on. Children of a WabitObject are not dependencies and will not
be returned in this list. If there are no objects this Wabit object is
dependent on an empty list should be returned. These are only the
immediate dependencies of this object. If you want to find the
dependencies of this object's dependencies as well it may be useful to
look at WorkspaceGraphModel to make a full graph of all of the
dependencies.
getDependencies in interface WabitObjectpublic void removeDependency(WabitObject dependency)
WabitObject
removeDependency in interface WabitObjectpublic java.lang.String toString()
toString in class AbstractWabitObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||