Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.table.span
Class SpanModelEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.sciapp.table.span.SpanModelEvent
All Implemented Interfaces:
Serializable

public class SpanModelEvent
extends EventObject

An event used to identify which cells were merged or split.

SpanModelEvent contains the affected cellspan object. The type of the event is also specified. There are INSERT and DELETE events generated when inserting and deleting cell spans respectively. Also, UPDATE events indicate that there were a series of cell spans under the area specified by the event's cellspan object.

One of the usages of the SpanModelEvent is for the table to repaint the affected cell span area. This is handled automatically by SpanDrawer

See Also:
SpanModel, Serialized Form

Field Summary
protected  CellSpan cellSpan
          the event's cellspan.
static int DELETE
          identifies a DELETE event.
static int INSERT
          identifies an INSERT event.
protected  int type
          the event's type.
static int UPDATE
          identifies an UPDATE event.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SpanModelEvent(SpanModel source)
          Constructs an UPDATE SpanModelEvent with a cellspan covering all cells of the table.
SpanModelEvent(SpanModel source, CellSpan cellSpan, int type)
          Constructs an UPDATE SpanModelEvent having cellSpan as the cellspan and type as the type of the event (UPDATE, INSERT, DELETE).
 
Method Summary
 CellSpan getCellSpan()
          Returns the cellspan object of the event.
 int getType()
          Returns the type of the event.
 
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

cellSpan

protected CellSpan cellSpan
the event's cellspan.


type

protected int type
the event's type.


DELETE

public static final int DELETE
identifies a DELETE event.

See Also:
Constant Field Values

INSERT

public static final int INSERT
identifies an INSERT event.

See Also:
Constant Field Values

UPDATE

public static final int UPDATE
identifies an UPDATE event.

See Also:
Constant Field Values
Constructor Detail

SpanModelEvent

public SpanModelEvent(SpanModel source)
Constructs an UPDATE SpanModelEvent with a cellspan covering all cells of the table.


SpanModelEvent

public SpanModelEvent(SpanModel source,
                      CellSpan cellSpan,
                      int type)
Constructs an UPDATE SpanModelEvent having cellSpan as the cellspan and type as the type of the event (UPDATE, INSERT, DELETE).

Method Detail

getCellSpan

public CellSpan getCellSpan()
Returns the cellspan object of the event.

Returns:
the cellspan

getType

public int getType()
Returns the type of the event.

Returns:
the event type

Copyright © 2005 Scientific Applications. All Rights Reserved.