de.javagl.swogl.layout
Class GridLayout3D

java.lang.Object
  extended by de.javagl.swogl.layout.GridLayout3D
All Implemented Interfaces:
de.javagl.swogl.layout.LayoutManager3D

public class GridLayout3D
extends java.lang.Object
implements de.javagl.swogl.layout.LayoutManager3D

An implementation of the LayoutManager3D interface that lays out the SwoglComponents in a grid.


Constructor Summary
GridLayout3D(int rows, int columns)
          Creates a new GridLayout3D that lays out the SwoglComponents of a SwoglContainer in a grid with the given number of rows and columns and with no space between the components.
GridLayout3D(int rows, int columns, int hGap, int vGap)
          Creates a new GridLayout3D that lays out the SwoglComponents of a SwoglContainer in a grid with the given number of rows and columns and with the given spacing between the components.
 
Method Summary
 void doLayout3D()
           
 void setSwoglContainer(de.javagl.swogl.SwoglContainer swoglContainer)
           
 void zoomTo(de.javagl.swogl.SwoglComponent swoglComponent)
          Zoom to the given SwoglComponent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridLayout3D

public GridLayout3D(int rows,
                    int columns,
                    int hGap,
                    int vGap)
Creates a new GridLayout3D that lays out the SwoglComponents of a SwoglContainer in a grid with the given number of rows and columns and with the given spacing between the components.

Parameters:
rows - The rows of the grid
columns - The columns of the grid.
hGap - The horizontal gap between components
vGap - The vertical gap between components

GridLayout3D

public GridLayout3D(int rows,
                    int columns)
Creates a new GridLayout3D that lays out the SwoglComponents of a SwoglContainer in a grid with the given number of rows and columns and with no space between the components.

Parameters:
rows - The rows of the grid
columns - The columns of the grid.
Method Detail

setSwoglContainer

public void setSwoglContainer(de.javagl.swogl.SwoglContainer swoglContainer)
Specified by:
setSwoglContainer in interface de.javagl.swogl.layout.LayoutManager3D

doLayout3D

public void doLayout3D()
Specified by:
doLayout3D in interface de.javagl.swogl.layout.LayoutManager3D

zoomTo

public void zoomTo(de.javagl.swogl.SwoglComponent swoglComponent)
Zoom to the given SwoglComponent. If the given SwoglComponent is null, then this GridLayout3D will zoom to the overview.

Parameters:
swoglComponent - The SwoglComponent to zoom to.