org.pm4j.core.pm
Class PmEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.pm4j.core.pm.PmEvent
All Implemented Interfaces:
java.io.Serializable

public class PmEvent
extends java.util.EventObject

Informs about presentation model events.

Author:
olaf boede
See Also:
Serialized Form

Field Summary
static int ALL
           
static int ALL_CHANGE_EVENTS
           
 int changeKind
          A bit mask for the change kind.
static int ENABLEMENT_CHANGE
           
static int EXEC_COMMAND
           
static int IS_EVENT_PROPAGATION
          Indicator for an event that gets propagated to the parent hierarchy.
static int OPTIONSET_CHANGE
           
 PmObject pm
          The PmObject that is related to the event.
static int SELECTION_CHANGE
           
static int STYLECLASS_CHANGE
           
static int TITLE_CHANGE
           
static int TOOLTIP_CHANGE
           
static int VALIDATION_STATE_CHANGE
           
static int VALUE_CHANGE
           
static int VALUE_CHANGED_STATE_CHANGE
          Will be fired whenever an attribute value changes to from the initial value or back again to the initial value.
static int VISIBILITY_CHANGE
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PmEvent(java.lang.Object eventSource, PmObject pm, int changeKind)
           
 
Method Summary
 int getChangeKind()
           
 PmCommand getChangingCommand()
           
 boolean isInitializationEvent()
           
 boolean isPropagationEvent()
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_CHANGE

public static final int VALUE_CHANGE
See Also:
Constant Field Values

TITLE_CHANGE

public static final int TITLE_CHANGE
See Also:
Constant Field Values

TOOLTIP_CHANGE

public static final int TOOLTIP_CHANGE
See Also:
Constant Field Values

VISIBILITY_CHANGE

public static final int VISIBILITY_CHANGE
See Also:
Constant Field Values

ENABLEMENT_CHANGE

public static final int ENABLEMENT_CHANGE
See Also:
Constant Field Values

OPTIONSET_CHANGE

public static final int OPTIONSET_CHANGE
See Also:
Constant Field Values

VALUE_CHANGED_STATE_CHANGE

public static final int VALUE_CHANGED_STATE_CHANGE
Will be fired whenever an attribute value changes to from the initial value or back again to the initial value.

See Also:
Constant Field Values

VALIDATION_STATE_CHANGE

public static final int VALIDATION_STATE_CHANGE
See Also:
Constant Field Values

STYLECLASS_CHANGE

public static final int STYLECLASS_CHANGE
See Also:
Constant Field Values

SELECTION_CHANGE

public static final int SELECTION_CHANGE
See Also:
Constant Field Values

EXEC_COMMAND

public static final int EXEC_COMMAND
See Also:
Constant Field Values

IS_EVENT_PROPAGATION

public static final int IS_EVENT_PROPAGATION
Indicator for an event that gets propagated to the parent hierarchy.

See Also:
Constant Field Values

ALL_CHANGE_EVENTS

public static final int ALL_CHANGE_EVENTS
See Also:
Constant Field Values

ALL

public static final int ALL
See Also:
Constant Field Values

changeKind

public final int changeKind
A bit mask for the change kind.


pm

public final PmObject pm
The PmObject that is related to the event. May be null if the event is not related to a particular PM.

Constructor Detail

PmEvent

public PmEvent(java.lang.Object eventSource,
               PmObject pm,
               int changeKind)
Parameters:
eventSource - The control or command that triggered the change.
Should not be null.
changeKind - A bit mask for the change kind.
Method Detail

isPropagationEvent

public boolean isPropagationEvent()
Returns:
true if the event is derived from an original event just for propagating it within the event hierarchy.
false if the event is an active event related to the linked pm.

isInitializationEvent

public boolean isInitializationEvent()
Returns:
true if the event is caused by an initialization. This event kind is also generated if setPmBean was called and all values of the related PM sub-tree are exchanged.

getChangingCommand

public PmCommand getChangingCommand()
Returns:
The command that triggered the change.

getChangeKind

public final int getChangeKind()
Returns:
A bit mask for the change kind.

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject