commonj.connector.metadata.discovery.properties
Class PropertyEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.beans.PropertyChangeEvent
          extended by commonj.connector.metadata.discovery.properties.PropertyEvent
All Implemented Interfaces:
Serializable

public class PropertyEvent
extends PropertyChangeEvent

An extension to the java.beans.PropertyChangeEvent class used to notify of property changes.

This extenstion introduces additional event types to identify events other than the default change of value event. These new events include:

  1. A Property was enabled or disabled (used for the User Interface to render the property)
  2. A property's set of allowed values has changed.
  3. A Property Group's contents changed. For example, a new property added/removed, the entire contents refreshed, etc.)
  4. A Property's current value has become invalidated.

The following table outlines the various allowable property change types, and the corresponding information that is carried within the PropertyEvent.

Property Change Types

getPropertyChangeType() EventObject.getSource() PropertyChangeEvent.getNewValue() PropertyChangeEvent.getOldValue()
PROPERTY_VALUE_CHANGE SingleValuedProperty The new current value of the property The old value of the property
PROPERTY_VALUE_CHANGE MultiValuedProperty The new object array of property values The old object array of property values
PROPERTY_ENABLE PropertyDescriptor null null
PROPERTY_DISABLE PropertyDescriptor null null
PROPERTY_VALUE_VALID Property null null
PROPERTY_VALUE_INVALID Property null null
PROPERTY_VALID_VALUES_CHANGE Property The new array of recommended property values The old array of recommended property values
PROPERTYGROUP_ADD_CHILD PropertyGroup The child property descriptor that was added null
PROPERTYGROUP_REMOVE_CHILD PropertyGroup null The child property descriptor that was removed
PROPERTYGROUP_REMOVE_ALL PropertyGroup null The old array of property descriptors that were part of the property group.
PROPERTYGROUP_REPLACE_ALL PropertyGroup The new array of property descriptors that are part of the property group. The old array of property descriptors that were part of the property group.
TREE_PROPERTY_SELECTED NodeProperty Boolean.TRUE Boolean.FALSE
TREE_PROPERTY_DESELECTED NodeProperty Boolean.FALSE Boolean.TRUE
TABLE_ROW_ADDED TableProperty The new array of table cell properties that form the new row added. null
TABLE_ROW_REMOVED TableProperty null The old array of table cell properties that form the new row that was removed.
TABLE_ROW_MOVED TableProperty A java.lang.Integer representing the new row index. A java.lang.Integer representing the old row index.
TABLE_CLEARED TableProperty null null
MULTI_VALUED_PROPERTY_SELECTION MultiValuedProperty The array of indices of the previously selected values. The array of indices of the newly selected values.
TREE_NODE_HIGHLIGHTED NodeProperty null null

Since:
1.0
See Also:
Serialized Form

Field Summary
static int MULTI_VALUED_PROPERTY_SELECTION
          Constant for the event type where values in a multi-valued property are selected.
static int PROPERTY_DISABLE
          Constant for the event type where a property is disabled.
static int PROPERTY_ENABLE
          Constant for the event type where a property is enabled.
static int PROPERTY_VALID_VALUES_CHANGE
          Constant for the event type where the set of recommended values for a property changes.
static int PROPERTY_VALUE_CHANGE
          Constant for the event type where a property value changes.
static int PROPERTY_VALUE_INVALID
          Constant for the event type where a property value gets invalidated.
static int PROPERTY_VALUE_VALID
          Constant for the event type where a property value becomes valid.
static int PROPERTYGROUP_ADD_CHILD
          Constant for the event type where a property group has a child property added to it.
static int PROPERTYGROUP_REMOVE_ALL
          Constant for the event type where a property group has all its contents removed at once.
static int PROPERTYGROUP_REMOVE_CHILD
          Constant for the event type where a property group has a child property removed.
static int PROPERTYGROUP_REPLACE_ALL
          Constant for the event type where a property group has all its contents replaced at once.
static int TABLE_CLEARED
          Constant for the event type where a table is cleared.
static int TABLE_ROW_ADDED
          Constant for the event type where a table row is added.
static int TABLE_ROW_MOVED
          Constant for the event type where a table row is moved.
static int TABLE_ROW_REMOVED
          Constant for the event type where a table row is removed.
static int TREE_NODE_HIGHLIGHTED
          Constant for the event type where a node property is highlighted.
static int TREE_PROPERTY_DESELECTED
          Constant for the event type where a tree property is DE-selected.
static int TREE_PROPERTY_SELECTED
          Constant for the event type where a tree property is selected.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PropertyEvent(PropertyDescriptor source, Object oldValue, Object newValue, int propertyChangeType)
          Constructs a new PropertyEvent.
 
Method Summary
 int getPropertyChangeType()
          Identifies the type of property change that occured.
 
Methods inherited from class java.beans.PropertyChangeEvent
getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId
 
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

PROPERTY_VALUE_CHANGE

public static final int PROPERTY_VALUE_CHANGE
Constant for the event type where a property value changes.

See Also:
Constant Field Values

PROPERTY_ENABLE

public static final int PROPERTY_ENABLE
Constant for the event type where a property is enabled.

See Also:
Constant Field Values

PROPERTY_DISABLE

public static final int PROPERTY_DISABLE
Constant for the event type where a property is disabled.

See Also:
Constant Field Values

PROPERTY_VALID_VALUES_CHANGE

public static final int PROPERTY_VALID_VALUES_CHANGE
Constant for the event type where the set of recommended values for a property changes.

See Also:
PropertyType.getValidValues(), Constant Field Values

PROPERTY_VALUE_VALID

public static final int PROPERTY_VALUE_VALID
Constant for the event type where a property value becomes valid.

See Also:
Constant Field Values

PROPERTY_VALUE_INVALID

public static final int PROPERTY_VALUE_INVALID
Constant for the event type where a property value gets invalidated.

See Also:
Constant Field Values

PROPERTYGROUP_ADD_CHILD

public static final int PROPERTYGROUP_ADD_CHILD
Constant for the event type where a property group has a child property added to it.

See Also:
Constant Field Values

PROPERTYGROUP_REMOVE_CHILD

public static final int PROPERTYGROUP_REMOVE_CHILD
Constant for the event type where a property group has a child property removed.

See Also:
Constant Field Values

PROPERTYGROUP_REPLACE_ALL

public static final int PROPERTYGROUP_REPLACE_ALL
Constant for the event type where a property group has all its contents replaced at once.

See Also:
Constant Field Values

PROPERTYGROUP_REMOVE_ALL

public static final int PROPERTYGROUP_REMOVE_ALL
Constant for the event type where a property group has all its contents removed at once.

See Also:
Constant Field Values

TREE_PROPERTY_SELECTED

public static final int TREE_PROPERTY_SELECTED
Constant for the event type where a tree property is selected.

See Also:
Constant Field Values

TREE_PROPERTY_DESELECTED

public static final int TREE_PROPERTY_DESELECTED
Constant for the event type where a tree property is DE-selected.

See Also:
Constant Field Values

TABLE_ROW_ADDED

public static final int TABLE_ROW_ADDED
Constant for the event type where a table row is added.

See Also:
Constant Field Values

TABLE_ROW_REMOVED

public static final int TABLE_ROW_REMOVED
Constant for the event type where a table row is removed.

See Also:
Constant Field Values

TABLE_ROW_MOVED

public static final int TABLE_ROW_MOVED
Constant for the event type where a table row is moved.

See Also:
Constant Field Values

TABLE_CLEARED

public static final int TABLE_CLEARED
Constant for the event type where a table is cleared.

See Also:
Constant Field Values

MULTI_VALUED_PROPERTY_SELECTION

public static final int MULTI_VALUED_PROPERTY_SELECTION
Constant for the event type where values in a multi-valued property are selected.

See Also:
Constant Field Values

TREE_NODE_HIGHLIGHTED

public static final int TREE_NODE_HIGHLIGHTED
Constant for the event type where a node property is highlighted.

See Also:
Constant Field Values
Constructor Detail

PropertyEvent

public PropertyEvent(PropertyDescriptor source,
                     Object oldValue,
                     Object newValue,
                     int propertyChangeType)
Constructs a new PropertyEvent.

Parameters:
source - The property that fired the event.
oldValue - The old value of the property.
newValue - The new value of the property.
propertyChangeType - the type of property change event.
See Also:
Property Change Event Table
Method Detail

getPropertyChangeType

public int getPropertyChangeType()
Identifies the type of property change that occured.

Returns:
Returns the propertyChangeType.
See Also:
Property Change Event Table