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
Shape
s - Optional cell-size withAlignment.Fill
and orAlignment.Center
- Without cell-size behaves like a grid bag using individual shape sizes including padding - Can be filled inGridLayout.Order.COLUMN
orGridLayout.Order.ROW
major-order. - ..
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GridLayout.Order
Layout 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 int
getColumnCount()
Gap
getGap()
GridLayout.Order
getOrder()
int
getRowCount()
void
layout(Group g, AABBox box, PMVMatrix pmv)
Performing the layout ofGroup.getShapes()
, called @Shape.validate(GL2ES2)
orShape.validate(GLProfile)
.String
toString()
-
-
-
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.Layout
Performing 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:
layout
in interfaceGroup.Layout
- Parameters:
g
- theGroup
to layoutbox
- the bounding box ofGroup
to be updated by this method.pmv
- aPMVMatrix
which can be reused.
-
-