|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.component.table.DataTemplate
public abstract class DataTemplate
Define a repeating layout of fields from data obtained from the model associated with the DataTemplate's view.
Constructor Summary | ||
---|---|---|
DataTemplate(DataView view,
int rows,
int columns)
Create a DataTemplate for the provided view that has the provided number of rows and columns. |
Method Summary | ||
---|---|---|
int |
createRegion(XYRect rect)
Create a region that can span rows and or columns using the default style. |
|
int |
createRegion(XYRect rect,
RegionStyles style)
Create a region that can span rows and or columns using the specified style. |
|
TemplateColumnProperties |
getColumnProperties(int columnIndex)
Get the column properties for the provided column. |
|
abstract Field[] |
getDataFields(int modelRowIndex)
Get the required fields that contain the data in the provided model row. |
|
int |
getNumberOfColumns()
Get the number of columns in the DataTemplate. |
|
int |
getNumberOfRegions()
Get the number of regions in the DataTemplate. |
|
int |
getNumberOfRows()
Get the number of rows in the DataTemplate. |
|
TemplateRowProperties |
getRowProperties(int rowIndex)
Get the row properties for the provided row. |
|
protected DataView |
getView()
Get the view for the the DataTemplate. |
|
boolean |
isFixedHeight()
Check if fixed height is enabled or disabled. |
|
void |
setColumnProperties(int columnIndex,
TemplateColumnProperties properties)
Set the column properties for the provided column. |
|
void |
setPosition(int regionIndex,
int x,
int y)
Set the position of the field at the provided regionIndex to x,y. |
|
void |
setRowProperties(int rowIndex,
TemplateRowProperties properties)
Set the row properties for the provided row. |
|
void |
useFixedHeight(boolean status)
Enable and disable fixed height. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataTemplate(DataView view, int rows, int columns)
view
- the DataView that will use this template to DataTemplate to arrange fields that contain the data in the modelrows
- the number of rows in the repeating patterncolumns
- the number of columns in the repeating pattern
IllegalArgumentException
- thrown if rows or columns is a number less then 0.Method Detail |
---|
public int createRegion(XYRect rect, RegionStyles style)
rect
- a container of data that describes the root of a region and the number of rows and columns
that are spanned by this region, rect.x and rect.y is the upper left corner of the region in terms of
rows and columns, rect.width is the number of spanned columns, and rect.height is the number of spanned rows.style
- the RegionSytle to use for this region.
public int createRegion(XYRect rect)
rect
- a container of data that describes the root of a region and the number of rows and columns
that are spanned by this region, rect.x and rect.y is the upper left corner of the region in terms of
rows and columns, rect.width is the number of spanned columns, and rect.height is the number of spanned rows.
public abstract Field[] getDataFields(int modelRowIndex)
TableModel
for the Java
Object stored at that row index.
Please note that it is permissible for null objects to exist as individual table model cells.
There is no need to deal with the case of an entire model row being null because it is not
permissible in the TableModel
to specify an entire model row as null.
Please note that the Field[] that is returned by this call must not have any null
entries, consider the use of a { @link NullField } object in such situations.
modelRowIndex
- the model row number that the returned fields contain
public TemplateColumnProperties getColumnProperties(int columnIndex)
columnIndex
- the column number to get the column properties for
IllegalArgumentException
- If columnIndex
is less
than 0
or greater than or equal to the number of columns.
IllegalStateException
- If TemplateRowProperties is set to null for
rowIndex
public void setColumnProperties(int columnIndex, TemplateColumnProperties properties)
columnIndex
- the column number to set the column properties forproperties
- the properties to be set for the provided column number
IllegalArgumentException
- If columnIndex
is less
than 0
or greater than or equal to the number of columns.public TemplateRowProperties getRowProperties(int rowIndex)
rowIndex
- the row number to get the row properties for
IllegalArgumentException
- If rowIndex
is less than
0
or greater than or equal to the number of rows.
IllegalStateException
- If TemplateRowProperties is set to null for
rowIndex
public void setRowProperties(int rowIndex, TemplateRowProperties properties)
rowIndex
- the column number to set the row properties forproperties
- the properties to be set for the provided row number
IllegalArgumentException
- If rowIndex
is less than
0
or greater than or equal to the number of rows.public void setPosition(int regionIndex, int x, int y)
regionIndex
- the region number that contains the field to be positionedx
- the x positiony
- the y position
IllegalArgumentException
- if the regionIndex provided is not a valid region index value (either negative or too large)public int getNumberOfRows()
public int getNumberOfColumns()
public int getNumberOfRegions()
protected DataView getView()
public boolean isFixedHeight()
public void useFixedHeight(boolean status)
status
- if true then the height of a field is limited to the height set in the row
properties, otherwise the field can grow or shrink
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.