public class VerticalFlowElement extends AbstractTableElement implements ContainerElement, java.io.Serializable
CLASS| Constructor and Description |
|---|
VerticalFlowElement()
Creates a new instance (equivalent to
new VerticalFlowElement(VAlign.MIDDLE, 2)). |
VerticalFlowElement(VAlign alignment,
int vgap)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(TableElement element)
Adds a sub-element to the list.
|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds)
Draws the element and all of its subelements within the specified
bounds.
|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds,
TableElementOnDraw onDrawHandler)
Draws the element within the specified bounds.
|
boolean |
equals(java.lang.Object obj)
Tests this element for equality with an arbitrary object.
|
java.util.List<TableElement> |
getElements()
Returns a (new) list containing the elements in this flow layout.
|
VAlign |
getVerticalAlignment()
Returns the vertical alignment for the elements.
|
int |
getVGap()
Returns the vertical gap between elements, in Java2D units.
|
java.util.List<java.awt.geom.Rectangle2D> |
layoutElements(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds,
java.util.Map<java.lang.String,java.lang.Object> constraints)
Performs a layout of this table element, returning a list of bounding
rectangles for the element and its subelements.
|
java.awt.geom.Dimension2D |
preferredSize(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds,
java.util.Map<java.lang.String,java.lang.Object> constraints)
Returns the preferred size for the element.
|
void |
receive(TableElementVisitor visitor)
Receives a
TableElementVisitor (the visitor will be received
by all the elements in the flow). |
void |
setVerticalAlignment(VAlign alignment)
Sets the vertical alignment of elements within columns,
|
void |
setVGap(int vgap)
Sets the vertical gap between elements.
|
getBackground, getInsets, getProperty, getRefPoint, getTag, preferredSize, setBackground, setBackgroundColor, setInsets, setProperty, setRefPoint, setTagclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProperty, getRefPoint, preferredSize, setPropertypublic VerticalFlowElement()
new VerticalFlowElement(VAlign.MIDDLE, 2)).public VerticalFlowElement(VAlign alignment, int vgap)
alignment - the vertical alignment of columns (null
not permitted).vgap - the gap between elements.public VAlign getVerticalAlignment()
null).public void setVerticalAlignment(VAlign alignment)
alignment - the alignment (null not permitted).public int getVGap()
public void setVGap(int vgap)
vgap - the gap (in Java2D units).public java.util.List<TableElement> getElements()
null).public void addElement(TableElement element)
addElement in interface ContainerElementelement - the element (null not permitted).public void receive(TableElementVisitor visitor)
TableElementVisitor (the visitor will be received
by all the elements in the flow).receive in interface TableElementvisitor - the visitor (null not permitted).public java.awt.geom.Dimension2D preferredSize(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, java.util.Map<java.lang.String,java.lang.Object> constraints)
preferredSize in interface TableElementpreferredSize in class AbstractTableElementg2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).constraints - the layout constraints (ignored here).null).public java.util.List<java.awt.geom.Rectangle2D> layoutElements(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, java.util.Map<java.lang.String,java.lang.Object> constraints)
TableElementTableElement.draw(java.awt.Graphics2D,
java.awt.geom.Rectangle2D) method.layoutElements in interface TableElementg2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).constraints - the constraints (if any).public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds)
draw in interface TableElementg2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, TableElementOnDraw onDrawHandler)
recordBounds flag is set, this element and each of its
children will have its BOUNDS_2D property updated with
the current bounds.draw in interface TableElementg2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).onDrawHandler - record the bounds?public boolean equals(java.lang.Object obj)
equals in class AbstractTableElementobj - the object (null permitted).