JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class JCTableDataEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.klg.jclass.table.JCTableDataEvent
All Implemented Interfaces:
Serializable

public class JCTableDataEvent
extends EventObject

TableDataEvent objects describe changes to a TableDataModel object.

See Also:
TableDataModel, JCTableDataListener, Serialized Form

Field Summary
static int ADD_COLUMN
          Indicates that one or more columns have been added to the data source.
static int ADD_ROW
          Indicates that one or more rows have been added to the data source.
static int CHANGE_COLUMN
          Indicates that a column has changed one or more of its values in the data source.
static int CHANGE_COLUMN_LABEL
          Indicates that a column label has changed in the data source.
static int CHANGE_ROW
          Indicates that a row has changed one or more of its values in the data source.
static int CHANGE_ROW_LABEL
          Indicates that a row label has changed in the data source.
static int CHANGE_VALUE
          Indicates that a cell value has changed in the data source.
protected  int column
           
protected  int command
           
protected  int destination
           
static int MOVE_COLUMN
          Indicates that one or more columns have moved in the data source.
static int MOVE_ROW
          Indicates that one or more rows have moved in the data source.
protected  int num_affected
           
static int NUM_COLUMNS
          Indicates that the number of columns in the data source has changed.
static int NUM_ROWS
          Indicates that the number of rows in the data source has changed.
static int REMOVE_COLUMN
          Indicates that one or more column have been deleted from the data source.
static int REMOVE_ROW
          Indicates that one or more rows have been deleted from the data source.
static int RESET
          Indicates that table should reset all data values based on changes in the data source.
protected  int row
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
JCTableDataEvent(Object source, int row, int column, int num_affected, int destination, int command)
          The event posted when a change is made to the data source.
 
Method Summary
 int getColumn()
          Returns the column that was changed.
 int getCommand()
          Returns the command that generated the event.
 int getDestination()
          For MOVE events, indicates the destination location.
 int getNumAffected()
          Returns the number of rows or columns affected.
 int getRow()
          Returns the row that was changed.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CHANGE_VALUE

public static final int CHANGE_VALUE
Indicates that a cell value has changed in the data source.

See Also:
Constant Field Values

CHANGE_ROW

public static final int CHANGE_ROW
Indicates that a row has changed one or more of its values in the data source.

See Also:
Constant Field Values

ADD_ROW

public static final int ADD_ROW
Indicates that one or more rows have been added to the data source.

See Also:
Constant Field Values

REMOVE_ROW

public static final int REMOVE_ROW
Indicates that one or more rows have been deleted from the data source.

See Also:
Constant Field Values

CHANGE_COLUMN

public static final int CHANGE_COLUMN
Indicates that a column has changed one or more of its values in the data source.

See Also:
Constant Field Values

ADD_COLUMN

public static final int ADD_COLUMN
Indicates that one or more columns have been added to the data source.

See Also:
Constant Field Values

REMOVE_COLUMN

public static final int REMOVE_COLUMN
Indicates that one or more column have been deleted from the data source.

See Also:
Constant Field Values

CHANGE_ROW_LABEL

public static final int CHANGE_ROW_LABEL
Indicates that a row label has changed in the data source.

See Also:
Constant Field Values

CHANGE_COLUMN_LABEL

public static final int CHANGE_COLUMN_LABEL
Indicates that a column label has changed in the data source.

See Also:
Constant Field Values

MOVE_ROW

public static final int MOVE_ROW
Indicates that one or more rows have moved in the data source.

See Also:
Constant Field Values

MOVE_COLUMN

public static final int MOVE_COLUMN
Indicates that one or more columns have moved in the data source.

See Also:
Constant Field Values

NUM_ROWS

public static final int NUM_ROWS
Indicates that the number of rows in the data source has changed.

See Also:
Constant Field Values

NUM_COLUMNS

public static final int NUM_COLUMNS
Indicates that the number of columns in the data source has changed.

See Also:
Constant Field Values

RESET

public static final int RESET
Indicates that table should reset all data values based on changes in the data source.

See Also:
Constant Field Values

row

protected int row

column

protected int column

num_affected

protected int num_affected

destination

protected int destination

command

protected int command
Constructor Detail

JCTableDataEvent

public JCTableDataEvent(Object source,
                        int row,
                        int column,
                        int num_affected,
                        int destination,
                        int command)
The event posted when a change is made to the data source.

Parameters:
source - The data source
row - the row number associated with changed data
column - the column number associated with changed data
num_affected - for MOVE_ROW, MOVE_COLUMN, REMOVE_ROW and REMOVE_COLUMN, the number or rows or columns affected
destination - for MOVE_ROW and MOVE_COLUMN, the destination row/column before which the insert occurs
command - The type of change. Possible values are:
TableDataEvent.CHANGE_VALUEA single cell has changed
TableDataEvent.CHANGE_ROWA single row has changed
TableDataEvent.ADD_ROWOne or more rows have been added
TableDataEvent.REMOVE_ROWOne or more rows have been deleted
TableDataEvent.CHANGE_COLUMNA single column has changed
TableDataEvent.ADD_COLUMNOne or more columns have been added
TableDataEvent.REMOVE_COLUMNOne or more columns have been deleted
TableDataEvent.CHANGE_ROW_LABELA single row label has changed
TableDataEvent.CHANGE_COLUMN_LABELA single column label has changed
TableDataEvent.MOVE_ROWOne or more rows have been moved
TableDataEvent.MOVE_COLUMNOne or more columns have been moved
TableDataEvent.NUM_ROWSThe number of rows has changed
TableDataEvent.NUM_COLUMNSThe number of columns has changed
TableDataEvent.RESETRecalculation and repaint of the table is required
See Also:
TableDataModel.addTableDataListener(com.klg.jclass.table.JCTableDataListener), JCTableDataAdapter, JCTableDataListener
Method Detail

getRow

public int getRow()
Returns the row that was changed.

Returns:
changed row

getColumn

public int getColumn()
Returns the column that was changed.

Returns:
changed column

getNumAffected

public int getNumAffected()
Returns the number of rows or columns affected.

Returns:
number of rows or columns affected

getDestination

public int getDestination()
For MOVE events, indicates the destination location. Rows/columns are inserted to the left (or above) the destination.

Returns:

getCommand

public int getCommand()
Returns the command that generated the event. Valid commands include
 Commands:
TableDataEvent.CHANGE_VALUE
TableDataEvent.CHANGE_ROW
TableDataEvent.ADD_ROW
TableDataEvent.REMOVE_ROW
TableDataEvent.CHANGE_COLUMN
TableDataEvent.ADD_COLUMN
TableDataEvent.REMOVE_COLUMN
TableDataEvent.CHANGE_ROW_LABEL
TableDataEvent.CHANGE_COLUMN_LABEL
TableDataEvent.MOVE_ROW
TableDataEvent.MOVE_COLUMN
TableDataEvent.NUM_ROWS
TableDataEvent.NUM_COLUMNS
TableDataEvent.RESET
 

Returns:
command that generated the event

Copyright © 2004 Quest Software Inc..
All rights reserved.