org.zaval.lw.grid
Class LwDefViews
java.lang.Object
|
+--org.zaval.lw.grid.LwDefViews
- All Implemented Interfaces:
- LwGridViewProvider
- public class LwDefViews
- extends java.lang.Object
- implements LwGridViewProvider
This class is a simple implementation of LwGridViewProvider interface where
LwTextRender view is used to render grid cells.
|
Method Summary |
java.awt.Color |
getCellColor(int row,
int col)
Gets the the specified grid cell color. |
LwTextRender |
getTextRender()
Gets the text render that is used as the grid cells view. |
LwView |
getView(int row,
int col,
java.lang.Object obj)
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LwDefViews
public LwDefViews()
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:
- Alignment.CENTER
- Alignment.LEFT
- Alignment.RIGHT
The implementation returns Alignment.CENTER as the horizontal alignment value.
- Specified by:
getXAlignment in interface LwGridViewProvider
- 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:
- Alignment.CENTER
- Alignment.TOP
- Alignment.BOTTOM
The implementation returns Alignment.CENTER as the vertical alignment value.
- Specified by:
getYAlignment in interface LwGridViewProvider
- 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. The implementation returns null
as the cell background color.
- Specified by:
getCellColor in interface LwGridViewProvider
- Parameters:
row - the specified cell row.col - the specified cell column.- Returns:
- a color.
getView
public LwView getView(int row,
int col,
java.lang.Object obj)
- Gets the view of the specified cell and the given data model value.
The implementation returns
LwTextRender as the view.
- Specified by:
getView in interface LwGridViewProvider
- Parameters:
row - the specified cell row.col - the specified cell column.obj - the specified data model value.- Returns:
- a view.
getTextRender
public LwTextRender getTextRender()
- Gets the text render that is used as the grid cells view.
- Returns:
- a text render.
Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org