: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
Screen Shots
On-line Demos
Requirements
Further Plans
Docs
Tutorial
How-to (PDF)
API
FAQ
Download
Latest version

Home > J2SE > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

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 an implementation of the LwGridViewProvider interface where the LwTextRender view with the single line text model is used to render grid cells.


Constructor Summary
LwDefViews()
           
 
Method Summary
 java.awt.Color getCellColor(int row, int col)
          Gets 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
 

Constructor Detail

LwDefViews

public LwDefViews()
Method Detail

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
The implementation returns LwToolkit.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:
  • LwToolkit.CENTER
  • LwToolkit.TOP
  • LwToolkit.BOTTOM
The implementation returns LwToolkit.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 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 or the specified data model value if it is instance of the LwView class .
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.


: up