public class PViewDataChangeEvent extends AWTEvent implements Serializable
PViewDataChangeEvent
is the mechanism by which a controller
tells a view that it needs to display new data, and what that data is.Modifier and Type | Field and Description |
---|---|
static int |
ADD_BEFORE
A constant that indicates the new data needs to be inserted before
the existing data.
|
static int |
REPLACE
A constant that indicates the current data needs to be replaced with
the new data.
|
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
source
Constructor and Description |
---|
PViewDataChangeEvent(Object src,
String dataObjName,
int doWhat,
int index,
Object data)
Creates an instance of
PViewDataChangeEvent 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 of
PViewDataChangeEvent that replaces
old indexed data with new data, beginning at the specified location. |
PViewDataChangeEvent(Object src,
String dataObjName,
Object data)
Creates an instance of
PViewDataChangeEvent that replaces
old data with the data. |
Modifier and Type | Method and Description |
---|---|
Object |
getData()
Gets the data.
|
String |
getDataName()
Gets the name of the data.
|
int |
getHowChanged()
Gets the value that tells how the data has changed.
|
int |
getIndex()
Gets the data's index value.
|
boolean |
isIndexed()
Tests to determine whether the data uses an index.
|
consume, getID, isConsumed, paramString, setSource, toString
getSource
public static final int REPLACE
public static final int ADD_BEFORE
public PViewDataChangeEvent(Object src, String dataObjName, Object data)
PViewDataChangeEvent
that replaces
old data with the data.src
- the event sourcedataObjName
- the name of data that has changeddata
- the new datapublic PViewDataChangeEvent(Object src, String dataObjName, int index, Object data)
PViewDataChangeEvent
that replaces
old indexed data with new data, beginning at the specified location.src
- the event sourcedataObjName
- the name of data that has changedindex
- the index of the datadata
- the new datapublic PViewDataChangeEvent(Object src, String dataObjName, int doWhat, int index, Object data)
PViewDataChangeEvent
that determines
whether new data should replace or be inserted before the old data that is
at the specified index.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 datapublic boolean isIndexed()
public int getHowChanged()
public int getIndex()
public String getDataName()
String
with the name of the data.public Object getData()
Copyright © 2003, 2023, Oracle and/or its affiliates.