org.zaval.lw.grid
Interface LwGridViewProvider

All Known Implementing Classes:
LwTreeGrid, LwDefViews

public interface LwGridViewProvider

This interface is used to provide a view for the specified grid cell, it allows to customize grid cells' views.


Method Summary
 java.awt.Color getCellColor(int row, int col)
          Gets the the specified grid cell color.
 LwView getView(int row, int col, java.lang.Object o)
          Gets the view of the specified cell and the given data model value.
 int getXAlignment(int row, int col)
          Gets the horizontal alignment for the specified grid cell.
 int getYAlignment(int row, int col)
          Gets the vertical alignment for the specified grid cell.
 

Method Detail

getView

public LwView getView(int row,
                      int col,
                      java.lang.Object o)
Gets the view of the specified cell and the given data model value.
Parameters:
row - the specified cell row.
col - the specified cell column.
o - the specified data model value.
Returns:
a view.

getXAlignment

public int getXAlignment(int row,
                         int col)
Gets the horizontal alignment for the specified grid cell. The method should return one of the following values:
Parameters:
row - the specified cell row.
col - the specified cell column.
Returns:
a horizontal alignment.

getYAlignment

public int getYAlignment(int row,
                         int col)
Gets the vertical alignment for the specified grid cell. The method should return one of the following values:
Parameters:
row - the specified cell row.
col - the specified cell column.
Returns:
a vertical alignment.

getCellColor

public java.awt.Color getCellColor(int row,
                                   int col)
Gets the the specified grid cell color. The color is used to fill the cell background. If the cell has not own background than the method should return null.
Parameters:
row - the specified cell row.
col - the specified cell column.
Returns:
a color.


Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org