Spiffy UI Framework

org.spiffyui.client.widgets
Class SlidingGridPanel

java.lang.Object
  extended by ComplexPanel
      extended by org.spiffyui.client.widgets.SlidingGridPanel

public class SlidingGridPanel
extends ComplexPanel

A panel that uses a sliding grid layout based on this example . The sliding grid arranges a set of cells to the best width to fit the available space and then resizes that grid when the browser window resizes.


Constructor Summary
SlidingGridPanel()
          Create a new SlidingGridPanel
 
Method Summary
 void add(Widget w)
          Add a widget to a new cell in this sliding grid
 void addBig(Widget w)
          Add a widget to a big cell (tall and wide)
 void addTall(Widget w)
          Add a widget to a tall cell
 void addWide(Widget w)
          Add a widget to a wide cell
 int getCellHeight()
          the height of each cell in px
 int getCellWidth()
          the width of each cell in px
 int getGridOffset()
          Deprecated. The grid offset is now deprecated since the sliding grid will use the parent width instead of the window width. This field will be ignored and will be removed in the next release.
 int getPadding()
          the padding between each cell in px
 void onLoad()
           
 void reAlignGrid()
          Force the grid to redraw.
 void setCellHeight(int cellHeight)
          the height of each cell in px
 void setCellWidth(int cellWidth)
          the width of each cell in px
 void setGridOffset(int offset)
          Deprecated. The grid offset is now deprecated since the sliding grid will use the parent width instead of the window width. This field will be ignored and will be removed in the next release.
 void setPadding(int padding)
          the padding between each cell in px
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlidingGridPanel

public SlidingGridPanel()
Create a new SlidingGridPanel

Method Detail

add

public void add(Widget w)
Add a widget to a new cell in this sliding grid

Parameters:
w - the widget to add

addTall

public void addTall(Widget w)
Add a widget to a tall cell

Parameters:
w - Widget

addWide

public void addWide(Widget w)
Add a widget to a wide cell

Parameters:
w - Widget

addBig

public void addBig(Widget w)
Add a widget to a big cell (tall and wide)

Parameters:
w - Widget

getCellWidth

public int getCellWidth()
the width of each cell in px

Returns:
the cellWidth

setCellWidth

public void setCellWidth(int cellWidth)
the width of each cell in px

Parameters:
cellWidth - the cellWidth to set

getCellHeight

public int getCellHeight()
the height of each cell in px

Returns:
the cellHeight

setCellHeight

public void setCellHeight(int cellHeight)
the height of each cell in px

Parameters:
cellHeight - the cellHeight to set

getPadding

public int getPadding()
the padding between each cell in px

Returns:
the padding

setPadding

public void setPadding(int padding)
the padding between each cell in px

Parameters:
padding - the padding to set

getGridOffset

@Deprecated
public int getGridOffset()
Deprecated. The grid offset is now deprecated since the sliding grid will use the parent width instead of the window width. This field will be ignored and will be removed in the next release.

the offset width of the grid in px

Returns:
the offset

setGridOffset

@Deprecated
public void setGridOffset(int offset)
Deprecated. The grid offset is now deprecated since the sliding grid will use the parent width instead of the window width. This field will be ignored and will be removed in the next release.

the offset width of the grid in px

Parameters:
offset - the offset to set

reAlignGrid

public void reAlignGrid()
Force the grid to redraw.


onLoad

public void onLoad()

Spiffy UI Framework