org.zaval.lw.grid
Interface LwGridMetrics

All Known Implementing Classes:
LwGrid

public interface LwGridMetrics

This interface is used to get values for basic metrical characteristics of the grid component. For example, it is possible to get columns widths or rows heights and so on. The interface is supposed to be used with components that implement decorative elements for the grid component (for example grid caption).


Method Summary
 java.awt.Insets getCellInsets()
          Gets the cells insets.
 CellsVisibility getCellsVisibility()
          Gets the grid visibility.
 int getColWidth(int col)
          Gets the specified column width.
 int getColX(int col)
          Gets the x coordinate of the specified grid column.
 int getGridCols()
          Gets the number of the grid columns.
 int getGridRows()
          Gets the number of the grid rows.
 int getNetGap()
          Gets the gap.
 java.awt.Point getOrigin()
          Returns an origin of the grid component.
 int getRowHeight(int row)
          Gets the specified row height.
 int getRowY(int row)
          Gets the y coordinate of the specified grid row.
 void setColWidth(int col, int w)
          Sets the specified width for the given column.
 void setRowHeight(int row, int h)
          Sets the specified height for the given row.
 

Method Detail

getGridRows

public int getGridRows()
Gets the number of the grid rows.
Returns:
a number of the grid rows.

getGridCols

public int getGridCols()
Gets the number of the grid columns.
Returns:
a number of the grid columns.

getRowHeight

public int getRowHeight(int row)
Gets the specified row height.
Parameters:
row - the specified grid row.
Returns:
a height of the specified row.

getColWidth

public int getColWidth(int col)
Gets the specified column width.
Parameters:
col - the specified grid column.
Returns:
a width of the specified column.

setRowHeight

public void setRowHeight(int row,
                         int h)
Sets the specified height for the given row.
Parameters:
row - the specified row.
h - the specified height.

setColWidth

public void setColWidth(int col,
                        int w)
Sets the specified width for the given column.
Parameters:
col - the specified column.
w - the specified width.

getOrigin

public java.awt.Point getOrigin()
Returns an origin of the grid component. The origin defines an offset of the component view relatively the component point of origin.
Returns:
an origin of the component.

getCellInsets

public java.awt.Insets getCellInsets()
Gets the cells insets. The insets defines top, left, right and bottom indents inside grid cells.
Returns:
a cells insets.

getNetGap

public int getNetGap()
Gets the gap. The gap defines size of area that is used to paint horizontal and vertical grid lines.
Returns:
a gap.

getColX

public int getColX(int col)
Gets the x coordinate of the specified grid column.
Parameters:
col - the specified column.
Returns:
a x coordinate of the specified grid column.

getRowY

public int getRowY(int row)
Gets the y coordinate of the specified grid row.
Parameters:
row - the specified row.
Returns:
an y coordinate of the specified grid row.

getCellsVisibility

public CellsVisibility getCellsVisibility()
Gets the grid visibility.
Returns:
a grid visibility.


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