tico.board.events
Class ProjectChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by tico.board.events.ProjectChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class ProjectChangeEvent
extends java.util.EventObject

A semantic event which indicates that a change on a project occured. This event is generated by a TProject when the change occurs. The event is passed to every every ProjectChangeListener object that registered to receive such events using the component's addProjectChangeListener method. The object that implements the ProjectChangeListener interface gets this ProjectChangeEvent when the event occurs.

Version:
1.0 Nov 20, 2006
Author:
Pablo Muñoz
See Also:
Serialized Form

Field Summary
static int BOARD_ADDED
          A board has been added.
static int BOARD_MODIFIED
          A board has been modified.
static int BOARD_REMOVED
          A board has been removed.
static int INITIAL_BOARD_CHANGED
          Change in the TProject initial board.
static int NAME_CHANGED
          Change in the TProject name.
 
Constructor Summary
ProjectChangeEvent(java.lang.Object source, TBoard changedBoard, int change)
          Constructs an ProjectChangeEvent object.
 
Method Summary
 int getChange()
          Returns the change.
 TBoard getChangedBoard()
          Returns the changed board.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BOARD_MODIFIED

public static int BOARD_MODIFIED
A board has been modified.


BOARD_ADDED

public static int BOARD_ADDED
A board has been added.


BOARD_REMOVED

public static int BOARD_REMOVED
A board has been removed.


NAME_CHANGED

public static int NAME_CHANGED
Change in the TProject name. This implies that no TBoard suffers a change, so the changeBoard will be null.


INITIAL_BOARD_CHANGED

public static int INITIAL_BOARD_CHANGED
Change in the TProject initial board. This implies that no TBoard suffers a change, so the changeBoard will be null.

Constructor Detail

ProjectChangeEvent

public ProjectChangeEvent(java.lang.Object source,
                          TBoard changedBoard,
                          int change)
Constructs an ProjectChangeEvent object.

Parameters:
source - The object that originated the event
changedBoard - The board received the change
change - The change. This value must be NAME_CHANGED, BOARD_REMOVED, BOARD_ADDED or BOARD_MODIFIED
Method Detail

getChangedBoard

public TBoard getChangedBoard()
Returns the changed board. If the change is NAME_CHANGED the board is null.

Returns:
The changed board.

getChange

public int getChange()
Returns the change.

Returns:
The change. This value can be NAME_CHANGED, BOARD_REMOVED, BOARD_ADDED or BOARD_MODIFIED