com.eliad.model
Class StyleModelEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.eliad.model.StyleModelEvent

public class StyleModelEvent
extends java.util.EventObject

Events corresponding to changes in a StyleModel. Those may be: Renderer and/or Editor changed in some cells

Version:
1.0 00/05/11
Author:
Stephan Szymkowicz
See Also:
Serialized Form

Field Summary
static int ALL_EDITORS_CHANGED
          Identifies a change to all existing editor(s)
static int ALL_RENDERERS_CHANGED
          Identifies a change to all existing renderer(s)
static int EDITOR_DELETED
          Identifies the removal of editor(s)
static int EDITOR_INSERTED
          Identifies the addition of new Renderer
static int EDITOR_UPDATED
          Identifies a change to some existing editor(s)
static int MODEL_CHANGED
          Identifies a change to the whole model
static int RENDERER_DELETED
          Identifies the removal of renderer(s)
static int RENDERER_INSERTED
          Identifies the addition of new Renderer
static int RENDERER_UPDATED
          Identifies a change to some existing renderer(s)
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
StyleModelEvent(StyleModel source, int type, int firstRow, int firstColumn, int rowCount, int columnCount)
           
 
Method Summary
 int getColumnCount()
          The number of continuous columns where modifications took place.
 int getFirstColumn()
          The first column where a modification took place.
 int getFirstRow()
          The first row where a modification took place.
 int getLastColumn()
          The last column where a modification took place.
 int getLastRow()
          The last row where a modification took place.
 int getRowCount()
          The number of continuous rows where modifications took place.
 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

MODEL_CHANGED

public static final int MODEL_CHANGED
Identifies a change to the whole model

ALL_RENDERERS_CHANGED

public static final int ALL_RENDERERS_CHANGED
Identifies a change to all existing renderer(s)

RENDERER_UPDATED

public static final int RENDERER_UPDATED
Identifies a change to some existing renderer(s)

RENDERER_INSERTED

public static final int RENDERER_INSERTED
Identifies the addition of new Renderer

RENDERER_DELETED

public static final int RENDERER_DELETED
Identifies the removal of renderer(s)

ALL_EDITORS_CHANGED

public static final int ALL_EDITORS_CHANGED
Identifies a change to all existing editor(s)

EDITOR_UPDATED

public static final int EDITOR_UPDATED
Identifies a change to some existing editor(s)

EDITOR_INSERTED

public static final int EDITOR_INSERTED
Identifies the addition of new Renderer

EDITOR_DELETED

public static final int EDITOR_DELETED
Identifies the removal of editor(s)
Constructor Detail

StyleModelEvent

public StyleModelEvent(StyleModel source,
                       int type,
                       int firstRow,
                       int firstColumn,
                       int rowCount,
                       int columnCount)
Method Detail

getType

public int getType()
Returns the type of the event.
Returns:
An integer identifying the type of the event. This must be one of the values:

getFirstRow

public int getFirstRow()
The first row where a modification took place. Only meaningful for RENDERER_UPDATED and EDITOR_UPDATED
Returns:
The first row where a renderer or an editor was updated.
Preconditions:
getType() == RENDERER_UPDATED || getType() == EDITOR_UPDATED
Postconditions:
return >= 0

getFirstColumn

public int getFirstColumn()
The first column where a modification took place. Only meaningful for RENDERER_UPDATED and EDITOR_UPDATED
Returns:
The first column where a renderer or an editor was updated.
Preconditions:
getType() == RENDERER_UPDATED || getType() == EDITOR_UPDATED
Postconditions:
return >= 0

getRowCount

public int getRowCount()
The number of continuous rows where modifications took place. Only meaningful for RENDERER_UPDATED and EDITOR_UPDATED
Returns:
The number of row where renderers or editors were updated.
Preconditions:
getType() == RENDERER_UPDATED || getType() == EDITOR_UPDATED
Postconditions:
return > 0

getColumnCount

public int getColumnCount()
The number of continuous columns where modifications took place. Only meaningful for RENDERER_UPDATED and EDITOR_UPDATED
Returns:
The number of columns where renderers or editors were updated.
Preconditions:
getType() == RENDERER_UPDATED || getType() == EDITOR_UPDATED
Postconditions:
return > 0

getLastRow

public int getLastRow()
The last row where a modification took place. Only meaningful for RENDERER_UPDATED and EDITOR_UPDATED
Returns:
The last row where a renderer or an editor was updated.
Preconditions:
getType() == RENDERER_UPDATED || getType() == EDITOR_UPDATED
Postconditions:
return > getFirstRow()

getLastColumn

public int getLastColumn()
The last column where a modification took place. Only meaningful for RENDERER_UPDATED and EDITOR_UPDATED
Returns:
The last column where a renderer or an editor was updated.
Preconditions:
getType() == RENDERER_UPDATED || getType() == EDITOR_UPDATED
Postconditions:
return > getFirstColumn()