|
|||||||||
| 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.DataController
net.rim.device.api.ui.component.table.TableController
public class TableController
A controller class for table components. Implementations of TableController should handle user input and programmatic requests by notifying the model of possible changes, e.g. updating the contents of a table row. It may also be necessary for the controller to modify the view directly, e.g. visual state changes such as focus. Each TableController must provide references to a DataModel and a DataView.
| Field Summary | ||
|---|---|---|
static int |
FIELD_FOCUS
A focus policy that ensures that Data Records (shaped by a Data Template) do not receive focus as a whole. |
|
static int |
REGION_FOCUS
A focus policy that ensures that Data Records (shaped by a Data Template) do not receive focus as a whole. |
|
static int |
ROW_FOCUS
A focus policy that ensures that only the Data Records (shaped by a Data Template) receive focus in the form of background focus that appears behind the area defined by the Data Template. |
|
| Constructor Summary | ||
|---|---|---|
TableController(AbstractTableModel model,
DataView view)
Create a TableController for the given model and view. |
||
TableController(AbstractTableModel model,
DataView view,
int focusPolicy)
Create a TableController for the given model and view. |
||
| Method Summary | ||
|---|---|---|
void |
moveFocus(int x,
int y,
int status,
int time)
Moves focus to an exact position within this manager. |
|
protected boolean |
navigationMovement(int dx,
int dy,
int status,
int time)
Move the Table Field focus from one data template to the next one to be focused vertically. |
|
protected boolean |
navigationUnclick(int status,
int time)
handle the navigation unclick event by invoking the command handler if it is set. |
|
void |
setCommand(CommandHandler command,
ReadOnlyCommandMetadata metadata,
Object context)
Set the command that will be executed on navigation click and touch click events. |
|
void |
setFocusPolicy(int newFocusPolicy)
Sets the current focus policy of this Table object. |
|
protected boolean |
touchEvent(TouchEvent message)
Handles touch input events (see TouchEvent). |
|
| Methods inherited from class net.rim.device.api.ui.component.table.DataController |
|---|
getModel, getView, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, makeMenu, moveFocus, navigationClick, setModel, setView |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FIELD_FOCUS
public static final int ROW_FOCUS
public static final int REGION_FOCUS
DataTemplate.createRegion(XYRect) or DataTemplate.createRegion(XYRect, RegionStyles).
| Constructor Detail |
|---|
public TableController(AbstractTableModel model,
DataView view)
model - the data model that contains the data that is displayed in the tableview - the view that displays the data in the model
public TableController(AbstractTableModel model,
DataView view,
int focusPolicy)
model - the data model that contains the data that is displayed in the tableview - the view that displays the data in the modelfocusPolicy - the focus policy that this TableController will follow.
Acceptable focusPolicy values are: TableController.FIELD_FOCUS,
TableController.ROW_FOCUS or TableController.REGION_FOCUS| Method Detail |
|---|
public void moveFocus(int x,
int y,
int status,
int time)
x - Distance from left edge of virtual region.y - Distance from top edge of virtual region.status - Trackwheel event modifiers.time - Number of milliseconds since the device was turned on.public void setFocusPolicy(int newFocusPolicy)
newFocusPolicy - Acceptable values are: TableController.FIELD_FOCUS,
TableController.ROW_FOCUS or TableController.REGION_FOCUSprotected boolean touchEvent(TouchEvent message)
TouchEvent).
The coordinates reflect the location of the touch event with respect to the top-left of this Manager.
The x, y coordinates are then further mapped to the top-left corner of the field with input.
touchEvent in class DataControllermessage - TouchEvent object containing various input parameters
including the event type and touch coordinates.
IllegalArgumentException - If message is null.
protected boolean navigationMovement(int dx,
int dy,
int status,
int time)
navigationMovement in class DataControllerdx - Magnitude of navigational motion: negative for a move left and
postive for a move right.dy - Magnitude of navigational motion: negative for an upwards move,
and positive for a downwards move.status - Bitfield of values defined by KeypadListener.time - Number of milliseconds since the device was turned on.
protected boolean navigationUnclick(int status,
int time)
navigationUnclick in class DataControllerstatus - Bitfield of values defined by KeypadListener.time - Number of milliseconds since the device was turned on.
public void setCommand(CommandHandler command,
ReadOnlyCommandMetadata metadata,
Object context)
command - the command to be executed.metadata - the metadata to be sent when the command is executedcontext - the context to be sent whent he command is executed
|
|||||||||
| 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.