|
||||||||||
| 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.ContentBox
public class ContentBox
Represents a box on the page which has an absolute position and size. The content of the box is provided by a ContentRenderer implementation. Whenever the content renderer's appearance changes, this box will fire a PropertyChangeEvent with the property name "content". The old and new values will
| Constructor Summary | |
|---|---|
ContentBox()
|
|
ContentBox(ContentBox contentBox)
Copy Constructor |
|
| Method Summary | |
|---|---|
protected void |
addChildImpl(WabitObject child,
int index)
This is the object specific implementation of #addChild(WabitObject). |
void |
addRepaintListener(RepaintListener listener)
Adds a listener to this object that will be notified when the object wants to repaint. |
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. |
java.awt.geom.Rectangle2D |
getBounds()
|
java.util.List<WabitObject> |
getChildren()
Included to complete the WabitObject implementation. |
ReportContentRenderer |
getContentRenderer()
|
java.util.List<WabitObject> |
getDependencies()
Returns a list of all WabitObjects that this Wabit object is
dependent on. |
java.awt.Font |
getFont()
|
double |
getHeight()
|
Page |
getParent()
Returns the parent of this WabitObject. |
double |
getWidth()
|
double |
getX()
|
double |
getY()
|
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 |
removeRepaintListener(RepaintListener listener)
|
void |
repaint()
|
void |
setContentRenderer(ReportContentRenderer contentRenderer)
Sets the given content renderer as this box's provider of rendered content. |
void |
setFont(java.awt.Font font)
|
void |
setHeight(double height)
|
void |
setWidth(double width)
|
void |
setX(double x)
|
void |
setY(double y)
|
| 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, getSession, getUUID, isForegroundThread, removeChild, removeWabitListener, rollback, rollbackTransaction, runInBackground, runInForeground, setName, setParent, setUUID, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContentBox()
public ContentBox(ContentBox contentBox)
contentBox - | Method Detail |
|---|
public void setContentRenderer(ReportContentRenderer contentRenderer)
Although content renderers are considered children of the content box (and this method does cause child added/removed events), a content box can only have one content renderer at a time, so if you call this method when the current content renderer is non-null, the old renderer will be replaced by the new one.
contentRenderer - The new content renderer to use. Can be null, which means to
remove the content render and render this content box
incontent.public ReportContentRenderer getContentRenderer()
public Page getParent()
WabitObjectWabitObject
tree.
getParent in interface WabitObjectgetParent in class AbstractWabitObjectpublic double getX()
public void setX(double x)
public double getY()
public void setY(double y)
public double getWidth()
public void setWidth(double width)
public double getHeight()
public void setHeight(double height)
public boolean allowsChildren()
WabitObject
WabitObject.childPositionOffset(Class)public int childPositionOffset(java.lang.Class<? extends WabitObject> childType)
WabitObject
public java.util.List<WabitObject> getChildren()
getContentRenderer() because
there can only ever be 0 or 1 children.
public java.awt.Font getFont()
public void setFont(java.awt.Font font)
public java.awt.geom.Rectangle2D getBounds()
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.
public void removeDependency(WabitObject dependency)
WabitObject
protected 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 void addRepaintListener(RepaintListener listener)
public void removeRepaintListener(RepaintListener listener)
public void repaint()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||