de.infinityloop.util.gui
Class BasicGridLayout

java.lang.Object
  extended by de.infinityloop.util.gui.ConstraintLayout
      extended by de.infinityloop.util.gui.BasicGridLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2

public class BasicGridLayout
extends ConstraintLayout


Field Summary
protected  int alignment
           
protected  int cols
           
protected  int colWeight
           
protected  int[] colWidths
           
protected  int fill
           
protected  int hGap
           
protected  int reqCols
           
protected  int reqRows
           
protected  int[] rowHeights
           
protected  int rows
           
protected  int rowWeight
           
protected  int vGap
           
 
Fields inherited from class de.infinityloop.util.gui.ConstraintLayout
hMargin, includeInvisible, MAXIMUM, MINIMUM, PREFERRED, vMargin
 
Constructor Summary
BasicGridLayout()
           
BasicGridLayout(int rows, int cols)
           
BasicGridLayout(int rows, int cols, int hGap, int vGap)
           
BasicGridLayout(int rows, int cols, int hGap, int vGap, int hMargin, int vMargin)
           
 
Method Summary
protected  int alignmentFor(java.awt.Component c, int row, int col)
          Override this to set alignment on a per-component basis.
protected  void calcCellSizes(java.awt.Container target, int type)
           
protected  int fillFor(java.awt.Component c, int row, int col)
          Override this to set fill on a per-component basis.
 int getAlignment()
           
 int getColumns()
           
 int getColWeight()
           
protected  int getColWeight(int col)
          Override this to set weights on a per-column basis.
 int getFill()
           
 int getRows()
           
 int getRowWeight()
           
protected  int getRowWeight(int row)
          Override this to set weights on a per-row basis.
 void measureLayout(java.awt.Container target, java.awt.Dimension dimension, int type)
           
 void setAlignment(int a)
           
 void setColumns(int cols)
           
 void setColWeight(int colWeight)
           
 void setFill(int f)
           
 void setRows(int rows)
           
 void setRowWeight(int rowWeight)
           
protected  int sumArray(int[] array, int spacing, int size)
           
 
Methods inherited from class de.infinityloop.util.gui.ConstraintLayout
addLayoutComponent, addLayoutComponent, calcLayoutSize, getComponentSize, getConstraint, getIncludeInvisible, getLayoutAlignmentX, getLayoutAlignmentY, includeComponent, invalidateLayout, layoutContainer, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setConstraint, setIncludeInvisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hGap

protected int hGap

vGap

protected int vGap

rows

protected int rows

cols

protected int cols

reqRows

protected int reqRows

reqCols

protected int reqCols

rowHeights

protected int[] rowHeights

colWidths

protected int[] colWidths

alignment

protected int alignment

fill

protected int fill

colWeight

protected int colWeight

rowWeight

protected int rowWeight
Constructor Detail

BasicGridLayout

public BasicGridLayout()

BasicGridLayout

public BasicGridLayout(int rows,
                       int cols)

BasicGridLayout

public BasicGridLayout(int rows,
                       int cols,
                       int hGap,
                       int vGap)

BasicGridLayout

public BasicGridLayout(int rows,
                       int cols,
                       int hGap,
                       int vGap,
                       int hMargin,
                       int vMargin)
Method Detail

setColumns

public void setColumns(int cols)

setRows

public void setRows(int rows)

getRows

public int getRows()

getColumns

public int getColumns()

setAlignment

public void setAlignment(int a)

getAlignment

public int getAlignment()

setFill

public void setFill(int f)

getFill

public int getFill()

setColWeight

public void setColWeight(int colWeight)

getColWeight

public int getColWeight()

setRowWeight

public void setRowWeight(int rowWeight)

getRowWeight

public int getRowWeight()

alignmentFor

protected int alignmentFor(java.awt.Component c,
                           int row,
                           int col)
Override this to set alignment on a per-component basis.


fillFor

protected int fillFor(java.awt.Component c,
                      int row,
                      int col)
Override this to set fill on a per-component basis.


getRowWeight

protected int getRowWeight(int row)
Override this to set weights on a per-row basis.


getColWeight

protected int getColWeight(int col)
Override this to set weights on a per-column basis.


sumArray

protected int sumArray(int[] array,
                       int spacing,
                       int size)

calcCellSizes

protected void calcCellSizes(java.awt.Container target,
                             int type)

measureLayout

public void measureLayout(java.awt.Container target,
                          java.awt.Dimension dimension,
                          int type)
Overrides:
measureLayout in class ConstraintLayout