|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.ui.Field
net.rim.device.api.ui.ScrollView
net.rim.device.api.ui.Manager
net.rim.device.api.ui.component.table.DataView
public abstract class DataView
An abstract class defining the characteristics of the View portion of a Model-View-Controller structure for a list or table.
Implementations of DataView should handle painting, layout and focus events. It should listen for model changes
through a DataModelListener so it can update the data as the model changes.
| Field Summary |
|---|
| Fields inherited from class net.rim.device.api.ui.Manager |
|---|
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_MASK, HORIZONTAL_SCROLL_MASK, LEAVE_BLANK_SPACE, LEFTMOST, LEFTWARD, NO_HORIZONTAL_SCROLL, NO_HORIZONTAL_SCROLLBAR, NO_SCROLL_RESET, NO_VERTICAL_SCROLL, NO_VERTICAL_SCROLLBAR, QUANTA_FONT, RIGHTMOST, RIGHTWARD, TOPMOST, UPWARD, VERTICAL_SCROLL, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK, VERTICAL_SCROLL_MASK |
| Constructor Summary | ||
|---|---|---|
DataView()
Creates a DataView instance. |
||
DataView(DataModel model)
Creates a DataView instance. |
||
| Method Summary | ||
|---|---|---|
TableController |
getController()
Returns a reference to the controller to which the view delegates all input handling events. |
|
DataTemplate |
getDataTemplate()
Gets the default DataTemplate for all viewed rows. |
|
DataTemplate |
getDataTemplate(int rowIndex)
Gets the DataTemplate for a specified row. |
|
DataModel |
getModel()
Returns a reference to the model that this view is currently assigned to. |
|
void |
setController(TableController controller)
Records a reference to the controller to which the view delegates all input handling events. |
|
void |
setDataTemplate(DataTemplate template)
Sets the default DataTemplate for all viewed rows. |
|
void |
setDataTemplate(DataTemplate template,
int rowIndex)
Sets the assigned DataTemplate for a particular row in the DataModel. |
|
void |
setModel(DataModel model)
Assigns this DataView to a different DataModel. |
|
| Methods inherited from class net.rim.device.api.ui.ScrollView |
|---|
configurationChanged, getHorizontalAdjustment, getVerticalAdjustment, getVisibleHeight, getVisibleWidth, onDisplay, onExposed, onUndisplay, setCurrentLocation, setExtent, setHorizontalAdjustment, setHorizontalScroll, setHorizontalScroll, setScrollListener, setVerticalAdjustment, setVerticalScroll, setVerticalScroll, valueChanged, waitForScrolling |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataView()
public DataView(DataModel model)
model - An instance of a DataModel that will be associated with this new DataView| Method Detail |
|---|
public TableController getController()
public void setController(TableController controller)
controller - A reference to the controller to which the view delegates all input handling events.public DataModel getModel()
public void setModel(DataModel model)
model - New model to retrieve data from.public DataTemplate getDataTemplate()
public DataTemplate getDataTemplate(int rowIndex)
rowIndex - The index of the row for which the DataTemplate is required.
public void setDataTemplate(DataTemplate template)
template - A DataTemplate object containing display arrangement information.
Please note: Setting template to null will cause all rows that follow the default template
to not get represented in the View, since they will have no criteria for them to be laid out.
public void setDataTemplate(DataTemplate template,
int rowIndex)
template - A DataTemplate object containing display arrangement information.rowIndex - The index of the row in the DataModel to which the DataTemplate is being assigned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal