org.xith3d.ui.hud.layout
Class GridLayout
java.lang.Object
org.xith3d.ui.hud.layout.LayoutManagerBase
org.xith3d.ui.hud.layout.BorderSettableLayoutManagerBase
org.xith3d.ui.hud.layout.GridLayout
- All Implemented Interfaces:
- BorderSettableLayoutManager, LayoutManager
public class GridLayout
- extends BorderSettableLayoutManagerBase
The GridLayout arranges the contained Widgets in a Grid.
You can define borders and gaps and even column- and row-weights.
the widgets' original size is overwritten by the calculated size.
If the rows-count is 0, then the widget's original height is respected
and only the width is calculated. The same applies for columns-count.
If columns-count is greater than 0, one row is filled after the other in the
order, the widgets are added.
If columns-count is 0, the fields are filled by column-first.
|
Constructor Summary |
GridLayout(int rows,
int cols)
|
GridLayout(int rows,
int cols,
float hgap,
float vgap)
|
GridLayout(int rows,
int cols,
float borderBottom,
float borderRight,
float borderTop,
float borderLeft)
|
GridLayout(int rows,
int cols,
float hgap,
float vgap,
float borderBottom,
float borderRight,
float borderTop,
float borderLeft)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GridLayout
public GridLayout(int rows,
int cols,
float hgap,
float vgap,
float borderBottom,
float borderRight,
float borderTop,
float borderLeft)
GridLayout
public GridLayout(int rows,
int cols,
float hgap,
float vgap)
GridLayout
public GridLayout(int rows,
int cols,
float borderBottom,
float borderRight,
float borderTop,
float borderLeft)
GridLayout
public GridLayout(int rows,
int cols)
setRows
public void setRows(int rows)
getRows
public final int getRows()
setCols
public void setCols(int cols)
getCols
public final int getCols()
setHGap
public void setHGap(float hgap)
getHGap
public final float getHGap()
setVGap
public void setVGap(float vgap)
getVGap
public final float getVGap()
setColWeights
public void setColWeights(float... weights)
getColWeights
public final float[] getColWeights()
setRowWeights
public void setRowWeights(float... weights)
getRowWeights
public final float[] getRowWeights()
doLayout
protected void doLayout(float left0,
float top0,
float containerResX,
float containerResY)
-
- Specified by:
doLayout in class LayoutManagerBase