Package com.portal.bas
Class PCollectDataEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
com.portal.bas.PCollectDataEvent
- All Implemented Interfaces:
Serializable
PCollectDataEvent sends a marshal data event to collect changed
data from various controls. This data can then be used, for example, to
commit changes and perform a search.- Version:
- 7
- Author:
- Larry Lynch-Freshner
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCollects data from fields that have the "dirty" attribute set.static final intCollects data for a purpose that doesn't fit into another category.static final intCollects data for searches.static final intCollects data specifically for storage.static final intCollects data for an unspecified reason.static final intCollects data specifically for validation.Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASKFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionPCollectDataEvent(Object src, int why, boolean forceCollectAll, PModelHandle model) Constructs an instance ofPCollectDataEventgiven the source, and a model to collect data.PCollectDataEvent(Object src, int why, PModelHandle model) Constructs an instance ofPCollectDataEventgiven the source, a reason to collect the data, and a model in which to collect data. -
Method Summary
Modifier and TypeMethodDescriptionbooleanForces a response from a control.Checks for an invalid component and, if found, retrieves it.getModel()Gets the model in which to collect the changed data.intGets the reason code for data collection.voidCalled when the component this event was sent to has invalid data.Methods inherited from class java.awt.AWTEvent
consume, getID, isConsumed, paramString, setSource, toStringMethods inherited from class java.util.EventObject
getSource
-
Field Details
-
FOR_UNKNOWN
public static final int FOR_UNKNOWNCollects data for an unspecified reason.- See Also:
-
FOR_SEARCHING
public static final int FOR_SEARCHINGCollects data for searches.- See Also:
-
FOR_STORING
public static final int FOR_STORINGCollects data specifically for storage.- See Also:
-
FOR_VALIDATION
public static final int FOR_VALIDATIONCollects data specifically for validation.- See Also:
-
FOR_OTHER
public static final int FOR_OTHERCollects data for a purpose that doesn't fit into another category.- See Also:
-
FOR_DIRTY
public static final int FOR_DIRTYCollects data from fields that have the "dirty" attribute set.- See Also:
-
-
Constructor Details
-
PCollectDataEvent
Constructs an instance ofPCollectDataEventgiven the source, a reason to collect the data, and a model in which to collect data.- Parameters:
src- the event senderwhy- the reason for data collectionmodel- the model to collect data
-
PCollectDataEvent
Constructs an instance ofPCollectDataEventgiven the source, and a model to collect data.- Parameters:
src- the event senderwhy- the reason for data collectionforceCollectAll- true if all controls should respond with their data, even if they have no data, or have not changedmodel- the model to collect data
-
-
Method Details
-
getModel
Gets the model in which to collect the changed data.- Returns:
- The model used to collect changed data.
-
getReason
public int getReason()Gets the reason code for data collection.- Returns:
- The collection reason code.
-
setInvalidComponent
Called when the component this event was sent to has invalid data. The caller should stop data collection and handle the error.- Parameters:
src- the component that has the invalid data
-
getInvalidComponent
Checks for an invalid component and, if found, retrieves it. Returns null if data collection was valid.- Returns:
- An invalid source component, or null.
-
forceResponse
public boolean forceResponse()Forces a response from a control. Many controls ignore this event if no change has been made or they contain no data. If this property is true, the controls should always respond to this event.- Returns:
- True if a control should always respond with its data; false otherwise.
-