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

java.lang.Object
  extended by net.rim.device.api.ui.component.table.TableModelChangeEvent
All Implemented Interfaces:
DataModelChangeEvent

public class TableModelChangeEvent
extends Object
implements DataModelChangeEvent

TableModelChangeEvent is a concrete class that describes the change event details sent to the recipient of a notification.

Since:
BlackBerry API 6.0.0

Field Summary
static int COLUMN_INSERTED
          An event type that signifies that a column has been inserted into the model.
static int COLUMN_REMOVED
          An event type that signifies that a column has been removed from the model.
static int COLUMN_UPDATED
          An event type that signifies that a column has been changed in the model.
static int ELEMENT_UPDATED
          An event type that signifies that an element has been changed in the model.
static int ROW_INSERTED
          An event type that signifies that a row has been inserted into the model.
static int ROW_REMOVED
          An event type that signifies that a row has been removed from the model.
static int ROW_UPDATED
          An event type that signifies that a row has been changed in the model.
 
Fields inherited from interface net.rim.device.api.ui.component.table.DataModelChangeEvent
MODEL_RESET
 
Constructor Summary
TableModelChangeEvent(int eventType, DataModel model, int rowIndex, int columnIndex)
          Create a TableModelChangeEvent to send to listeners as a notification of a model event occurring.
TableModelChangeEvent(int eventType, DataModel model, int rowIndex, int columnIndex, int elementCount)
          Create a TableModelChangeEvent to send to listeners as a notification of a model event occurring.
 
Method Summary
 int getColumnIndex()
          Get the column index that was modified.
 int getElementCount()
          Get the number of elements modified in the event.
 int getEventType()
          Get the event type for this event.
 DataModel getModel()
          Retrieve the model that generated the event.
 int getRowIndex()
          Get the row index that was modified.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

ELEMENT_UPDATED

public static final int ELEMENT_UPDATED
An event type that signifies that an element has been changed in the model.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ROW_INSERTED

public static final int ROW_INSERTED
An event type that signifies that a row has been inserted into the model.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ROW_REMOVED

public static final int ROW_REMOVED
An event type that signifies that a row has been removed from the model.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ROW_UPDATED

public static final int ROW_UPDATED
An event type that signifies that a row has been changed in the model.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

COLUMN_INSERTED

public static final int COLUMN_INSERTED
An event type that signifies that a column has been inserted into the model.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

COLUMN_REMOVED

public static final int COLUMN_REMOVED
An event type that signifies that a column has been removed from the model.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

COLUMN_UPDATED

public static final int COLUMN_UPDATED
An event type that signifies that a column has been changed in the model.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0


Constructor Detail

TableModelChangeEvent

public TableModelChangeEvent(int eventType,
                             DataModel model,
                             int rowIndex,
                             int columnIndex)
Create a TableModelChangeEvent to send to listeners as a notification of a model event occurring.

Parameters:
eventType - the type of change that occurred, one of DataModelChangeEvent.MODEL_RESET, TableModelChangeEvent.ELEMENT_UPDATED, TableModelChangeEvent.COLUMN_ADDED, TableModelChangeEvent.COLUMN_REMOVED, TableModelChangeEvent.COLUMN_UPDATED, TableModelChangeEvent.ROW_ADDED, TableModelChangeEvent.ROW_REMOVED or TableModelChangeEvent.ROW_UPDATED
model - the model that was updated
rowIndex - the row in the given model that was modified
columnIndex - the column in the given model that was modified
Since:
BlackBerry API 6.0.0

TableModelChangeEvent

public TableModelChangeEvent(int eventType,
                             DataModel model,
                             int rowIndex,
                             int columnIndex,
                             int elementCount)
Create a TableModelChangeEvent to send to listeners as a notification of a model event occurring.

Parameters:
eventType - the type of change that occurred, one of DataModelChangeEvent.MODEL_RESET, TableModelChangeEvent.ELEMENT_UPDATED, TableModelChangeEvent.COLUMN_ADDED, TableModelChangeEvent.COLUMN_REMOVED, TableModelChangeEvent.COLUMN_UPDATED, TableModelChangeEvent.ROW_ADDED, TableModelChangeEvent.ROW_REMOVED or TableModelChangeEvent.ROW_UPDATED
model - the model that was updated
rowIndex - the row in the given model that was modified
columnIndex - the column in the given model that was modified
elementCount - the number of rows or columns which have been updated in a batch operation. If elementCount < 1, the value of 1 is set.
Since:
BlackBerry API 7.0.0


Method Detail

getModel

public DataModel getModel()
Retrieve the model that generated the event.

Specified by:
getModel in interface DataModelChangeEvent
Returns:
the model that generated the event.
Since:
BlackBerry API 6.0.0

getRowIndex

public int getRowIndex()
Get the row index that was modified.

Returns:
the row index that was modified.
Since:
BlackBerry API 6.0.0

getColumnIndex

public int getColumnIndex()
Get the column index that was modified.

Returns:
the column index that was modified
Since:
BlackBerry API 6.0.0

getEventType

public int getEventType()
Get the event type for this event.

Specified by:
getEventType in interface DataModelChangeEvent
Returns:
the event type for this event.
Since:
BlackBerry API 6.0.0

getElementCount

public int getElementCount()
Get the number of elements modified in the event.

Returns:
the number of elements that were modified.
Since:
BlackBerry API 7.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