Class 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.
    • 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
    • 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 type
        upType - update type
        key - key value
        current - current geometry
        old - old geometry
        isNew - if is a new geometry
        isModified - 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: