Class EditChangeEvent
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.model.EditChangeEvent
-
public class EditChangeEvent extends java.lang.Object
Defines an edit event which can be a spatial representation change, a change in one non-spatial attribute, or a change in several non-spatial attributes at the same time. This event class is used to store the history of changes in the change manager class, and it can be used for undo operations. The change manager class handles this events, and in general the user application does not define instance of this class.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ATTRIBUTE_UPDATE
static int
NEW_EVENT
static int
NO_EVENT
Event types.static int
NO_UPDATE
Change types for update events.static int
REMOVE_EVENT
static int
SPATIAL_UPDATE
static int
UPDATE_EVENT
-
Constructor Summary
Constructors Constructor Description EditChangeEvent(int evType, int upType, java.lang.String key, java.lang.Object current, java.lang.Object old, boolean isNew, boolean isModified)
Constructs a geometry edit event
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Rectangle2D
getAffectedSpatialArea()
Returns the spatial area affected by last change.java.lang.Object
getCurrentObject()
Returns the current object.java.lang.String
getDescriptionString()
int
getEventType()
Returns the event type.java.lang.String
getKey()
Returns the key value.java.lang.Object
getOldObject()
Returns the the old object.int
getUpdateType()
Returns the update type.boolean
isModifiedFeature()
Returns if change relates to a feature that has been modified before.boolean
isNewFeature()
Returns if change relates to a new feature.
-
-
-
Field Detail
-
NO_EVENT
public static int NO_EVENT
Event types.
-
NEW_EVENT
public static int NEW_EVENT
-
UPDATE_EVENT
public static int UPDATE_EVENT
-
REMOVE_EVENT
public static int REMOVE_EVENT
-
NO_UPDATE
public static int NO_UPDATE
Change types for update events. Spatial change: object type is of one spatial class (JGeometry, AnnotationText, ...). Attribute change: object type is of Field class. Multi attribute change: object type is of Field[] elements.
-
SPATIAL_UPDATE
public static int SPATIAL_UPDATE
-
ATTRIBUTE_UPDATE
public static int ATTRIBUTE_UPDATE
-
-
Constructor Detail
-
EditChangeEvent
public EditChangeEvent(int evType, int upType, java.lang.String key, java.lang.Object current, java.lang.Object old, boolean isNew, boolean isModified)
Constructs a geometry edit event- Parameters:
evType
- event typeupType
- update typekey
- key valuecurrent
- current geometryold
- old geometryisNew
- if is a new geometryisModified
- if is an existing geometry that has been modified before
-
-
Method Detail
-
getDescriptionString
public java.lang.String getDescriptionString()
-
getEventType
public int getEventType()
Returns the event type.- Returns:
- event type
-
getUpdateType
public int getUpdateType()
Returns the update type.- Returns:
-
getKey
public java.lang.String getKey()
Returns the key value.- Returns:
- key string.
-
getCurrentObject
public java.lang.Object getCurrentObject()
Returns the current object.- Returns:
- object (
-
getOldObject
public java.lang.Object getOldObject()
Returns the the old object.- Returns:
- geometry object
-
isNewFeature
public boolean isNewFeature()
Returns if change relates to a new feature.- Returns:
-
isModifiedFeature
public boolean isModifiedFeature()
Returns if change relates to a feature that has been modified before.- Returns:
-
getAffectedSpatialArea
public java.awt.geom.Rectangle2D getAffectedSpatialArea()
Returns the spatial area affected by last change. If change is in the spatial representation, then MBRs of current and of old feature spatial representation are combined.- Returns:
-
-