net.sourceforge.pmd.util.viewer.model

Class ViewerModelEvent

public class ViewerModelEvent extends Object

The event which will be sent every time the model changes

Note: the instances will be immutable

Version: $Id: ViewerModelEvent.java,v 1.7 2006/02/10 14:15:31 tomcopeland Exp $

Author: Boris Gruschko ( boris at gruschko.org )

Field Summary
static intCODE_RECOMPILED
reason in the case of code recompilation
static intNODE_SELECTED
reason in the case of node selection
static intPATH_EXPRESSION_APPENDED
reason in the case of path extension
static intPATH_EXPRESSION_EVALUATED
reason in the case of path expression evaluation
Constructor Summary
ViewerModelEvent(Object source, int reason)
Creates an event
ViewerModelEvent(Object source, int reason, Object parameter)
Creates an event
Method Summary
ObjectgetParameter()
intgetReason()
ObjectgetSource()

Field Detail

CODE_RECOMPILED

public static final int CODE_RECOMPILED
reason in the case of code recompilation

NODE_SELECTED

public static final int NODE_SELECTED
reason in the case of node selection

PATH_EXPRESSION_APPENDED

public static final int PATH_EXPRESSION_APPENDED
reason in the case of path extension

PATH_EXPRESSION_EVALUATED

public static final int PATH_EXPRESSION_EVALUATED
reason in the case of path expression evaluation

Constructor Detail

ViewerModelEvent

public ViewerModelEvent(Object source, int reason)
Creates an event

Parameters: source event's source reason event's reason

ViewerModelEvent

public ViewerModelEvent(Object source, int reason, Object parameter)
Creates an event

Parameters: source event's source reason event's reason parameter parameter object

Method Detail

getParameter

public Object getParameter()

getReason

public int getReason()

getSource

public Object getSource()