net.rim.device.api.ui.component.table
Class DataView

java.lang.Object
  extended by net.rim.device.api.ui.Field
      extended by net.rim.device.api.ui.ScrollView
          extended by net.rim.device.api.ui.Manager
              extended by net.rim.device.api.ui.component.table.DataView
All Implemented Interfaces:
AdjustmentListener
Direct Known Subclasses:
TableView

public abstract class DataView
extends Manager

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.

Since:
BlackBerry API 6.0.0

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
 
Fields inherited from class net.rim.device.api.ui.Field
ACTION_INVOKE, AXIS_HORIZONTAL, AXIS_SEQUENTIAL, AXIS_VERTICAL, EDITABLE, EDITABLE_MASK, FIELD_BOTTOM, FIELD_HALIGN_MASK, FIELD_HCENTER, FIELD_LEADING, FIELD_LEFT, FIELD_RIGHT, FIELD_TOP, FIELD_TRAILING, FIELD_VALIGN_MASK, FIELD_VCENTER, FOCUSABLE, FOCUSABLE_MASK, HIGHLIGHT_FOCUS, HIGHLIGHT_SELECT, NON_FOCUSABLE, NON_SPELLCHECKABLE, READONLY, SPELLCHECKABLE, SPELLCHECKABLE_MASK, STATUS_MOVE_FOCUS_HORIZONTALLY, STATUS_MOVE_FOCUS_VERTICALLY, USE_ALL_HEIGHT, USE_ALL_WIDTH, VISUAL_STATE_ACTIVE, VISUAL_STATE_DISABLED, VISUAL_STATE_DISABLED_FOCUS, VISUAL_STATE_FOCUS, VISUAL_STATE_NORMAL
 
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.Manager
add, addAll, cursorClick, cursorMovement, cursorUnclick, delete, deleteAll, deleteRange, getAccessibleContext, getField, getFieldAtLocation, getFieldCount, getFieldWithFocus, getFieldWithFocusIndex, getFocusRect, getHorizontalScroll, getLeafFieldWithFocus, getPreferredHeightOfChild, getPreferredWidthOfChild, getVerticalScroll, getVirtualHeight, getVirtualWidth, insert, insertAll, invalidate, invalidate, invalidateFieldRange, invokeAction, isDataValid, isDirty, isDownArrowShown, isFocusable, isMuddy, isSelecting, isUpArrowShown, isValidLayout, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, layout, layoutChild, makeMenu, moveFocus, moveFocus, navigationClick, navigationMovement, navigationUnclick, nextFocus, nextFocus, onFocus, onUnfocus, paint, paintChild, replace, setDirty, setFocus, setHorizontalQuantization, setPositionChild, setScrollingInertial, setVerticalQuantization, setVirtualExtent, shouldCursorScroll, sublayout, subpaint, touchEvent, trackwheelClick, trackwheelUnclick
 
Methods inherited from class net.rim.device.api.ui.ScrollView
configurationChanged, getHorizontalAdjustment, getVerticalAdjustment, getVisibleHeight, getVisibleWidth, onExposed, setCurrentLocation, setExtent, setHorizontalAdjustment, setHorizontalScroll, setHorizontalScroll, setScrollListener, setVerticalAdjustment, setVerticalScroll, setVerticalScroll, valueChanged, waitForScrolling
 
Methods inherited from class net.rim.device.api.ui.Field
drawFocus, drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getCommandItemProvider, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFont, getHeight, getIndex, getLeft, getManager, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getOriginal, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPreferredHeight, getPreferredWidth, getScreen, getStyle, getTextFillColor, getTextStrokeColor, getTop, getVisualState, getWidth, invalidateAll, isEditable, isEnabled, isFocus, isLeftToRight, isPasteable, isScrollCopyable, isSelectable, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, makeContextMenu, onDisplay, onMenuDismissed, onMenuDismissed, onObscured, onUndisplay, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCommandItemProvider, setCookie, setEditable, setEnabled, setFocus, setFocusListener, setFont, setFont, setMargin, setMargin, setMuddy, setNonSpellCheckable, setPadding, setPadding, setPosition, setVisualState, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

DataView

public DataView()
Creates a DataView instance.

Since:
BlackBerry API 6.0.0

DataView

public DataView(DataModel model)
Creates a DataView instance.

Parameters:
model - An instance of a DataModel that will be associated with this new DataView
Since:
BlackBerry API 6.0.0


Method Detail

getController

public TableController getController()
Returns a reference to the controller to which the view delegates all input handling events.

Returns:
A reference to the controller to which the view delegates all input handling events.
Since:
BlackBerry API 6.0.0

setController

public void setController(TableController controller)
Records a reference to the controller to which the view delegates all input handling events.

Parameters:
controller - A reference to the controller to which the view delegates all input handling events.
Since:
BlackBerry API 6.0.0

getModel

public DataModel getModel()
Returns a reference to the model that this view is currently assigned to.

Returns:
Reference to an instance of a DataModel implementation.
Since:
BlackBerry API 6.0.0

setModel

public void setModel(DataModel model)
Assigns this DataView to a different DataModel. Calling this will result in the following:

Parameters:
model - New model to retrieve data from.
Since:
BlackBerry API 6.0.0

getDataTemplate

public DataTemplate getDataTemplate()
Gets the default DataTemplate for all viewed rows.

Returns:
The current default DataTemplate object for the DataView.
Since:
BlackBerry API 6.0.0

getDataTemplate

public DataTemplate getDataTemplate(int rowIndex)
Gets the DataTemplate for a specified row.

Parameters:
rowIndex - The index of the row for which the DataTemplate is required.
Returns:
The current DataTemplate object for a specified DataModel row.
Since:
BlackBerry API 6.0.0

setDataTemplate

public void setDataTemplate(DataTemplate template)
Sets the default DataTemplate for all viewed rows.

Parameters:
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.
Since:
BlackBerry API 6.0.0

setDataTemplate

public void setDataTemplate(DataTemplate template,
                            int rowIndex)
Sets the assigned DataTemplate for a particular row in the DataModel.

Parameters:
template - A DataTemplate object containing display arrangement information.
rowIndex - The index of the row in the DataModel to which the DataTemplate is being assigned.
Since:
BlackBerry API 6.0.0





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