java.lang.Object
org.jfree.chart3d.table.AbstractTableElement
org.jfree.chart3d.table.VerticalFlowElement
- All Implemented Interfaces:
Serializable,ContainerElement,TableElement
public class VerticalFlowElement
extends AbstractTableElement
implements ContainerElement, Serializable
A table element that displays a list of sub-elements in a vertical flow
layout.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- Since:
- 1.1
- See Also:
-
Field Summary
Fields inherited from interface org.jfree.chart3d.table.TableElement
CLASS -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance (equivalent tonew VerticalFlowElement(VAlign.MIDDLE, 2)).VerticalFlowElement(VAlign alignment, int vgap) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddElement(TableElement element) Adds a sub-element to the list.voiddraw(Graphics2D g2, Rectangle2D bounds) Draws the element and all of its subelements within the specified bounds.voiddraw(Graphics2D g2, Rectangle2D bounds, TableElementOnDraw onDrawHandler) Draws the element within the specified bounds.booleanTests this element for equality with an arbitrary object.Returns a (new) list containing the elements in this flow layout.Returns the vertical alignment for the elements.intgetVGap()Returns the vertical gap between elements, in Java2D units.layoutElements(Graphics2D g2, Rectangle2D bounds, Map<String, Object> constraints) Performs a layout of this table element, returning a list of bounding rectangles for the element and its subelements.preferredSize(Graphics2D g2, Rectangle2D bounds, Map<String, Object> constraints) Returns the preferred size for the element.voidreceive(TableElementVisitor visitor) Receives aTableElementVisitor(the visitor will be received by all the elements in the flow).voidsetVerticalAlignment(VAlign alignment) Sets the vertical alignment of elements within columns,voidsetVGap(int vgap) Sets the vertical gap between elements.Methods inherited from class org.jfree.chart3d.table.AbstractTableElement
getBackground, getInsets, getProperty, getRefPoint, getTag, preferredSize, setBackground, setBackgroundColor, setInsets, setProperty, setRefPoint, setTagMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.chart3d.table.TableElement
getProperty, getRefPoint, preferredSize, setProperty
-
Constructor Details
-
VerticalFlowElement
public VerticalFlowElement()Creates a new instance (equivalent tonew VerticalFlowElement(VAlign.MIDDLE, 2)). -
VerticalFlowElement
Creates a new instance.- Parameters:
alignment- the vertical alignment of columns (nullnot permitted).vgap- the gap between elements.
-
-
Method Details
-
getVerticalAlignment
Returns the vertical alignment for the elements.- Returns:
- The vertical alignment (never
null).
-
setVerticalAlignment
Sets the vertical alignment of elements within columns,- Parameters:
alignment- the alignment (nullnot permitted).
-
getVGap
Returns the vertical gap between elements, in Java2D units.- Returns:
- The vertical gap.
-
setVGap
Sets the vertical gap between elements.- Parameters:
vgap- the gap (in Java2D units).
-
getElements
Returns a (new) list containing the elements in this flow layout.- Returns:
- A list containing the elements (possibly empty, but never
null).
-
addElement
Adds a sub-element to the list.- Specified by:
addElementin interfaceContainerElement- Parameters:
element- the element (nullnot permitted).
-
receive
Receives aTableElementVisitor(the visitor will be received by all the elements in the flow).- Specified by:
receivein interfaceTableElement- Parameters:
visitor- the visitor (nullnot permitted).- Since:
- 1.2
-
preferredSize
Returns the preferred size for the element.- Specified by:
preferredSizein interfaceTableElement- Specified by:
preferredSizein classAbstractTableElement- Parameters:
g2- the graphics target (nullnot permitted).bounds- the bounds (nullnot permitted).constraints- the layout constraints (ignored here).- Returns:
- The preferred size (never
null).
-
layoutElements
public List<Rectangle2D> layoutElements(Graphics2D g2, Rectangle2D bounds, Map<String, Object> constraints) Description copied from interface:TableElementPerforms a layout of this table element, returning a list of bounding rectangles for the element and its subelements. This method is typically called by theTableElement.draw(java.awt.Graphics2D, java.awt.geom.Rectangle2D)method.- Specified by:
layoutElementsin interfaceTableElement- Parameters:
g2- the graphics target (nullnot permitted).bounds- the bounds (nullnot permitted).constraints- the constraints (if any).- Returns:
- A list of bounding rectangles.
-
draw
Draws the element and all of its subelements within the specified bounds.- Specified by:
drawin interfaceTableElement- Parameters:
g2- the graphics target (nullnot permitted).bounds- the bounds (nullnot permitted).
-
draw
Draws the element within the specified bounds. If therecordBoundsflag is set, this element and each of its children will have itsBOUNDS_2Dproperty updated with the current bounds.- Specified by:
drawin interfaceTableElement- Parameters:
g2- the graphics target (nullnot permitted).bounds- the bounds (nullnot permitted).onDrawHandler- record the bounds?- Since:
- 1.3
-
equals
Tests this element for equality with an arbitrary object.- Overrides:
equalsin classAbstractTableElement- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-