org.eclipse.wst.common.frameworks.datamodel
Class DataModelEvent

java.lang.Object
  extended by org.eclipse.wst.common.frameworks.datamodel.DataModelEvent

public final class DataModelEvent
extends java.lang.Object

This event is used to communicate property changes from IDataModels to their IDataModelListeners.

This class may be instantiated; it is not intended to be subclassed.

Since:
1.0
See Also:
IDataModel.addListener(IDataModelListener), IDataModelListener

Field Summary
static int ENABLE_CHG
           A flag used to specify the property's enablment has changed.
static int VALID_VALUES_CHG
           A flag used to specify the property's valid values have changed.
static int VALUE_CHG
           A flag used to specify the property's value has changed.
 
Constructor Summary
DataModelEvent(IDataModel dataModel, java.lang.String propertyName, int flag)
           Constructor for DataModelEvent.
 
Method Summary
 IDataModel getDataModel()
           Returns the IDataModel whose property has changed.
 int getFlag()
           Returns the flag indicating the event type.
 java.lang.Object getProperty()
           Convenience method to return the IDataModel's property.
 java.lang.String getPropertyName()
           Returns the name of the changed property.
 DataModelPropertyDescriptor[] getValidPropertyDescriptors()
           Convenience method to return the IDataModel property's valid property descriptors.
 boolean isPropertyEnabled()
           Convenience method to return the IDataModel property's enablement state.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALUE_CHG

public static final int VALUE_CHG

A flag used to specify the property's value has changed.

See Also:
IDataModel.getProperty(String), getFlag(), Constant Field Values

ENABLE_CHG

public static final int ENABLE_CHG

A flag used to specify the property's enablment has changed.

See Also:
IDataModel.isPropertyEnabled(String), getFlag(), Constant Field Values

VALID_VALUES_CHG

public static final int VALID_VALUES_CHG

A flag used to specify the property's valid values have changed.

See Also:
IDataModel.getValidPropertyDescriptors(String), getFlag(), Constant Field Values
Constructor Detail

DataModelEvent

public DataModelEvent(IDataModel dataModel,
                      java.lang.String propertyName,
                      int flag)

Constructor for DataModelEvent.

Parameters:
dataModel - the IDataModel whose property has changed
propertyName - the name of the changed property
flag - contains a flag specifiying the event type
Method Detail

getDataModel

public IDataModel getDataModel()

Returns the IDataModel whose property has changed.

Returns:
the IDataModel whose property has changed.

getPropertyName

public java.lang.String getPropertyName()

Returns the name of the changed property.

Returns:
the name of the changed property.

getFlag

public int getFlag()

Returns the flag indicating the event type. Valid types are:

Returns:
the flag indicating the event type.

getProperty

public java.lang.Object getProperty()

Convenience method to return the IDataModel's property. This is equavalent to: getDataModel().getProperty(getPropertyName()).

Returns:
the dataModel's property.
See Also:
IDataModel.getProperty(String)

isPropertyEnabled

public boolean isPropertyEnabled()

Convenience method to return the IDataModel property's enablement state. This is equavalent to: getDataModel().isPropertyEnabled(getPropertyName()).

Returns:
the dataModel property's enablement state.
See Also:
IDataModel.isPropertyEnabled(String)

getValidPropertyDescriptors

public DataModelPropertyDescriptor[] getValidPropertyDescriptors()

Convenience method to return the IDataModel property's valid property descriptors. This is equavalent to: getDataModel().getValidPropertyDescriptors(getPropertyName()).

Returns:
the dataModel property's valid property descriptors.
See Also:
IDataModel.getValidPropertyDescriptors(String)