DESY ACOP Beans Home

com.cosylab.gui.components.table
Class TableRowModelEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.cosylab.gui.components.table.TableRowModelEvent
All Implemented Interfaces:
java.io.Serializable

public class TableRowModelEvent
extends java.util.EventObject

TableRowModelEvent contains information about changes in TableRowModel.

Since:
May 3, 2004.
Version:
$Id: TableRowModelEvent.java,v 1.6 2008-04-22 12:28:40 jbobnar Exp $
Author:
Igor Kriznar
See Also:
Serialized Form

Field Summary
static int ALL_VALUES
          Identifies element index which applies for all row elements.
static int DELETE
          Identifies the removal of rows.
static int HEADER_ROW
          Identifies structural change.
static int INSERT
          Identifies the addtion of new rows.
static int UPDATE
          Identifies a change to existing data.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TableRowModelEvent(TableRow[] sources, int value, int type)
          Creates new event.
TableRowModelEvent(TableRow source, int index)
          Creates new event with row as source, column value is by default ALL_VALUES and type is UPDATE.
TableRowModelEvent(TableRow source, int index, int value)
          Creates new event with row as source and value index, type is UPDATE..
TableRowModelEvent(TableRow source, int index, int value, int type)
          Creates new event.
 
Method Summary
 TableRow getRow()
          Returns row, which was source of event.
 int getRowIndex()
          Returns the index of rowinside parent model.
 TableRow[] getRows()
          Returns array of rows, which are source of this event.
 int getType()
          Returns type of event, valid value is INSERT, DELETE and UPDATE.
 int getValue()
          Returns index of value for which event applies
 java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HEADER_ROW

public static final int HEADER_ROW
Identifies structural change.

See Also:
Constant Field Values

ALL_VALUES

public static final int ALL_VALUES
Identifies element index which applies for all row elements.

See Also:
Constant Field Values

INSERT

public static final int INSERT
Identifies the addtion of new rows.

See Also:
Constant Field Values

UPDATE

public static final int UPDATE
Identifies a change to existing data.

See Also:
Constant Field Values

DELETE

public static final int DELETE
Identifies the removal of rows.

See Also:
Constant Field Values
Constructor Detail

TableRowModelEvent

public TableRowModelEvent(TableRow source,
                          int index)
Creates new event with row as source, column value is by default ALL_VALUES and type is UPDATE.

Parameters:
source -
index - the index of row in parent model

TableRowModelEvent

public TableRowModelEvent(TableRow source,
                          int index,
                          int value)
Creates new event with row as source and value index, type is UPDATE..

Parameters:
source - table row as source
index - the index of row in parent model
value - the value index
Throws:
java.lang.IllegalArgumentException - if value isless then -1

TableRowModelEvent

public TableRowModelEvent(TableRow source,
                          int index,
                          int value,
                          int type)
Creates new event.

Parameters:
source - table row as source
index - the index of row in parent model
value - the value index
type - the type of event
Throws:
java.lang.IllegalArgumentException - if type is not one of INSERT, DELETE or UPDATE values

TableRowModelEvent

public TableRowModelEvent(TableRow[] sources,
                          int value,
                          int type)
Creates new event.

Parameters:
sources - table row as source
value - the value index
type - the type of event
Method Detail

getValue

public int getValue()
Returns index of value for which event applies

Returns:
the value index

getType

public int getType()
Returns type of event, valid value is INSERT, DELETE and UPDATE.

Returns:
the type of event

getRow

public TableRow getRow()
Returns row, which was source of event. If there is more rows as source, first row is returned

Returns:
the event source

getRows

public TableRow[] getRows()
Returns array of rows, which are source of this event.

Returns:
the sources of event

getRowIndex

public int getRowIndex()
Returns the index of rowinside parent model.

Returns:
the index of rowinside parent model

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject


Copyright © 2010. All Rights Reserved.