Package com.jogamp.graph.ui.layout
Class GridLayout
- java.lang.Object
-
- com.jogamp.graph.ui.layout.GridLayout
-
- All Implemented Interfaces:
Group.Layout
public class GridLayout extends Object implements Group.Layout
GraphUI GridGroup.Layout.A grid of
Shapes - Optional cell-size withAlignment.Filland orAlignment.Center- Without cell-size behaves like a grid bag using individual shape sizes including padding - Can be filled inGridLayout.Order.COLUMNorGridLayout.Order.ROWmajor-order. - ..
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGridLayout.OrderLayout order forGroup.getShapes()} after population.
-
Constructor Summary
Constructors Constructor Description GridLayout(float cellWidth, float cellHeight, Alignment alignment, Gap gap, int row_limit)Default layout order ofGroup.getShapes()} isGridLayout.Order.ROW.GridLayout(int column_limit, float cellWidth, float cellHeight, Alignment alignment)Default layout order ofGroup.getShapes()} isGridLayout.Order.COLUMN.GridLayout(int column_limit, float cellWidth, float cellHeight, Alignment alignment, Gap gap)Default layout order ofGroup.getShapes()} isGridLayout.Order.COLUMN.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnCount()GapgetGap()GridLayout.OrdergetOrder()intgetRowCount()voidlayout(Group g, AABBox box, PMVMatrix pmv)Performing the layout ofGroup.getShapes(), called @Shape.validate(GL2ES2)orShape.validate(GLProfile).StringtoString()
-
-
-
Constructor Detail
-
GridLayout
public GridLayout(int column_limit, float cellWidth, float cellHeight, Alignment alignment)Default layout order ofGroup.getShapes()} isGridLayout.Order.COLUMN.- Parameters:
column_limit- [1..inf)cellWidth-cellHeight-alignment- TODO
-
GridLayout
public GridLayout(int column_limit, float cellWidth, float cellHeight, Alignment alignment, Gap gap)Default layout order ofGroup.getShapes()} isGridLayout.Order.COLUMN.- Parameters:
column_limit- [1..inf)cellWidth-cellHeight-alignment- TODOgap-
-
GridLayout
public GridLayout(float cellWidth, float cellHeight, Alignment alignment, Gap gap, int row_limit)Default layout order ofGroup.getShapes()} isGridLayout.Order.ROW.- Parameters:
cellWidth-cellHeight-alignment- TODOgap-row_limit- [1..inf)
-
-
Method Detail
-
getOrder
public GridLayout.Order getOrder()
-
getColumnCount
public int getColumnCount()
-
getRowCount
public int getRowCount()
-
getGap
public Gap getGap()
-
layout
public void layout(Group g, AABBox box, PMVMatrix pmv)
Description copied from interface:Group.LayoutPerforming the layout ofGroup.getShapes(), called @Shape.validate(GL2ES2)orShape.validate(GLProfile).According to the implemented layout, method - may scale the s - may move the s - may reuse the given
PMVMatrix`pmv` - must update the givenAABBox`box`- Specified by:
layoutin interfaceGroup.Layout- Parameters:
g- theGroupto layoutbox- the bounding box ofGroupto be updated by this method.pmv- aPMVMatrixwhich can be reused.
-
-