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 you to customize grid cells' views.
|
Method Summary |
java.awt.Color |
getCellColor(int row,
int col)
Gets the specified grid cell color. |
LwView |
getView(int row,
int col,
java.lang.Object o)
Gets the view for 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.
|
getView
public LwView getView(int row,
int col,
java.lang.Object o)
- Gets the view for 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:
- LwToolkit.CENTER
- LwToolkit.LEFT
- LwToolkit.RIGHT
- 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:
- LwToolkit.CENTER
- LwToolkit.TOP
- LwToolkit.BOTTOM
- 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 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.
|