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 |
getColPSWidth(int col)
Gets the specified column preferred width. |
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. |
int |
getRowHeight(int row)
Gets the specified row height. |
int |
getRowPSHeight(int row)
Gets the specified row preferred height. |
int |
getRowY(int row)
Gets the y coordinate of the specified grid row. |
int |
getXOrigin()
Returns an x origin of the grid component. |
int |
getYOrigin()
Returns an y origin of the grid component. |
boolean |
isUsePsMetric()
Gets the metric type. |
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. |
getColPSWidth
public int getColPSWidth(int col)
- Gets the specified column preferred width.
- Parameters:
col - the specified grid column.- Returns:
- a preferred width of the specified column.
getRowPSHeight
public int getRowPSHeight(int row)
- Gets the specified row preferred height.
- Parameters:
row - the specified grid row.- Returns:
- a preferred height of the specified row.
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.
getXOrigin
public int getXOrigin()
- Returns an x 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.
getYOrigin
public int getYOrigin()
- Returns an y 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.
isUsePsMetric
public boolean isUsePsMetric()
- Gets the metric type.
- Returns:
true if the preferred size metric type is used;
false otherwise.
|