Package com.portal.bas
Class PViewDataChangeEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
com.portal.bas.PViewDataChangeEvent
- All Implemented Interfaces:
Serializable
PViewDataChangeEvent
is the mechanism by which a controller
tells a view that it needs to display new data, and what that data is.- Version:
- 5
- Author:
- Larry Lynch-Freshner
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A constant that indicates the new data needs to be inserted before the existing data.static final int
A constant that indicates the current data needs to be replaced with the new data.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_MASK
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionPViewDataChangeEvent
(Object src, String dataObjName, int doWhat, int index, Object data) Creates an instance ofPViewDataChangeEvent
that determines whether new data should replace or be inserted before the old data that is at the specified index.PViewDataChangeEvent
(Object src, String dataObjName, int index, Object data) Creates an instance ofPViewDataChangeEvent
that replaces old indexed data with new data, beginning at the specified location.PViewDataChangeEvent
(Object src, String dataObjName, Object data) Creates an instance ofPViewDataChangeEvent
that replaces old data with the data. -
Method Summary
Methods inherited from class java.awt.AWTEvent
consume, getID, isConsumed, paramString, setSource, toString
Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
REPLACE
public static final int REPLACEA constant that indicates the current data needs to be replaced with the new data.- See Also:
-
ADD_BEFORE
public static final int ADD_BEFOREA constant that indicates the new data needs to be inserted before the existing data.- See Also:
-
-
Constructor Details
-
PViewDataChangeEvent
Creates an instance ofPViewDataChangeEvent
that replaces old data with the data.- Parameters:
src
- the event sourcedataObjName
- the name of data that has changeddata
- the new data
-
PViewDataChangeEvent
Creates an instance ofPViewDataChangeEvent
that replaces old indexed data with new data, beginning at the specified location.- Parameters:
src
- the event sourcedataObjName
- the name of data that has changedindex
- the index of the datadata
- the new data
-
PViewDataChangeEvent
Creates an instance ofPViewDataChangeEvent
that determines whether new data should replace or be inserted before the old data that is at the specified index.- Parameters:
src
- the event sourcedataObjName
- the name of data that has changeddoWhat
- how to change data in the viewindex
- the index of the datadata
- the new data
-
-
Method Details
-
isIndexed
public boolean isIndexed()Tests to determine whether the data uses an index.- Returns:
- True if an index is used; false otherwise.
-
getHowChanged
public int getHowChanged()Gets the value that tells how the data has changed.- Returns:
- A value that indicates whether the new data replaces the old or should be inserted before it.
-
getIndex
public int getIndex()Gets the data's index value.- Returns:
- The index for the data.
-
getDataName
Gets the name of the data.- Returns:
- A
String
with the name of the data.
-
getData
Gets the data.- Returns:
- The data.
-